DevOps.com

Where the world meets DevOps

  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
  • DevOps Chats
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Virtual Summits
    • Conferences
  • Sponsored Communities
    • CloudBees
  • Related Sites
    • MediaOps
    • Container Journal
    • Security Boulevard
    • SweetCode.io
    • Digital Anarchist
    • DevOps TV on YouTube
    • DevOps Chat on SoundCloud
    • DevOps Connect
    • DevOps Dozen
  • Follow Us
    • Twitter
    • Google News
    • LinkedIn
    • Facebook
    • DevOps TV on YouTube
    • Email
MENUMENU
  • AI
    • MLOps

      Cloudera Calls for MLOps Standards Initiative

      Future Innovative UX Without UI

      Designing a Future of Innovative UX, Without UI

      Testim

      Testim Adds SDK to AI-Based Testing Platform

      IBM AI

      IBM Zones in on DevOps for AI

      Virtana

      Virtual Instruments Changes Name to Virtana to Drive AIOps

  • Cloud
    • Waging a Winning WAR in AWS

      Waging a Winning WAR in AWS

      Cloud Computing Trends of 2019

      The Top Six Cloud Computing Trends of 2019

      Cloud Migration Open Source Overview

      An Overview of Cloud Migration and Open Source

      Long-Term Cloud-Native Security

      Practical Approaches to Long-Term Cloud-Native Security

      AWS machine learning

      AWS Applies Machine Learning to Optimize Cloud Deployments

  • Continuous Delivery
    • Automic CA Broadcom Release Automation

      DevOps Chats: Automic + CA + Broadcom, a Release Automation Journey

      Harness

      Harness Adds Analytics to CDaaS Platform

      Dell Boomi Dives Into DevOps

      Dell Boomi Dives Into DevOps

      Implement an Effective CI/CD Pipeline

      How to Implement an Effective CI/CD Pipeline

      CloudBees continuous delivery

      CloudBees Advances Continuous Delivery

  • Continuous Testing
    • DevOps Software Testing

      DevOps Places Software Testing in the Crosshairs

      testing

      DevOps Chats: Enterprise Continuous Testing With a Shift-Right Mindset

      Investing Mobile Device Testing Lab

      Investing in a Mobile Device Testing Lab

      IBN’s Success is Driven by Formulating the Right Test Validation Strategy

      IBN’s Success is Driven by Formulating the Right Test Validation Strategy

      Steps to Ensuring Validity of Your Business-Critical Data

      5 Steps to Ensuring Validity of Your Business-Critical Data

  • DevSecOps
    • DevSecOps Requires Teamwork Success

      Synack: DevSecOps Being Accelerated by Cultural Shifts

      Predictions 2020: The Future of the Mobile Industry

      Predictions 2020: The Future of the Mobile Industry

      DevSecOps Progress Survey

      Survey: DevSecOps Progress Remains Elusive

      Security Missing DevOps Implementations

      Why Is Security Missing in Many DevOps Implementations?

      Shifting Left – But How Far Left Do Companies Need to Go?

      Shifting Left – But How Far Left Do Companies Need to Go?

  • Leadership Suite
    • Chief Digital Officers Driving Digital Transformation

      Chief Digital Officers Driving Digital Transformation

      There's No Such Thing as an Open Source Business Model

      There’s No Such Thing as an Open Source Business Model

      IT Admins Maintain Secure Access

      How Can IT Admins Maintain a Grip on Secure Access?

      Product IT Operating Model

      The Next Frontier for Enterprises: Moving to a Product IT Operating Model

      SMBs Struggle Digital Transformation

      SMBs Struggle with Digital Transformation

  • Practices
    • IBM Z Open Editor Support Language Server Protocol

      IBM Z Open Editor Support for Language Server Protocol is a Game Changer

      Feature Flags in Code

      The Use of Feature Flags in Code: Too Many Flags?

      Benefits of Test-Driven Design

      The Benefits of Test-Driven Design

      Waging a Winning WAR in AWS

      Waging a Winning WAR in AWS

      Predictions 2020: The Future of the Mobile Industry

      Predictions 2020: The Future of the Mobile Industry

  • ROELBOB
    • Career Counseling

      Career Counseling

      symbols-n-semantics

      Symbols and Semantics

      career-opportunity

      Career Opportunity

      revision-cycle

      Revision Cycle

      opportunity-knocks

      Opportunity Knocks

  • Toolbox
    • IBM Z Open Editor Support Language Server Protocol

      IBM Z Open Editor Support for Language Server Protocol is a Game Changer

      Waging a Winning WAR in AWS

      Waging a Winning WAR in AWS

      envoy

      Solo.io Creates Registry for Extensions to Envoy Proxy Server

      Cloud Migration Open Source Overview

      An Overview of Cloud Migration and Open Source

      service mesh

      HashiCorp Advances Open Source Consul Service Mesh

  • More Topics
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » DevOps Practice » Load Balancing: Round Robin May Not Be the Right Choice

Load Balancing Round Robin

Load Balancing: Round Robin May Not Be the Right Choice

Surya BabyBy Surya Baby on November 13, 2019 Leave a Comment

Based on our experience, we believe Round Robin may not be an effective load balancing algorithm, because it doesn’t equally distribute traffic among all nodes. You might wonder, how is this possible?

