Graham Leggett wrote:

Ideally tomcat should be able to pass to httpd info like "hey, there is a new server in the pool, and it's called foo" or "do me a favour, I'm being taken out of the pool, so don't send me any new requests".


Config of httpd would be as simple as

ProxyPass /myWebapp ajp://seedserver/myWebapp

The server seedserver could then tell httpd about all the other servers in the cluster dynamically. "seedserver" could resolve to one machine, or more than one machine.


From what I experienced I can give an analogy with BEA WebLogic:

The cluster client uses a URL to contact the WLS cluster. The URL has the form

protocol://server1,server2,...:port

The URL supports a list of servers to avoid bootstrapping problems in case of a single server breakdown. Usually two independent nodes of the cluster are statically configured in this URL.

While the client starts, it tries to contact all servers configured in the URL. The first server that answers the request replies with a list of all cluster members.

Then the client connects to all cluster members.

The communication of the client with the cluster members includes several obvious ways of dynamically adding or removing cluster nodes:

- a heartbeat protocol, so that the client detects a defect server by missing heartbeat packets
- a configurable time interval after which the client updates its cluster server list by asking one of the already known cluster servers
- a clean way of noticing the client by a cluster server that is in the process of being shut down


To ensure consistency, all cluster members exchange membership data, so that they have the same view of the cluster topology.

Furthermore the client loads communication code from the server. The code contains important information about load balancing. So the client learns from the cluster servers, if they should be used in a round-robin, or in a weight based way, and what their weights are. Again the cluster servers share this information via replication.

This setup is working well in many real world scenarios. Maybe it indicates, that it is a good idea to learn at least cluster topology and load balancing configuration from statically configured bootstrap cluster nodes. Of course some information still needs to be managed dynamically inside the cluster. But with all the JMX support in Tomcat, that seems to be a place, where that should be feasible.






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to