On 25 November 2010 19:27, Sebastien Tardif <[email protected]> wrote: > > How to achieve application driven load balancing scheme using HAProxy? > > What I want to achieve is “user affinity between sessions” based on user > login. So that, between http/s sessions, and even between days, user is more > likely to reach the same server. >
> Any idea how a server can re-stick http session to another server by setting > something in the response that HAProxy will act on? > > Any comments? Sebastian, It sounds a bit overly complex to me, why not just implement sharding? i.e. 1) Every application server can handle the login page (no persistence required). 2) Login page once verified redirects to www.bigsite.com/sharda/ (or just sets an appsession cookie called 'sharda') or BOTH! 3) HAProxy reads the appsession cookie or URL and re-directs to a smaller cluster (sharda) could be anything such as all logins starting with 'a' 4) All servers in each shard use same database/storage/memchached to handle just the users starting with 'a' etc... Should give fairly unlimitted scaleability? I notice my googlemail client is doing it right now: "mail.google.com/a/loadbalancer.org" -- Regards, Malcolm Turnbull. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/

