Why Are We Still Using Round-Robin Load Balancers?

middleware team

MW Team

August 24, 2021

Why Are We Still Using Round-Robin Load Balancers?

In this post

The Round Robin Load Balancing technique is one of the most popular techniques used to serve the end-users. It is a reasonably simple way of distributing requests from clients across a bunch of servers. Here, the request is forwarded to several servers in turns. The load balancer is then instructed to go to the top of the list and repeat the distribution of requests.

Round Robin is one of the most extensively used load-balanced techniques. The reason for the same is that it is easy to create and simple to understand. The cyclic forwarding of client requests takes place, and the accessible servers are connected using this mechanism. Round Robin Server Load Balancing is known to work the best when the servers have similar computation and storage capabilities.

This is the most basic way to load balance servers or provide simple fault tolerance. Multiple identical servers are set up to deliver the same services or applications. Although they all have the same Internet domain name, they each have their own unique IP address. The load balancer keeps a list of all the unique IP addresses linked with the Internet domain name.

When requests for sessions on servers associated with an Internet domain name are received, they are assigned randomly or in a rotating sequence. For example, the first request obtains server 1's IP address, the second gets server 2's IP address, and so on, with requests resuming at server 1 once all servers have been assigned an access request throughout a cycle.

What is weighted Round robin?

The Weighted Round Robin load balancing approach is based on the Round Robin load balancing method. The network administrator assigns a pre-set numerical weightage to each server in the pool in weighted Round Robin. A weighted value of 100 could be awarded to the most efficient and powerful server. A server with half the processing capability could be given a weighting of 50, and so on for the rest of the farm's servers.

More requests are sent to servers with a higher weight. A server with a weightage of 100, for example, would receive twice as many requests as one with a weighting of 50. Alternatively, a server with a weighting of 25 will receive four times as many requests. However, requests are still assigned cyclically, with the servers with more significant weightings receiving more sessions in each cycle.

How does Round robin load balancing work?

In a nutshell, round-robin network load balancing rotates connection requests among web servers in the order they are received. Consider the following scenario: an organization has a cluster of three servers: Server A, Server B, and Server C.

  • Server A receives the first request.
  • Server B receives the second request.
  • Server C receives the third request.

According to this directive, the load balancer continues to send requests to servers. This distributes the server load evenly, allowing it to manage high traffic.

Difference between weighted Load balancing vs. Round robin load balancing

The most significant disadvantage of utilizing the round-robin algorithm for load balancing assumes servers are similar enough to manage equivalent loads. The algorithm has no method of distributing additional requests to servers with more CPU, RAM, or other characteristics. As a result, servers with lower capacity may get overburdened and fail more frequently, while capacity on further servers increases.

Site administrators can apply weights to each server based on parameters like traffic-handling capacity using the weighted round-robin load-balancing method. Client requests are distributed more evenly among servers with greater weights. Consider the following scenario: An organization has a cluster of three servers:

  • Server A, on average, can handle 15 requests per second;
  • Server B, on average, can handle ten requests per second;
  • Server C, on average, can handle five requests per second

Assume that the load balancer is bombarded with six requests.

  • Server A receives three requests;
  • Server B receives two requests; and
  • Server C receives one request. 

The load is distributed in the manner stated above in the case of the weighted round-robin algorithm.

Difference between Load balancer sticky session and Round robin load balancing

Each client will have their session object created by a load balancer that retains sticky sessions. The load balancer sends each request from the same client to the same web server, where the data is stored and updated as long as the session is active. Because unique session-related data does not need to be moved from server to server, sticky sessions can be more efficient.

On the other hand, sticky sessions might become inefficient if one server accumulates several sessions with significant workloads, disturbing the server balance.

When sticky load balancers are used to load balance round-robin style, the round-robin algorithm is utilized to route a user's first request to a web server. Following that, requests are routed to the same server until the sticky session expires, at which point the round-robin process is employed to create a new sticky session. If the load balancer is non-sticky, the round-robin technique is applied to all requests, regardless of whether they are from the same client.

Difference between Round robin DNS and Round robin load balancing 

Instead of employing a specialized hardware load balancer, round-robin DNS operates a DNS server to load balance using the round-robin technique. Each website or service is hosted on numerous redundant web servers that are usually geographically spread with round-robin DNS. For the same website or server, each server assigns a unique IP address.

The DNS server balances the load amongst the servers by rotating over these IP addresses using the round-robin technique.

Difference between Round robin DNS and Network load balancing

As previously stated, round-robin DNS is a load balancing strategy used by DNS servers. On the other hand, network load balancing is a generic word that refers to network traffic management without the use of complex routing protocols such as the Border Gateway Protocol (BGP).

Difference between lead connections Load balancing and Load balancing round robin

Load balancers use the least connections load balancing to deliver requests to servers with the fewest active connections, reducing the risk of server overload. On the other hand, round-robin load balancing rotates server requests, even if some servers have more active connections than others.

Benefits of Round robin load balancing

Round robin load balancing has the most significant advantage of being simple to understand and apply. The round-robin algorithm's simplicity is also its main drawback, which is why many load balancers utilize weighted round-robin or more complicated algorithms.

The critical advantage of round-robin load balancing is that it is straightforward to set up. However, because many round robins load balancers presume that all servers are the same: currently up, currently handling the same load, and with the same storage and compute capabilities, it may not always result in the most accurate or efficient traffic distribution.

The following round-robin versions take into consideration extra criteria and can result in improved load balancing:

Weighted round-robin - Each server is given a weight based on the site administrator's criteria; the most typical measure is the server's traffic handling capacity. The bigger the weight, the more client requests the server will receive. If server A is given a weight of three and server B is given one, the load balancer delivers three requests to server A for everyone it sends to server B.

Dynamic round-robin — Each server is given a weight based on real-time information about its present load and idle capacity.

Drawbacks of the Round-robin load balancer

There are some drawbacks of the system as well.

  • There is no built-in failure detection or fault tolerance, and there is no dynamic load balancing.
  • There is no other option except round-robin.
  • There is no way to assure that you connect to the same server twice if you need to.
  • DNS has no way of knowing if a server has gone down.
  • Cannot account for the unknown fraction of users who have DNS cached data with varying amounts of Time to Live (TTL) remaining. As a result, visitors may be directed to the 'wrong' server even if TTL expires.
  • Because DNS cannot know how much load is on the servers, the load may not be distributed fairly.
  • A public IP address is required for each server.

The round-robin load balancing technique is one of the most widely used. Even with its drawback, the pros it offers cannot be overlooked.

Share this on

Leave a Comments

Your email address will not be published. Required fields are marked *

Fasten your load balancing job
done with middleware

We use cookies on this website to ensure you get the best experience. Learn more.
Got it