Hi Willy,

It seems right to implement it.
I'll review this with the team and let you know once we have an available patch.

regards,

n.

On 04/04/2009, at 03:49, Willy Tarreau wrote:

Hi Nicolas,

On Fri, Apr 03, 2009 at 10:29:32PM -0300, Nicolas Cohen wrote:
hi,

i want to use haproxy to load balance a virtual world app we are
developing in java,

the app server benefits if most connected users in one particular
machine are in the same regions of the virtual world (less objects
need to be referrenced and caching strategies are more efficient)
i thought of making the login process map the region of the world
where the user's avatar is placed to one of a set of subdomains (for
instance: region1.domain.com, regions2.domain.com).
i would then make the DNS assign a different ip for each subdomain.
all ips would be configured for the same haproxy machine, which would
try to put all connections to the same ip in the same machine, and
then fallback to leastconn if a server is too loaded.

this is basically the same algorithm than *source* but for destination.
is there any way to achieve this in haproxy?

It depends on how many regions you have. If you only have a small set
of regions, you can already achieve this using ACLs on the destination
address, using which you will select a backend. But this will quickly
become very boring when you have more than 4-5 regions.

Another possibility is to implement the "balance dstip" algo which
should be pretty trivial. If you're deploying a new site, I think
it makes a lot of sense to adapt the tools to do the job right. Do
you feel OK with adding this feature yourself ? I could then merge
it back into next release, as I think it will not be an invasive
change at all.

Regards,
Willy



Reply via email to