users@glassfish.java.net

Re: Clustering and domain confusion - 4-way redundancy? Multiple domains?

From: <glassfish_at_javadesktop.org>
Date: Tue, 19 Jun 2007 08:55:14 PDT

Caveat -- I haven't spent much time with clustering, nor have I set one up. But I've played a bit before on other servers, so maybe some of this will actually be valid.

Let's just run through your vocabulary real quick.

Domain: This is the common configuration that is shared across your cluster. It's essentially identical to a normal GF Domain, however it also has some concessions to allow instance specific configuration. But in the beginning, just think of it as your standard GF domain. In your scenario you will have one of these.

Instance: A JVM running GF, managed by the cluster. These are started by the respective node-agents when the cluster on a whole starts up.

When everything is up and running, you'll have 4 of these.

DAS: The administration server. This is your cluster wide interaction point. It can be on any machine, including one of your cluster machines (that's a guess). This hosts all of your common configuration information. Any time you need to make a change to the cluster, you will do it on your DAS, and it will sync up with the various instances of the system via the node-agents as necessary. In a generic single instance of GF, your GF domain is a combination of the DAS and node-agent and instance.

You'll have one of these.

node-agent: The node-agent is the DAS's proxy. It's installed for each instance of the cluster that you wish to run. Through the node-agents, the DAS interacts with the running instances, starting, stopping, updating configurations, etc. The DAS needs some mechanism to push data to the instances, and the node-agent is that mechanism.

You'll have four of these.

Cluster relationship: No doubt something formal and specific to GF, but I don't know the details. Probably the relationships between DAS <-> node-agent <-> instance. For example, instances in a cluster relationship are most likely sharing something (for example state information to handle failover).

If you want to get 4 instances running on 2 machines, you will probably have something like this in the end:

Machine 1: 1 GF install, 1 DAS, 2 Node-Agents, and 2 Instances
Machine 2: 1 GF install, 2 Node-Agents, and 2 Instances

The fast track to getting this to work will most likely be setting up 2 IPs on each machine, and configuring a node-agent to listen to each IP on each system. So in the end you'll have 2 Machines with 4 IPs. If the DAS needs to be on a seperate machine, you can simply give it its own IP on one of your two machines, and that's effectively the same thing, but I bet you can run DAS and node-agents on the same IP.

I have no doubt that with some shenanigans, you could probably have 2 node-agents sharing the same IP with different port numbers, but I'll bet it's simply a faster start up and less hassle to plumb a new IP for each instance, since the instances will all look the same. The system really looks at IPs, not actual machines. Both Unix and Windows can do this, though I don't know how to do this on Windows. "Consult with your network administrator" (I always hated that phrase as I'm typically the network administrator, but there you are.)

You'll still need to front the whole thing with a load balancer of some kind, I don't know how this is set up.

Again, this is all supposition, no practical experience. But hopefully it is a) accurate and b) enough to nudge you forward.

If nothing else, perhaps it will draw out someone more experienced and knowledgeable, shaking their head, screaming "NO NO NO!!! Users are SO clueless!" and correcting it :-).

Then, we'll both benefit.

Regards.
[Message sent by forum member 'whartung' (whartung)]

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