users@glassfish.java.net

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

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Tue, 19 Jun 2007 09:48:23 -0700

Hi Will
Let me give it a shot. See inline below:

regards
Shreedhar

glassfish_at_javadesktop.org wrote:
> 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.
>
A domain is an area of administrative control for a given administrator.
Within this domain, there can be a Domain Admin Server (aka DAS). In
single instance mode (Developer profile), this instance also serves
applications. In Cluster and enterprise profiles,. the DAS instance is a
dedicated administration server.
Within the domain spanning multiple machines, the administrator can
create one or more individual instances (non-clustered) and instances
that belong to a cluster. A domain can thus have a combination of such
standalone and clustered instances and can have multiple clusters of
instances.

Each cluster is defined in terms of homogeneity of configuration,
applications and resources. Thus an app or resource deployed to a
cluster gets applied to all instances in the cluster. This provides for
redundancy.
> 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.
>
A JVM running GF managed by the DAS. Instances located on remote
machines are started, stopped and synchronized for configuration parity
by the node agent. It sits on machines on which instances belonging to a
domain (clustered or non-clustered) are installed.
> When everything is up and running, you'll have 4 of these.
>
If you have 4 machines you will have to have at least 4 node agents.
> DAS: The administration server. This is your cluster wide interaction point.
Domain wide interaction point
> It can be on any machine, including one of your cluster machines (that's a guess).
Yes.
> 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.
Yes.
> In a generic single instance of GF, your GF domain is a combination of the DAS and node-agent and instance.
>
Just the combo of DAS and instance in one single JVM if you use the Dev
profile with a single instance acting as both a DAS and a application
serving 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.
>
Yup.
> You'll have four of these.
>
One per machine involved in domain.
> 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).
>
The clustered instances share configuration, applications, resources and
provide in-memory session persistence 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 1: 1 GF install, 1 DAS, 1 Node-Agent, and 2 Instances

> Machine 2: 1 GF install, 2 Node-Agents, and 2 Instances
>
Machine 2: 1 GF install, 1 Node-Agent attached to the domain admin server running on machine 1, and 2 Instances

> The fast track to getting this to work will most likely be setting up 2 IPs on each machine,
Two IPs are not needed on each machine as only one node agent per
machine is required.
> 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.
>
Yes. And if you have solaris 10 zones, then you can have these isolated
in a zone to get the silo effect. They should still be able to talk to
each other. But I digress :)
> 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.)
>
Kedar ? :)
> 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.
>
Have you seen this ? Might be a good starting point
https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
> 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 :-).
>
I somewhat shook my head, I admit :)
> Then, we'll both benefit.
>
I hope this was useful. I am sure someone else will jump in and add more
value. We could then collate these in a wiki page for referring others
to this when questions come up in the future.
> Regards.
> [Message sent by forum member 'whartung' (whartung)]
>
> http://forums.java.net/jive/thread.jspa?messageID=222900
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>