stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Re: [New Architecture] [LB] Load Balancer is Now Functional - IMV2
Date Wed, 23 Oct 2013 05:18:06 GMT
Thanks Lakmal!

Nirmal:
No, still support for multi-tenancy is not implemented. That should come
under "Components to be Implemented". Thanks for reminding it.

I actually didn't see these were configured from load-balancer.conf in the
previous version:
Endpoint was hard coded in the service component activate() method:

 /* add Tenant Aware LB endpoint */
TenantAwareLoadBalanceEndpoint tenantAwareEp = new
TenantAwareLoadBalanceEndpoint();
tenantAwareEp.init(synapseEnv);
sendMediator.setEndpoint(tenantAwareEp);

Algorithm was hard coded in endpoint init() method:

LoadbalanceAlgorithm algorithm = null;
        try {
            OMElement payload = AXIOMUtil.stringToOM(generatePayLoad());
            algorithm =
                    LoadbalanceAlgorithmFactory.
                            createLoadbalanceAlgorithm(payload, null);

        }
...
}

    private String generatePayLoad() {
        return " <serviceDynamicLoadbalance failover=\"true\"\n" +
                "
algorithm=\"org.apache.synapse.endpoints.algorithms.RoundRobin\"" +
                //"
configuration=\"$system:loadbalancer.xml\"" +
                "/>";
    }

IMO this is not a good programming practice.

I agree that it is easier for the user to configure all load balancer
specific parameters via a single configuration file. However when we look
at the overall picture, I think it is better to keep Synapse main sequence
related configuration in its main.xml file.


Thanks
Imesh






On Wed, Oct 23, 2013 at 9:22 AM, Nirmal Fernando <nirmal070125@gmail.com>wrote:

>
>
>
> On Wed, Oct 23, 2013 at 9:09 AM, Imesh Gunaratne <imesh@apache.org> wrote:
>
>> Hi All,
>>
>> The load balancer of the new architecture is now functional with its own
>> algorithm interface and round robin implementation. Please find detailed
>> information on the improvements done in this version below:
>>
>> *Improvements:*
>> - Implemented an algorithm interface and its implementation for Round
>> Robin
>> - Moved hard coded values in main sequence to its xml file
>>
> Do you mind elaborating this change? We moved away from xml file to
> loadbalncer conf file, since it's more dev-ops friendly. So, IMO better to
> make all the things configurable via loadbalancer.conf file.
>
>
> - Fixed logic which set the location value in the response header
>> - Upgraded synapse version to 2.1.1 wso2v7
>> - Changed default transport to pass-through
>>
>> I have tested this version with few application server instances and
>> topology synchronization, session management, round robin algorithm, URL
>> handling features worked as expected.
>>
>> *Commit Revision:*
>> 4a1de9c56f297dde3446838733686330dea21562
>>
>> *Binary Package:*
>>
>> http://imesh.gunaratne.org/files/stratos/lb/apache-stratos-lb-4.0.0-IMV2.zip
>>
>>
>> *Components to be Implemented:*
>> Domain mappings
>>
>> Many Thanks
>> Imesh
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Mime
View raw message