Load Balancing

Load balancing is the process of balancing the load across multiple servers in case the peak load is achieved, the load needs to be distributed across multiple servers running multiple services. The app traffic load will be distributed across multiple servers to keep the website/app running smoothly.

The traffic  WILL BE DISTRIBUTED ACROSS MULTIPLE SERVERS so that the content can be served with low latency and high availability.

Usually, the API gateway manages the load balancing in Cloudflare services as Cloudflare offers an in-built load balancer service integrated with API GATEWAY. Big Cloud vendor do provide one click load balancing solutions.

The majority of the big cloud vendors provide auto-scaling options for end users which makes scaling up so convenient. Auto scaling is triggered when the traffic hits a certain threshold.

In AWS all you have to do is configure an auto-scaling group of computing, memory, storage, and GPU, and all these instances are deployed on the physical layer which will be high-performing hardware devices.

The auto-scaling is a big win-win situation in the case of load balancing, as manual balancing can introduce scaling up latency which will result in traffic drop.

When the Network / Application traffic hits the threshold, Auto Scaling group will be activated and all the instances will Spin up, Based on the Load Balancing ALGO of choice. (8-9 widely accepted load balancing Algorithms are leveraged like round robin, weights round robin, etc. to config the load balancers).

Load Balancing is a HORIZONTAL SCALING mechanism, AUTO-SCALING group needs to be assigned in order to integrate load balancing efficiently. For vertical scaling, AUTO-UPGRADE needs to be activated.

NOTE: Load balancing will reduce downtime, outages, and latency and will ensure horizontal scalability.

THE LOAD BALANCING CAN BE CARRIED OUT :

  1. Manual Load Balancing
  2. Application layer load balancing (layer 7 load balancing)
  3. Network Layer Load Balancing (layer 4 load balancing)

Smart load balancing has 9-10 algorithms to choose from, the smart load balancers need to be configured well and hence will need constant upkeep and configuration upgrades.

Some Scalable load-balancing solutions include:

  • AWS ELB
  • Cloud Flare LB
  • F5 cloud balance.

Load Balancing is a reverse proxy in cloud distributed network. Based on the use case and business case the enterprise needs to pick the right set of load-balancing solutions for them. 

Load balancers can be categorized into 2 types based on form factor : 

  • SOFTWARE LOAD BALANCER
  • HARDWARE LOAD BALANCER

Hardware load balancing solutions like F5 are heavily leveraged and adopted by BIG ENTERPRISES. At large-scale enterprises, both the software level and hardware level load balancing solutions are integrated with application infra. 

Types of load balancing solutions: (OSI Based)

LAYER 4 LOAD BALANCING SOLUTIONS: THE NETWORK LAYER LOAD BALANCER is a Layer 4 OSI MODEL-BASED LOAD BALANCER and is based on the transport layer protocols like TCP and UDP.
LAYER 7 LOAD BALANCING SOLUTIONS: Application layer load balancers are layer 7 OSI MODEL load balancers that are operated on HTTPS/ SSL/ HTTP/ TLS/ FTP.  

ALGOS in Load Balancing: 

Static load balancing algos: IP HASH | ROUND ROBIN | WEIGHTED ROUND ROBIN |
Dynamic load balancing algos: |LEAST CONNECTION | WEIGHTED LEAST CONNECTION | WEIGHTED RESPONSE TIME | RESOURCE BASED ALLOCATION |

NOTE: Be it vertical scaling or horizontal scaling the SLA needs to be clearly defined to ensure optimized and high performance by the load balancers. The right set of load balancing optimization will result in SECURITY and DATA FLOW management. 

LOAD-BALANCING ensures Secure data flow, algorithmically programmed load balancing, server health checks, and resource utilization optimization.

The load balancing solution needs to be integrated keeping in mind the scale of infra, type of infra, and other vital factors which are documented during the requirement analysis phase of SDLC. Load balancing should be mentioned in the BRD, SRS, and TRS documents.

Diagrams

Load Balancing
Load Balancing

The article above is rendered by integrating outputs of 1 HUMAN AGENT & 3 AI AGENTS, an amalgamation of HGI and AI to serve technology education globally.

(Article By : Himanshu N)