Is ColdFusion Clustering Relevant & Beneficial? - Yes
Posted by Mike Brunt at 7:19 AM
0 comments - Categories: Web Servers | ColdFusion | JRun-J2EE
After I explain that ColdFusion clustering does not cluster the external web server, clients, understandably are perplexed and wonder what good ColdFusion clustering is to them. Because, with only a single web server, even with multiple ColdFusion instances (servers) clustered which the external web server is pointing to, if the external web server fails, there is still that single point of failure. This is totally true, the external web server (IIS, Apache etc) needs to be clustered, for high availability (HA). Clustering delivers two benefits, in order or importance:
1/ High Availability/Redundancy: Eliminating the single point of failure, this will always be the main reason for clustering and once we go from 1 instance/server/switch/router etc to 2, we have achieved a truly quantum leap. Adding additional pieces of equipment, beyond 2, gains little if anything in terms of improved HA.
2/ Load Balancing: Here we are spreading the request load across more than 1 instance/server/switch/router etc in order to improve performance. Adding more than 2 in load balancing situations will give you more or less a linear growth, in capacity.
So, is there any benefit to having ColdFusion instances clustered? The answer is definitely, yes. Here are the things we have helped clients with by clustering ColdFusion multiple instances, in order of the most benefit first.
- JVM Resources (on 32 bit machines in particular) - Due to contiguous memory limitations on 32 bit operating systems we can effectively only set the maximum heap size to 1.2GB, setting it higher can cause instability. By creating multiple instances and clustering them we gain access to more system resources, in this case each instance can have 1.2GB. Obviously we have to pay attention to overall RAM on the system but in most cases we could at least double our resource availability by clustering ColdFusion instances. We also recommend that the Round Robin with Sticky Sessions algorithm be used and Session Replication be avoided.
- Slow Running Code - Sometimes there is code in an application that runs infrequently and for some reason cannot be re factored but which causes slowness whenever it is running, examples might be calls to external services which always run slow. Having two or more instances clustered can mitigate this to a certain extent as if this is infrequently running code the chances of impacting every user on your site is reduced. As a note point, the best way to deal with this situation is to encapsulate it into its own instance(s).
These are good reasons to use clustering in ColdFusion and we wrote a paper for Adobe on how to install ColdFusion Enterprise and cluster it.
Should you require assistance to cluster ColdFusion please feel free to contact us.