Screencast #34: GlassFish 3.1 Clustering, High Availability and Centralized Administration

Two main themes of GlassFish 3.1 are: High Availability and Centralized Administration. This screencast demonstrates how to create a 2-instance cluster on a single machine using web-based Administration Console, deploy the canonical clusterjsp application, and show session fail-over capabilities in GlassFish 3.1.

From download to testing an application with high availability ... all in under 10 minutes ... enjoy!

A future screencast will show how to create multiple nodes on different machines, with 1 or more instance on each node, and all of them front-ended with a load balancer.

Technorati: screencast glassfish clustering highavailability

Comments:

Really great screencast, almost can't wait for the next one.

Posted by Kenneth Mark on November 18, 2010 at 02:37 PM PST #

What happened to the node agent process?

In a multi machine cluster, will there be a node agent?

Posted by Fernando Lafora on November 21, 2010 at 11:45 PM PST #

Hi Fernando
The 3.1 release will not have the need to have a node agent process running.

For multi machine configurations, GlassFish will require a SSH setup to be pre-configured in order to have the same ease of use as the Node Agent process.
This wiki page has details on the SSH setup.

http://wikis.sun.com/display/GlassFish/3.1SSHSetup

Posted by Shreedhar on November 22, 2010 at 12:03 AM PST #

Arun - Can you please also post the sample jsp application code that you run to verify the cluster running... thank you.

Posted by suresh on November 24, 2010 at 09:12 PM PST #

Suresh,

The application is already linked above, here is the link again:

http://blogs.sun.com/arungupta/resource/glassfish/clusterjsp.zip

Posted by Arun Gupta on November 30, 2010 at 07:44 PM PST #

Great Info, just what we were looking for, I have a question about caching in GlassFish. We are currently using caching, how will this clustering affect it. Will the cache be replicated to the other instances or do we have to turn cache off. Thanks in advance!

Posted by adrian yao on December 13, 2010 at 05:59 PM PST #

Cool stuff!

Is there any way to cluster a MySQL JDBC connection (eclipse link) together with this?

We're running a Jersey REST service on GF3 and looking into ways to increase availability.

The only way I can think of right now is to turn of all caching for the JDBC and have a separate MySQL clustering setup somehow.

As you might see from my question I'm totally new to any form of clustering. Basically I just want a nice clean and easy way to to this (wishful thinking?).

Appreciate if you can point me in the right direction, and looking forward to the next episode of the screen cast!

Posted by Oskar Hagberg on December 13, 2010 at 06:11 PM PST #

Adrian,

How and what are you caching ? 3.1 only has HTTP session replication and other replication needs to be manually configured.

Oskar,

Try to gather more details on your scenario and will get back to you.

Posted by Arun Gupta on December 14, 2010 at 09:44 AM PST #

@Oskar : There is one pool per instance ie., the connections are not shared across instances in the cluster.
eg: If there is a pool with max-pool-size=32, for a 2 instance cluster, 2 connection pools will be created each one at the instance and each can serve upto 32 connections.

One of the options is to make the database cluster enabled.
eg: MySQL cluster.

So, clients (eg: connection-pool in application server) can access the clustered database transparently.

You can refer :
http://www.mysql.com/products/cluster/

Posted by Jagadish on December 14, 2010 at 12:21 PM PST #

Post a Comment:
Comments are closed for this entry.
About

profile image
Arun Gupta is a technology enthusiast, a passionate runner, author, and a community guy who works for Oracle Corp.


Java EE 7 Samples

Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today