The two most commonly used high availability (HA) cluster configurations are active-active and active-passive. What’s the difference between the two? This article gives a straightforward explanation.
Active-Active high availability cluster
An active-active cluster is typically made up of at least two nodes, both actively running the same kind of service simultaneously. The main purpose of an active-active cluster is to achieve load balancing. Load balancing distributes workloads across all nodes in order to prevent any single node from getting overloaded. Because there are more nodes available to serve, there will also be a marked improvement in throughput and response times.
The set up below, which consists of a load balancer and two (2) HTTP servers (i.e. 2 nodes), is an example of this type of HA cluster configuration. Instead of connecting directly to an HTTP server, web clients go through the load balancer, which in turn connects each client to any of the HTTP servers behind it.
Assigning of clients to the nodes in the cluster isn’t an arbitrary process. Rather, it’s based on what ever load balancing algorithm is set on the load balancer. So, for example in a “Round Robin” algorithm, the first client to connect is sent to the 1st server, the second client to the 2nd server, the 3rd client back to the 1st server, the 4th client back to the 2nd server, and so on. We’ll elaborate more on these algorithms in a future post.
In order for the high availability cluster to operate seamlessly, it’s recommended that the two nodes be configured for redundancy. In other words, their individual configurations/settings must be virtually identical.
Active-Passive high availability cluster
Like the active-active configuration, active-passive also consists of at least two nodes. However, as the name “active-passive” implies, not all nodes are going to be active. In the case of two nodes, for example, if the first node is already active, the second node must be passive or on standby.
The passive (a.k.a. failover) server serves as a backup that’s ready to take over as soon as the active (a.k.a. primary) server gets disconnected or is unable to serve.
When clients connect to a 2-node cluster in active-passive configuration, they only connect to one server. In other words, all clients will connect to the same server. Like in the active-active configuration, it’s important that the two servers have exactly the same settings (i.e., redundant).
If changes are made on the settings of the primary server, those changes must be cascaded to the failover server. So when the failover does take over, the clients won’t be able to tell the difference.