Hi Sameera,
First of all sorry for the delay in responding, please find my comments in-line;
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 sessions.
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, etc.
Your thoughts are welcome.
Thanks
Sameera
--
Sameera Jayasoma
Technical Lead & Product Manager, WSO2 Carbon
WSO2, Inc. (http://wso2.com)
email: sameera@wso2.com
blog: http://tech.jayasoma.org
Lean . Enterprise . Middleware