What is Load Balancing?

What is Load Balancing?, In Load Balancing technique any incoming network traffic is distributed across the servers of a cluster very efficiently. It increases the availability of an application during high traffic. A “load balancer” acts as a traffic cop sitting between client and server. It routes every incoming request to the backend servers or a cluster based on various efficient algorithms.

Architectural Diagram of Load Balancing in AWS

architectural-daigram-for-ASG

Load Balancer 

A “Load Balancer” is responsible for manage the incoming traffic over the application. It routes the incoming requests to Auto Scaling groups based on some parameters and Listeners. The “load balancer” also maintain the sticky session and cookies.

Inbound

Any request coming from remote host to the AWS instance will interact with AWS security firewall first. if we have defined the Inbound rules for the remote host then only security Groups will allow that host to reach to the AWS instance. As shown in the diagram the host 172.31.1.2 is registered in inbound rules.

Outbound

Any request going outside the AWS security groups is not allowed by AWS firewall. You can write outbound rules to connect with other networks, only then you can reach outside the AWS network.

Auto Scaling Group

An Auto Scaling group is a collection of EC2 instances that have exactly same configurations. You can write policies for increasing and decreasing the number of running instances in an “Auto scaling group”, based on few factors like CPU utilization, number of incoming request or downtime. The main service of an auto-scaling group is to maintain the number of instances automatically. Auto-scaling performs up-scaling as well as downscaling in the group.

RDS

This is a relational database Instance which also belongs to the same security groups and follows firewall rules.

Request Flow

  1. When a request reaches to the Load Balancer after passing the all the inbound rules, load balancer validates the session.
  2. If the session is alive, the load balancer sends the request to that instance of Auto scaling group which is maintaining this session.
  3. If the incoming Request is a new request load balancer will check the capacity and load of each instance of Auto Scaling group and route the request to the least loaded instance.
  4. Auto Scaling instance will perform the RDS operations and sends back the response to the load balancer.
  5. The load balancer will check outbound security rules and sends back the response with a sticky session cookie.

we are open to any suggestion because it can improve a bit more. ww.ease2code.com

Comments

  1. Rebecca Newton says:

    I came across your What is Load Balancing website and wanted to let you know that we have decided to open our POWERFUL and PRIVATE website traffic system to the public for a limited time! You can sign up for our targeted traffic network with a free trial as we make this offer available again.

Speak Your Mind

*