users@glassfish.java.net

Multiple loadbalancers

From: <glassfish_at_javadesktop.org>
Date: Wed, 28 Oct 2009 22:58:36 PDT

Hi

I'm wondering if it's possible to configure multiple software loadbalancers (on multiple Web Server instances) to front the one cluster.

That is, have multiple web servers accept the same request.
The idea being rather than having one "entry point", there are multiple.

I know it's technically possible to setup, but I'm not sure how well it would go for session-management with cookies and URL rewriting.

For instance, say we have 2 webservers, each with their own loadbalancer plugin, using the same cluster.

The DNS name is www.test.com, which resolves to 2 IP addresses.
Using DNS round-robin, users will get either of the 2 IPs, which pass to two loadbalancers.

If a user starts a session via webserver1, it will pass to a Glassfish instance in the cluster, and get a session ID so future requests are sticky and sent to the same cluster.

However, suppose the DNS TTL expires and next time the same request comes through, its routed to webserver2. Will the plugin on webserver2 be able to recognize the session ID in the session, to route the request to the same Glassfish instance as (webserver1 routed to)?

May sound complicated but all I'm really trying to do is implement multiple webservers so there are multiple entry points, should one webserver fail/become overloaded.

Any ideas?
[Message sent by forum member 'coreyjohnston' (corey_at_tt.com.au)]

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