provides software and services that enable enterprises
Live Chat 1-888-673-6564
The Enterprise Open Source Blog
  • Home
  • Search
  • Contact Us
  • Products and Support
  • Services
  • Enterprise OSS Blog
  • Wazi Technical Blog
  • Resources Library
  • Cloud Services
  • Partners
  • Customers
  • Community
  • Company
  • Careers
  • News and Events

Subscribe by Email

Your email:

Most Popular Posts

  • Enterprise Apache Tomcat 7 Clustering - Designing an Efficient, Reliable and Productive Application Server Cluster
  • Open Source Virtual Whiteboards and Dimdim Review
  • An Enterprise Apache Tomcat Clustering Guide
  • Supporting CentOS In The Cloud With Windows Azure
  • VLC License Change: A lesson in perseverance
  • An In-Depth Look at Tomcat’s Clustering Mechanisms
  • Apache HTTP Server: New Features for Version 2.4
  • Why Closed Source is Better Than Open Source
  • Access Serial Ports through Ruby
  • Building Bots With Kids

Current Articles | RSS Feed RSS Feed

An Enterprise Apache Tomcat Clustering Guide

Posted by Andrew Carr on Fri, Aug 03, 2012
  
Email This Email Article  
Tweet  
  

What are your options?

In determining your configuration you must evaluate the resources at hand.  This section will discuss possible options for your resources, without actually taking your resources into consideration. The next section will make suggestions as to which configurations your company may leverage depending on the resources available.

Vertical / Horizontal / Hybrid Clusters

A “Vertical” cluster expands vertically.  A “Horizontal” cluster expands, you guessed it, horizontally.  What does this mean?  A vertically expanding cluster has limited horizontal layout.  Horizontal layout would be multiple systems / resources.  A vertical cluster is on a single machine.  (A machine can be many things, including a physical device or a virtual host.)  As need increases, Tomcat instances are spawned on the same machine, using configuration tweaks that allow multiple instances to run on the same system. 

A horizontal cluster contains Tomcat instances running on separate machines.  If demand for processing increases and you had a pure, horizontal cluster configuration, the network technician (or you) would install a new machine, virtual or physical, and on that machine is a new Tomcat instance.  What is on the Tomcat instance is discussed in the next paragraph. 

Real life is often very different from dictate.  Companies rarely have a pure “Horizontal” or “Vertical” cluster configuration.  Most systems are hybrids.  A hybrid cluster is a mixture of vertical and horizontal clustering to facilitate a specific need and/or to match the hardware provided. 

Homogeneous / Heterogeneous

Is your setup going to be for multiple applications, or just a few, or maybe just one?  Do you have applications that require specific hardware?  This determines whether or not you decide to use a heterogeneous vs. homogeneous setup.  While this section defines your options, the next section will help you decide which option suits your needs.

A homogeneous setup is very common.  Companies will often duplicate their Tomcat environment, launching servers on many devices with a simple copy of the Tomcat directory.  A Tomcat cluster that has the same web applications deployed on all nodes is considered homogeneous. 

Homogeneous setups can be hard to keep truly identical.  Sometimes, especially after node failure and replacement, it can be hard to synchronize the Tomcat instances.  The best way to do this is to create an image of the Tomcat setup from a node designated as the “primary” node.  As long as this image stays up-to-date you can distribute it over as many Tomcat setups as you prefer.

Load balancing

Load balancing happens outside of the Tomcat cluster.  The broad scope of load balancing will not be touched in this document.  We are concerned with Apache Httpd server and the built in load balancing / gateway features, as this is free and available, and because of this, it is a common solution in many enterprise systems. 

To use Apache Httpd as a load balancer we will configure it as a gateway.  Once it is aware of it’s “nodes”, it is able to balance traffic across these nodes.  In part 3 of this blog we will show an example configuration, using mod_proxy_ajp, of a Httpd gateway with “Round Robin” load balancing.

