GlassFish/SJS AS in production - which bundle, which profile, ...?

You may have heard it before, GlassFish v2 is a single bundle (no more "Editions"). So why bother writing a post about this? Well, the reality is a little more complex.

First you need to choose between the GlassFish v2 bits (simple ANT-based installer) from java.net and the SJS Application Server 9.1 (more polished installer). Both end up installing the same JARs (see this FAQ entry for more on the differences between the two approaches). As explained in this previous post, you should be using SJS Application Server 9.1 bits for patches to be applicable.

Profiles in GlassFish v2 are "developer", "cluster", and "enterprise". The difference between the first two is pretty much self explanatory. The "enterprise" profile is mainly related to the use of HADB (highly available and distributed database) and a different keystore. Note that HADB is not open source (more on its relevance later). Here are the other main differences:

You can have any profile in production, including "developer". In that case, you should probably tune GlassFish (default tuning is done for developers) and certainly remove the fast startup:
<jvm-options>com.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>

The GlassFish bits provide support for the "developer" and "cluster" profiles. Chose between the two at install-time (setup.xml or setup-cluster.xml) or upgrade using the "Add clustering" web admin action to a "developer" instance. There is no "entreprise" support in GlassFish bits.

The SJS Application Server 9.1 bundles provide the choice between Application Server 9.1 and Application Server 9.1 with HADB. The first one is roughly the equivalent of the glassfish bits from java.net (with no setup.xml, use asadmin create-domain instead). The second one contains HADB.

The difference between "cluster" and "enterprise" really boils down to the technology used for replicating data to provide high availability. The first one uses in-memory replication based on the Shoal framework while the second one uses HADB. This is a trade-off between degradation and availability:
• "cluster" is providing availability (not sure how many 9's, but that's clearly less than 5) with a very reasonable performance degradation (depending on your session size and application obviously).
• "enterprise" is 99.999% available, but performance can be less than half what it is without any data replication.

The other important thing to note here is that the "cluster" profile is very easy to setup while "enterprise" does require installing and administering HADB nodes.

Once you have either "cluster" or "enterprise" profiles in place, you simply need to :
•  Deploy your application with availability-enabled=true
•  Make sure the application is deployed with the <distributable/> element in web.xml

One question I often get is "What if I want clustering and load-balancing, but no data replication"? This can be achieved by using the "cluster" profile and deploying without the above two steps. In that case, load-balancing can still happen (using GlassFish's software load-balancer) or any external one with a sticky behavior - sessions live on only one instance and users are always redirected to this instance. If the instance fails, all associated sessions are lost. A great deal of applications can live with that.

If you'd like to hear more about clustering with GlassFish, the freshly released episode #003 of the GlassFish Podcast is an interview with Shreedhar Ganapathy.

Comments:

Excellent entry!

One obvious thing I'd suggest is to include and widely publicize the custom profile. This is well documented at:
http://wiki.glassfish.java.net/attach/GlassFishV2AdminRelatedOnePagers/gfv2-profiles-arc.html

This leverages the "standard" XSLT technology for you
to create a configuration of your interest. I wanted to
extend it to default-web.xml. This is captured in Issue
Tracker issue no: 3802 - https://glassfish.dev.java.net/issues/show_bug.cgi?id=3802
which is not approved for UR1.

Posted by Kedar Mhaswade on novembre 13, 2007 at 08:32 AM CET #

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

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
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
Blogroll

No bookmarks in folder

News

No bookmarks in folder