You are correct. JROUTE cookie value is used to decide which back-end
instance will service the request. It is hash value computed using
instance values provided in load-balancer xml. Entries within
load-balancer xml must be exactly same in terms of clusters, instances,
endpoints, context-roots etc. They may have different comments, file
size or time stamp.
Thanks,
Kshitiz
On Tuesday 12 January 2010 11:06 PM, glassfish_at_javadesktop.org wrote:
>> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>