Clustering refers to connecting two or more computers together such that they look like a single (virtual) machine to clients. In general, this is achieved by placing a load balancer in front of the cluster to accept client requests and distribute them across the member nodes in the cluster. Clustering is a cost-effective way to improve a website or application’s performance, reliability, and scalability using commodity hardware.
To review general information about load balancers, see Save 80% Compared to Hardware Load Balancers.
Clustering is also referred to as horizontal scaling. As demand increases, you simply add more servers to the cluster and the load balancer distributes requests across the larger group of servers. In contrast, vertical scaling requires replacing a server with a more powerful one capable of handling a higher volume of requests per second – typically an expensive approach.
In the most common configuration, all servers in a cluster host the same content and run the same applications. In this case, simple load-balancing algorithms are sufficient; one of the simplest is round robin, in which requests are distributed sequentially across the nodes in the cluster. It is also possible to cluster together different types of specialized machines and use a Layer 7 load balancer to direct traffic to the appropriate server based on the type of content requested. For example, the load balancer can direct requests for video to a streaming media server, and requests for price and inventory information to a server running a database application.
Benefits of Clustering
- Better performance – By adding more cluster nodes as needed and load balancing across them, you provide fast, accurate responses to your users’ requests for web and application data.
- Greater reliability – A cluster by definition eliminates single points of failure. When one node malfunctions, the load balancer directs requests away from it to its peers until it is back online.
- Lower cost – Clustering is a low-cost way to achieve performance and scale, because only commodity hardware is needed.
- Ease of maintenance – Nodes can be taken offline for maintenance and upgrade as necessary, even during regular business hours, because the other nodes in the cluster remain available to service requests.
How Can NGINX Plus Help?
NGINX Plus and NGINX are the best-in-class load‑balancing solutions used by high‑traffic websites such as Dropbox, Netflix, and Zynga. More than 358 million websites worldwide, including the majority of the 100,000 busiest websites, rely on NGINX Plus and NGINX to deliver their content quickly, reliably, and securely.
As a software load balancer, NGINX Plus is significantly less expensive than hardware solutions with similar capabilities. Its sophisticated load-balancing algorithms, server health checks, and other features make it ideal for use in distributing traffic across a group of servers.
To learn more about the benefits of using NGINX Plus to load balance your applications, download our ebook, Five Reasons to Choose a Software Load Balancer.