AWS ELASTIC LOAD BALANCER

Scenario :

During sale, there will be high traffic at peak hours servers will crash which leads to business loss. So we need to upgrade the instance again we need to stop the server and again leads to loss. We can add more servers instead of stopping but by creating more number of servers , Many IP will generate and for end users which will get confused to choose proper IP address.

    • And all the end users will will require a mediating software named as Load balancer. In AWS we have concept called AWS Elastic Load Balancer.

    What is AWS ELB

    • ELB stands for Elastic Load balancer.
    • It distributes incoming traffic to multiple targets such as instances, containers, lambda function, IP address etc.
    • It spans in single or multiple availability zones.
    • It provides high Availability and Reliability and Security for the application.
    • Load balancer will continuously check the availability of back-end servers “Heart beat Condition”.
    • load balancer will works on Round Robin Algorithm means it continuously splitting the request among servers in a round format .

    OSI MODEL :

    Application layer L7:

    if the client forwarded the http request first it goes to Application layer L7.

    Presentation layer L6

    And It will check as the request is secure or un secure request here SSL/TLS Typically encrypt the request Presentation layer L6.

    Session L5

    It will check what kind of request and at what time and what it requires all the details will be stored in here between client and server.

    Transport L4 :

    Here the request is seperated into small packets to the server and responce get backi in small packets to client.

    Network Layer L3 :

    Here the small packets of request goes to multiple routers.

    Before it reaches to server the request has to reach the switches.

    Physical Layer L1 :

    Here the request has go to the physical switches and the wires were connected to servers.

    Types of Elastic Load balancer :

    Application load balancer:

    • It is best suited for load balancing of the web application and websites.
    • It routes traffic to targets based on the content of request.
    • It works on Layer 7 supports HTTP and HTTPS request.

    Network load balancer:

    • It is best suited for applications which required high ultra performance like gaming application.
    • It works on layer 4 and supports TCP and UDP.
    • NLBs distribute traffic based on network conditions. For example, if you have multiple database servers with duplicate data, the NLB routes traffic based on predetermined server IP addresses or server availability.

    Gateway load balancer:

    • It is like other load balancers but it is for third party applications.
    • It is used for security and network analytics and similar use cases.
    • It works on layer 3 and layer 7 of OSI model.

    Listeners:

    A listener is a process that checks for connection request using protocol and port that you configured. protocol should be same for both load balancer and back-end servers.

    Target groups:

    • It is the destination of ELB .
    • Different target groups can be created for different types of requests like Instance, IP,Lambda etc.

    Health Checks:

    • Health checks will be checking the health of targets regularly and if any target is unhealthy then the traffic is not sent to that target.
    • we can define the number of consecutive health checks failure then only the load balancer will not sent the traffic to those targets.

    Limitations:

    • Load balancer and back-end servers should be in same region.
    • Different Availability zones is possible can be called as Cross Zone load balancing.