Reputation: 1172
I have gone through several links regarding the difference between Clustering and Network Load Balancing. What I got :
Clustering: A cluster is a group of resources that are trying to achieve a common objective, and are aware of one another. Clustering usually involves setting up the resources (servers usually) to exchange details on a particular channel (port) and keep exchanging their states, so a resource’s state is replicated at other places as well.
Load Balancing: serving a large number of requests (web, VPN connections, ...) by having multiple "copies" of a server.
Now I am not sure What is the difference between ColdFusion clustering and Network load balancing?
What are the benefits of creating multiple instances in a single CF server,Cluster them and host my webapp ?
Upvotes: 3
Views: 1338
Reputation: 1069
In terms of CF the main difference between "clustering" and "load balancing" is with clustering the session scope variables, caches, etc... will be shared around the cluster so that all servers know about the sessions, etc... and can therefore answer any request but with load balancing you are simply splitting the traffic to different servers and they are not aware of each other, so things like session variables are not shared and if used for say a login process will cause the user to logged out again if they move from say Server A to Server B when making subsequent requests. In that situation you will need to implement something like "sticky sessions" on the load balancer to stop people from moving between servers.
Upvotes: 3
Reputation: 77474
Clustering is a broad, imprecise term. Anything involving more than one computer is called "clustering"; even the most trivial approaches. Which makes this a great marketing term. And there also is a data mining technique, clustering (alias of cluster-analysis), that has nothing to do with server clustering.
load-balancing for example indicates that every host is essentially doing the same thing.
failover goes a step beyond load-balancing: whereas in load balancing one could split the users (say, by the hash code of their username) and every node is only responsible for part of the users, the term failover indicates that any host may fail, and there is a node that can replace its functionality.
sharding is the opposite. It is also a type of load-balancing, but one where you split the load by some kind of key. You can of course have sharded scenarios that still support failover (at reduced performance) when you do the sharding mostly to improve caching.
cluster-computing commonly refers to distributed computation, such as computing weather models by parallel-processing. This will require interaction between hosts, whereas load-balancing of web sites usually involves only one frontend node.
Most likely, ColdFusion only supports failover style load-balancing. Every node will be able to serve every request (so any node may fail), and will only benefit mildly from sharding.
Upvotes: 1