What's the difference between load balancer node roles and states, and how do they contribute to high availability?

What's the difference between load balancer node roles and states, and how do they contribute to high availability?

High Availability Published on 4 mins Last updated

Load balancers provide a range of solutions, but high availability is usually top of the wishlist. Why? Because high availability, otherwise known as 'uptime', guarantees that applications (and the critical services they deliver) stay up and running.

But how is high availability configured? And what have load balancer states and nodes got to do with anything...?

Ensure high availability with load balancers

Critical applications are deemed critical for a reason, so downtime or service disruption for end users is more than just an inconvenience. But how can business continuity be protected when maintenance, ransomware attacks, and server overload all threaten to disrupt?

The answer is by configuring those applications for "high availability", ensuring services continue to be delivered; even in the event of server downtime. For that to be achieved, a pair of load balancers is required.

The HA pair

Load balancers are essential for distributing traffic across multiple backend servers. But to do this, they need to be deployed in what's called a High Availability (HA) clustered pair.

In a clustered pair, two load balancers are grouped together to play similar, but distinct roles. One of these will be the 'Primary' load balancer, while the other will play the role of 'Secondary' load balancer.

It's important to understand the differences in order to set up a reliable, high availability configuration on your load balancer!

How to avoid a single point of failure
We get a lot of customers asking to buy a single load balancer. Understandably. One is cheaper than two. But here’s why you might want a pair.

Load balancer node roles: Primary vs. Secondary

A load balancer node is the physical or virtual server which runs the load balancing software that intelligently distributes the application traffic.

In an HA clustered pair, each appliance in the cluster will have one of two key roles:

1. The Primary node/appliance

The Primary node is the appliance assigned the primary role in the high availability pair.

The Primary node contains the primary settings for load balancing, such as the Virtual Services’ IP addresses and all associated configurations. Hence, this is the node on which users make all their configuration changes to the Virtual Services.

It's also the node that assumes the Active state by default.

2. The Secondary node/appliance

The Secondary node, as the name suggests, is the appliance that assumes a secondary role.

While it might start in a Passive state, that doesn't mean it's incapable of becoming Active.

It's ready to step in as the Active node if/when the Primary node (appliance) encounters issues.

The Secondary node's configuration mirrors the Primary node to ensure a smooth transition when it takes over.

What's the end result?

Having a Primary and Secondary appliance in a clustered pair provides redundancy and resilience for critical applications by removing the single point of failure.

So even if the Primary node or appliance fails, the Secondary node can take over, achieving high availability of the application.

Load balancer node states: Active vs. Passive

A load balancer node state is essentially a specific set of tasks within the load balancer appliance that tells the load balancer what operational role it needs to perform and therefore how to distribute the incoming traffic from the user or the application server.

There are usually two types of nodes or 'roles' that a load balancer might perform for high availability:

  1. Active, or
  2. Passive.

Active node: Distributes traffic

The Active node in a high availability load balancer pair is the one that handles traffic distribution. This means it is responsible for intelligently routing incoming requests to a pool of backend servers. In essence, it is the 'workhorse' that balances the load being routed to the available servers in a pool.

Passive node: Waits in the wings

Conversely, the Passive node remains on standby, ready to take over if the Active node encounters any issues. While it doesn't actively route traffic, it constantly monitors the health and status of the Active node and stands ready to assume the Active role should the need arise.

The Passive node is crucial for maintaining uninterrupted service in case of a failure or during maintenance.

What is important is to note that the state of a node (whether Active or Passive), can change dynamically based on the health and availability of the nodes.

If the Active node encounters problems or becomes unreachable, the Passive node will automatically transition to the Active state to take over traffic distribution.

When does a Passive node become Active?

The Passive node automatically takes over load balancing responsibilities if the Active node becomes unavailable for any reason.

This process is called failover, and ensures continuous service without manual intervention.

The difference between node states and roles

It is essential to highlight that a node's state is NOT necessarily the same as the node's role.

The Active node doesn't always have to be the Primary node. The Primary node is merely the one designated as the primary for configuration purposes.

The dynamic nature of high availability load balancers means that a Secondary node can become the Active node, and vice versa.

In summary:

  • Load balancer node roles are configured and remain constant
  • Load balancer node states change based on variables such as health and availability

Conclusion

It is important to understanding the difference between node states (Active and Passive) and roles (Primary and Secondary), and how together they both contribute in their own unique ways to achieving high availability.

This knowledge helps System Admins configure their load balancers effectively, ensuring uninterrupted services. It also helps them more effectively communicate to others any issues they may be experiencing with their load balancers.

Further reading

Need help configuring your HA pair?

Speak to one of our technical experts