Hi QA Team,

In the next build you'll be able to test the multiple instance support with
products and with the core. I have added the feature in to default feature
build and it will ship as a feature and you are suppose to install it in to
your product. Even if you are testing with ESB  you have to install the
feature since it contains one more bundles other than the bundles we are
taking from ESB. Here are the steps on how to test the Multiple instance
support.


Steps to test with ESB
-----------------------------
1.Start the ESB with OSGi console add the repo and artifactrepo to the
location where we have our p2-repo and Install the Multiple Instance Support
Feature : featureid : org.wso2.carbon.multiple.instance version :
3.0.0-SNAPSHOT, then shut down the Server and do the following changes.

2. Edit the synapse.xml to activate the LocalLoadAnalyzerTask by adding
following XML tags.


  <task
class="org.wso2.carbon.mediator.autoscale.localautoscale.LocalLoadAnalyzerTask"
name="LocalLoadAnalyzer">
        <property name="maxAppInstances" value="10"/>
        <property name="minAppInstances" value="2"/>
        <trigger interval="20"/>
    </task>

    <sequence name="main" onError="errorHandler">
        <in>
            <send>
                <endpoint key="lb"/>
            </send>
        </in>
        <out>
            <send/>
        </out>
     </sequence>

    <sequence name="errorHandler">
        <autoscaleOut/>
        <makefault response="true">
            <code value="tns:Receiver" xmlns:tns="
http://www.w3.org/2003/05/soap-envelope"/>
            <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
        </makefault>
        <send/>
    </sequence>


3. Since with ESB you have a default main sequence defined in main.xml,
please remove it before testing. After doing these changes in to ESB please
run the wso2server.sh with required number of instances with argument -n
argument and for each instance the logs will be there at
repository/logs/Instance<Instance Number>/wso2-esbInstance<Instance
Number>.log.

This will start one master node with the ports given in your axis2.xml and a
management console port (9443) and n number of instances of ESB in random
ports.


4. You can do a load test by sending requests to the main Node(Main node is
the one which you get the logs in the console when you start it and all the
instance can be monitored in their log locations) and it will load balance
between nodes.

5. You can test the auto-scaling by killing some of the instances started
and see whether new instances started to fulfill the required number of
instances you have given.

Steps to test with other products
------------------------------------------

1.Start the product and  Install the Multiple Instance Support Feature :
featureid : org.wso2.carbon.multiple.instance version : 3.0.0-SNAPSHOT

2. Add the NIO transport configuration in to axis2.xml(It is commented on
axis2.xml files of all the products and please uncomment the transports
configuration and please make sure you remove the current http and https
configurations only in axis2.xml ) and  Then start the wso2server.sh with -n
parameter by giving the required number of instances you want to start and
logs for each instance will be there at repository/logs/Instance<Instance
Number>/wso2carbonInstance<Instance Number>.log.

This will start a master node with starting opening admin console ports
given in mgt-transport.xml and NIO transport ports will be started using the
ports given in axis2.xml. So you can send the request to the master node's
NIO Transport endpoints which will load balance between the instances.

3. You can do a load test by sending requests to the main Node(Main node is
the one which you get the logs in the console when you start it and all the
instance can be monitored in their log locations) and it will load balance
between nodes.

4. You can test the autoscaling by killing some of the instances started and
see whether new instance is starting to fulfill the required number of
instances you have given.

Known Issues

1. In this feature we are using synapse-core to do the load balancing so we
are starting NIO Transports in all nodes we are starting even though we use
the NIO Transport with master node. So if you start N number of nodes it
will start NIO endpoints in each node you are starting and those endpoints
will be added to the load balancing endpoints of the master node. This will
be quit alright with ESB but with other products this will be a failure if
we send a normal service request to one of the NIO Transport endpoint.

2. Sometimes when you login to the master admin console you'll get an
exception with an error in template_jsp, but this is not critical since this
is a completely back end scenario and both of these issues will be fixed
soon.




Thanks in advance
Lahiru









-- 
Lahiru Gunathilake
Software Engineer - WSO2 Inc.
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to