Another common enterprise configuration option for load balancing is the hardware load balancer.  A hardware load balancer (HLB.) performs the same tasks as a software balancer (like the one in the Apache Httpd server.)  The main difference between a software balancer and a hardware balance (besides price,) is resources.  A HLB. has dedicated hardware resources (RAM, Processor, Network adapters, etc..)  This allows hardware balancers to perform at a much more efficient rate, while providing more features.  This is also an infinitely more expensive method, as you can find many free Open Source load balancing solutions.

What options fit my organization and our available resources?

As you can see from this blog, there are many factors in determining your cluster configuration.  When choosing how to configure your cluster you must examine the resources available.

Scalability

How do you choose your scalability options?  This relies heavily on the availability of hardware resources.  For instance, you have 4 low end servers, meaning they have 1 processor with 1 - 4 gigabytes of RAM.  This would be an ideal situation for a “Horizontal” cluster. Each member of the cluster would be able to run 1 instance of Tomcat efficiently.  One of the servers could be used as a balancer running Apache Httpd server.  Here is a drawing of the architecture.

Apache Tomcat Cluster

If your situation was a bit different, and you had better servers, you could consider a hybrid cluster.  If there are servers available with 2 or more processors and a large amount of ram (8 gigabytes or more) this would be ideal for multiple Tomcat instances.  In this configuration you can setup a hybrid cluster by running multiple instances of Tomcat on multiple machines, and multiple instances of Apache Httpd to handle the load of load balancing.  This configuration could look something like this:

Apache Tomcat Clustering Guide

Heterogeneous / Homogeneous Tomcat Configuration

Determining heterogeneous vs. homogeneous setup can be simple in some situations.  The easiest situation is one with a single web application.  If there is only one application to deploy, you deploy it to all members in the cluster.  This is a very straightforward homogeneous configuration.

Unfortunately most companies do not have one single web application, however, this situation is not overly complicated, unless the company has an extremely large number of applications.

The division of your applications over Tomcat nodes will be your choice.  The Tomcat configuration of the nodes will be a little more complicated and we will discuss this in part 3 of the blog.  If the company has an application that requires heavy processing and large amounts of ram (HPR1,) you can setup this application on two nodes by itself.  After this, take the remaining applications (GUI) and place them on two different nodes in the cluster.  This will prevent the GUI application from being bogged down when HPR1 is consuming the CPU and RAM.  This cluster might look like this:

Apache Tomcat Clustering Guide

Conclusion

There are many things to take into consideration when designing and building your cluster.  If a large company is relying on you to provide a reliable, highly available application implementation, clustering / load balancing is the right choice.  If you are new to clustering, or an old hand, purchase a support contract.  There are companies that will provide Open Source Software support for a nominal fee.  Companies like OpenLogic provide 24x7 support for your Tomcat and Apache Httpd configuration.  This will allow you to offer your customers an extremely reliable, available service while at the same time, providing someone to turn to if you run into problems.

41261016-7b22-4e3f-a89d-803dbea2c57a

Follow @openlogic
Follow @OSCloudServices

This work is licensed under a Creative Commons Attribution 3.0 Unported License
Creative Commons License.
Tags: Open Source Management, DevOps, Support

Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Loading...
Error sending email
Email sent successfully

Email article
Email To : 
Your name : 
Message : (maximum 200 characters)

Enterprise OSS Blog Policy

If you read a post on The Enterprise OSS Blog, please leave a comment. Let us know what you think, even if it's just a few words. Comments do not require approval, but they are moderated.OpenLogic reserves the right to remove any comments it deems inappropriate.

 

click-to-chat-with-a-live-open-source-expert

get-a-quote-on-support

download-the-support-evaluation-kit

schedule-a-deep-discovery-demo

