users@glassfish.java.net

Re: Load balancer + IP sprayer with round robin

From: <glassfish_at_javadesktop.org>
Date: Tue, 12 Jan 2010 09:36:43 PST

> You can configure IP sprayer to do round-robin
> load-balancing. The
> decision to select instance is stateless, hence
> whichever web-server
> handles the request, it will route it to correct
> back-end GlassFish
> instance.
> You only need to ensure load-balancer xml on both
> web-server are same.

Thanks,
this is a very clear answer and is what I wanted to know!

I sniffed the HTTP connection between the client and the web server and noticed that it contains a few cookies. I think that JROUTE cookie is the key. In our scenario it has only two different values (two application servers?) even among many different JSESSIONIDs. Is there a direct mapping between JROUTE value and the application server the request will be routed to? Does the plugin compute the JROUTE possible values from load-balancer.xml?
Specifically this is one possible JROUTE cookie I saw: JROUTE=czpz. There is no such value "czpz" in load-balancer.xml. I assume it is some sort of hash computed from load-balancer.xml. Is this the reason the various load-balancer.xml files need to be the same?
How "same" should they be? Byte-for-byte equal? Same date and time? I ask this because our two load-balancer.xml files are on different servers and therefore tiny differences could be expected (date/time; comments in the XML file; etc.)

Thanks!
[Message sent by forum member 'federicocozzi' (federico.cozzi_at_dp2000.it)]

http://forums.java.net/jive/thread.jspa?messageID=380374