dev@glassfish.java.net

Re: IIOP load balancing change in r1.15.2.1

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Thu, 27 Aug 2009 12:00:31 +1000

Hi Mark,

Thank you for your detailed reply.

> Not true. There was never any supported feature to randomize or loadbalance
> iiop targets in GFv2. The feature is FOLB (fail over load balancing)
> meaning
> you connect to the first target past in always. Later if that fails,
> try the
> next in the list, and so on until you get a new connection or fail.

I am not sure what the function is named, but I was referring to the
following function:

Sun Java System Application Server 9.1 High Availability Administration
Guide
http://dlc.sun.com/pdf/819-3679/819-3679.pdf

Chapter 11: RMI-IIOP Load Balancing and Failover

When a client performs a JNDI lookup for an object, the Naming Service
creates a InitialContext (IC) object associated with a particular server
instance.
[...]
For that InitialContext object, the load balancer directs lookup
requests and other InitialContext operations to the first endpoint on
the randomized list.
[...]
Each time the client subsequently creates a new InitialContext object,
the endpoint list is rotated so that a different IIOP endpoint is used
for InitialContext operations.

So if you pass a list of endpoints, for each bean (i.e. separate JNDI
look-ups, not per SLSB request as with the new feature Ken referred to)
you should get round-robin load balancing.

But this was not officially supported?

> Yes there is.
> The functionality you thought was IIOP load balancing did not work as you
> thought, and was in fact FOLB (Fail Over Load Balancing) in which the server
> should use FIFO logic to do initial connection and then (only in a fail over
> situation) try the other connections passed in (IN FIFO order).

 From the details you included I understand the problem when using LB
when a server fails: As each InitialContext creation gets a full list of
(original) targets passed, it could try to access a server again that
has failed. FOLB relies on the pattern where the endpoints are passed
through only once at the beginning, after which GF maintains a list of
working targets (expanding as servers are added, decreasing as servers
are removed or have failed). Is that summary correct?

Thanks!
Dies