Most Popular Posts

  • Enterprise Apache Tomcat 7 Clustering - Designing an Efficient, Reliable and Productive Application Server Cluster
  • Open Source Virtual Whiteboards and Dimdim Review
  • An Enterprise Apache Tomcat Clustering Guide
  • Supporting CentOS In The Cloud With Windows Azure
  • VLC License Change: A lesson in perseverance
  • An In-Depth Look at Tomcat’s Clustering Mechanisms
  • Apache HTTP Server: New Features for Version 2.4
  • Why Closed Source is Better Than Open Source
  • Access Serial Ports through Ruby
  • Building Bots With Kids

Connect With Us!

Browse by Tag

  • 2013 (2)
  • Agile (1)
  • Apache (2)
  • apache tomcat (1)
  • AS 7 (1)
  • as7 (1)
  • Auditing (5)
  • Azure (2)
  • Budget (1)
  • BusyBox (1)
  • CentOS (3)
  • Closed Source Software (1)
  • cloud (4)
  • clustering (1)
  • CMS (1)
  • Code Scanning (1)
  • commercial distribution (1)
  • Community (4)
  • compliance (39)
  • C-Suite (1)
  • Database (1)
  • developers (2)
  • DevOps (15)
  • Drupal (1)
  • enterprise software (2)
  • foss (5)
  • Gitbhub (1)
  • Governance (36)
  • guide (1)
  • Hadoop (2)
  • HBase (2)
  • http 2.4 (1)
  • httpd 2.4 (1)
  • Java (1)
  • javascript (1)
  • jboss (3)
  • JBoss Cluster (1)
  • Joomla (1)
  • Legal (21)
  • Legal & Compliance (62)
  • Legal and Compliance (2)
  • license compliance (1)
  • Licenses (12)
  • Linux (4)
  • lisp code (1)
  • martin fowler (1)
  • Mobile (3)
  • mod_cluster (2)
  • MySQL (1)
  • Neal Ford (1)
  • open source (19)
  • open source compliance (1)
  • open source components (1)
  • open source events (1)
  • Open Source Governance (2)
  • open source legal issues (1)
  • Open Source Licensing (3)
  • Open Source Management (38)
  • Open Source Policy (3)
  • open source software (15)
  • Open Source Software Adoption (4)
  • open source software policy (1)
  • Open Source Training (1)
  • Open Source Trends (337)
  • Open Source vs. Commercial Software (3)
  • OSS (5)
  • OSS Packages (2)
  • PaaS (1)
  • paredit (1)
  • picketlink (1)
  • Policy (4)
  • PostgreSQL (1)
  • Presentations (1)
  • Programming (2)
  • red hat (1)
  • RHEL (1)
  • Ruby (1)
  • Scanning (27)
  • Scanning & Governance (12)
  • Scanning & Provisioning (30)
  • Security (13)
  • Shibboleth (1)
  • software compliance (1)
  • Software Development (2)
  • Software Development Lifecycle (7)
  • software infrastructure (1)
  • Solr (1)
  • Support (48)
  • Support & Services (2)
  • SUSE (1)
  • Technical Governance (1)
  • The Cloud (35)
  • The C-Suite (2)
  • tomcat (4)
  • Training (9)
  • Ubuntu (1)
  • Uncategorized (69)
  • Windows (1)
  • Windows Azure (1)
  • Wordpress (1)
  • Zookeeper (1)
Home | Search | Contact Us | Products and Support | Services | Enterprise OSS Blog | Wazi Technical Blog | Resources Library | Cloud Services | Partners | Customers | Community | Company | Careers | News and Events
Products
OpenLogic Exchange (OLEX)
License Compliance Module
OSS Discovery
OSS Deep Discovery
OpenUpdate
Services
Open Source Support
CentOS Support
Scanning & Compliance
Open Source Training
Professional Services
Solutions
Support & Indemnification
Open Source Governance
Open Source Scanning
Open Source Provisioning
Consulting & Training
Contact Us
1-888-673-6564


© 2013 OpenLogic, Inc. All rights reserved.
Site Map  |  Privacy Policy