synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameera Jayasoma <>
Subject Improving the DynamicLBEndpoint to support Session Affinity based Load Balancing.
Date Thu, 02 Sep 2010 09:02:26 GMT
Hi Folks,

I am working on the $Subject.

The existing DynamicLoadBalancingEndpoint selects a member node(Member) in a
round robin fashion and creates an AddressEndpoint to send the request.
Likewise for each and every request an AddressEndpoint is created and the
EPR is calculated using the host name and the port of the member. But when
it comes to supporting session affinity, we need keep a mapping of sessions
with Members.

In Synapse we have a Session affinity based *static* load balancing
endpoint. Hence all utility classes(Dispatchers, SALSession and
SessionInformation) are written to work in a static environment where all
the endpoints are available during the initialization time of the
LBEndpoint. And these utility classes are written to work with Endponts. I.e
they keep mappings between sessions and endpoints. But for Session affinity
based DynamicLB,  we need to hold information about members and attached

RoundRobin algorithm for selecting the next member/endpoint for session
affinity based load balancing is not sufficient. In the worst case, we might
hit a situation where all the sessions are attached to a single
member/endpoint. IMV, we need an algorithm which considers the parameters
such as attached sessions to a member or an endpoint, in flight requests,

Your thoughts are welcome.


Sameera Jayasoma
Technical Lead & Product Manager, WSO2 Carbon

WSO2, Inc. (

Lean . Enterprise . Middleware

View raw message