Related Posts
  • PyMongo Pointers: How to Make Robust and Highly Available Mongo Queries
  • Docker Engine 1.12 is now GA and Docker for Mac/Docker for Windows is in production.
  • Bigdata – Understanding Hadoop and Its Ecosystem
    Related Categories
  • Blogs
  • DevOps Practice
  • Doin' DevOps
    Related Topics
  • Least Connections algorithm
  • Load balancing
  • Round Robin
Show more
Show less

How Does Round Robin Algorithm Work?

Round Robin algorithm sends requests among nodes in the order that requests are received. Here is a simple example.

Let’s say you have three nodes: node-A, node-B and node-C.

  • First request is sent to node-A.
  • Second request is sent to node-B.
  • Third request is sent to node-C.

The load balancer continues sending requests to servers based on this order. It makes it sound like traffic would get equally distributed among the nodes. But that isn’t true.

What is the Problem with Round Robin Algorithm?

Figure 1: Load Balancer with 2 nodes (Round Robin).

Let’s pick up a simple example: Let’s say you launched your web application with a load balancer and it has two nodes (node-A, node-B) behind it. The load balancer is configured to run with Round Robin algorithm, and sticky-session load balancing is enabled. Let’s say 200 users are using your application currently. Since the Round Robin algorithm is enabled in load balancer, each node will get 100 users requests.

Figure 2: New node added. Newly added node gets less traffic in Round Robin algorithm.

A few minutes later, you are adding node-C. Now, an additional 100 users start using the application. Since it’s Round Robin algorithm, load balancer will distribute new users’ requests equally to all 3 nodes (i.e., 33 users request to each node). But remember node-A and node-B is already processing 100 users requests each. So now node-A and node-B will end up processing 133 users requests each (i.e., 100 original users requests, plus 33 new users requests), whereas node-C will process only 33 (new) users requests. Now, do you see why Round Robin isn’t equally distributing the traffic?

In the Round Robin algorithm, the older nodes in the pool will always end-up processing more requests while newly added nodes will end up processing less amount of traffic. The load is never evenly distributed. For maintenance, patching and installation purposes, you have to continually keep adding and removing nodes from the load balancer pool. If you instrumented auto-scaling in place it gets worse, because in auto-scaling nodes are more dynamic. They get added and removed even more frequently.

What Algorithm to Use?

Figure 3: New node added. Traffic is evenly distributed in Least Connections.

There are a variety of load balancing algorithms: Weighted Round Robin, Random, Source IP, URL, Least Connections, Least Traffic, Least Latency. Given the shortcoming in Round Robin, you can consider trying other choices. One choice you may consider is: Least Connections algorithm. As per this algorithm, the node which has the least number of connections will get the next request. So, as per our earlier example, when 100 new users start to use the application, all new user requests will be sent to node-C. Thus, load will be equally distributed among all nodes.

Filed Under: Blogs, DevOps Practice, Doin' DevOps Tagged With: Least Connections algorithm, Load balancing, Round Robin

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)

Like this:

Like Loading...
Sponsored Content
Featured eBook
Global DevOps: Literally a Changing World

Global DevOps: Literally a Changing World

Faster delivery, greater security and higher quality were always aspirations for any organization creating apps. Today, through the use of agile for creation, DevOps for building and cloud for delivery, these aspirations are achievable for worldspanning apps by even small teams with tight budgets. Any application that is deployed to ... Read More
« Serverless and GraphQL: Build and Launch at the Speed of Thought
Exadel Announces New Office in Germany to Support Growing Local Tech Economy »

Top Stories of the Week

  • View DevOps.com Privacy Policy

Digital Anarchist Live

Digital AnarchistDigital Anarchist
Download DevOps.com App on Roku, Fire TV, Apple TV, Android and iOS.

Upcoming Webinars

Wed 18

2020 Testing Trends: Top Predictions for QA Teams to Watch, Join, and Lead

Wed, December 18, 11:00 am - 12:00 pm EST
Jan 15

Design Patterns for Continuous Everything

Wed January 15, 2020, 1:00 pm - 2:00 pm EST
Jan 23

Predict 2020 Virtual Summit

Thu January 23, 2020, 10:00 am - 4:00 pm EST

More Webinars

Past Webinars

Latest from DevOps.com

DevOps Places Software Testing in the Crosshairs
December 18, 2019 | Wolfgang Platz
IBM Z Open Editor Support for Language Server Protocol is a ...
December 18, 2019 | Bob Reselman
The Use of Feature Flags in Code: Too Many Flags?
December 18, 2019 | Don Macvittie
The Benefits of Test-Driven Design
December 18, 2019 | Niklas Studer
Career Counseling
December 18, 2019 | ROELBOB

Most Read on DevOps.com

Why Is Security Missing in Many DevOps Implementations?
December 12, 2019 | Farwa Sajjad
HashiCorp Advances Open Source Consul Service Mesh
December 11, 2019 | Mike Vizard
Testing Emerges as DevOps Hurdle in Mainframe Shops
December 11, 2019 | Mike Vizard
The Top Six Cloud Computing Trends of 2019
December 16, 2019 | Jay Chapel
Survey Sees Massive Adoption of Microservices
December 12, 2019 | Mike Vizard

On-Demand Webinars

DevOps.com Webinar ReplaysDevOps.com Webinar Replays

Download Free eBook

Continuous Testing: A Critical Part of the DevOps Process
Continuous Testing: A Critical Part of the DevOps Process
  • Home
  • About DevOps.com
  • Meet our Authors
  • Write for DevOps.com
  • Business Directory
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • Privacy Policy

© 2019 ·MediaOps Inc.All rights reserved.