4 July 2013

GlassFish 4: Features for High Availability

The main objective of a highly available system is to minimize downtime. As a brand new major release, and the only Java EE 7 application server currently available, does GlassFish 4.0 provide you with what you need from a reliable server?

Glassfish 4.0, as an open source release, provides early access to clustering features, with a fully tested feature set available from version 4.1, so clustering should not be seen as a supported feature in version 4.0. In reality, this makes little difference, since the open source release isn’t supported by Oracle anyway! The good news is that version 4.0 (including clustering) is fully supported by C2B2!
In practical terms, setting up a GlassFish 4 cluster is configured the same way as in version 3.1.2. GlassFish follows the same model for clustering as many other application servers, so the key concepts should be familiar to a lot of people.

The Domain Admin Server (DAS) manages the cluster and provides a graphical admin console to create configure server instances. Physical machines are called Nodes and the DAS is, as you might guess, on the Administration Node, which can also host other cluster instances. GlassFish clusters scale up by adding more instances to nodes and out by adding more nodes.

Session Replication

If the objective for a highly available system is to accept that unplanned failures and downtime happen and mitigate the impact, then part of that impact is the loss of session data for your customers.

Since, as I’ve mentioned, clustering in 4.0 is officially only an early access feature, the alternative to native session data management is to store your sessions in a distributed cache, like Ehcache or Memcached.

Taking advantage of the high availability features of a distributed cache means that you no longer have to worry about managing your session data, since it’s always available in the cache.

Early access feature or not, GlassFish 4 clusters still provide session persistence through failover of distributed HTTP session data and stateful session bean data.

This failover is accomplished by in-memory session replication with clustered server instances, so if you are using session persistence with a load balancer, you'll need to enable sticky sessions (session affinity) to make sure no data is lost or sent to the wrong server. One such load balancer that can be configured like this is the GlassFish Loadbalancer plug-in...

Load Balancing

GlassFish's Loadbalancer plug-in is a separate ZIP distribution to be installed after the server has been installed and configured with your chosen web server. It's compatible with the Oracle iPlanet Web Server, Oracle HTTP Server (OHS), Apache HTTP Server, and Microsoft Internet Information Server (IIS), but it is only available for Oracle GlassFish customers - open source users will have to look elsewhere!

Fortunately, as in previous releases, Glassfish 4 supports the AJP protocol, so configuration is as easy as ticking the box to enable the JK listener on any new or existing HTTP listener.

Your web server can then be configured to forward AJP requests, commonly with Apache and mod_proxy, which is bundled with the web server, or mod_jk.

So, is GlassFish 4.0 Ready for Prime Time?

That is, quite literally in some cases, the million dollar question. As with any part of your middleware stack, the features and benefits you get out of it is directly proportional to the time you invest in understanding it and making it work for you.

Can you use GlassFish 4.0 as the foundation for a highly available infrastructure? Without a doubt - providing your risk analysis is comprehensive and your failure plans are fully tested regularly!

1GlassFish 4: Getting Started Wednesday, June 26, 2013 5:00 PM BST
GlassFish 4 has just been released. Now you can test and deploy your JEE7 applications. This webinar will demonstrate taking the latest GlassFish release and installing and running it on a production server.

Watch here: http://www.c2b2.co.uk/glassfish_4_getting_started
In this webinar we will explore the high availability features that come with GlassFish 4 and demonstrate setting up a GlassFish 4 cluster.

Video coming soon

In this webinar we will demonstrate some of the features of GlassFish 4 our expert 24/7 GlassFish support team use for troubleshooting, performance tuning and monitoring of production GlassFish environments.

Register here: https://www4.gotomeeting.com/register/129052543

4. GlassFish 4: Migrating to GlassFish, Tuesday, July 16, 2013 5:00 PM BST
In this webinar we will explore the gotchas you might encounter when migrating your JEE applications onto the latest GlassFish release.

Register here: https://www4.gotomeeting.com/register/495563015

If you enjoyed this post, why not subscribe to our feed?

Enter your email address:

No comments :

Post a Comment