What is Amazon Elastic Load Balancer? : Benefits and Special Features with REAL-TIME Examples
What is Amazon Elastic Load Balancer ACTE

What is Amazon Elastic Load Balancer? : Benefits and Special Features with REAL-TIME Examples

Last updated on 28th Dec 2021, Blog, General

About author

Pramoot Prakash (AWS Cloud Architect )

Pramoot Prakash is an AWS Cloud Architect Senior Manager and has 8+ years of experience in controlling cloud-based information and cloud-Architect inside the process of making hardware and software recommendations, and handling audit logs, AWS Cloud trial.

(5.0) | 19478 Ratings 1077

Elastic Load Balancing (ELB) is a load-balancing service for Amazon Web Services (AWS) deployments. ELB automatically distributes incoming application traffic and scales resources to meet traffic demands. ELB helps an IT team adjust capacity according to incoming application and network traffic.

    • Introduction to Elastic Load Balancer
    • How Does an Elastic Load Balancer Work?
    • Does Avi Offer a Elastic Load Balancer?
    • Types of Elastic Load Balancers
    • Creating an Application Load Balancer
    • Why Elastic Load Balance
    • Use of Elastic Load Balancer
    • AWS Elastic Load Balancing Components
    • Benefits Of Elastic Load Balancer
    • Conclusion

    Subscribe For Free Demo

    [custom_views_post_title]

      Introduction to Elastic Load Balancer:

      Elastic load balancing measures traffic to an application as demand changes over time. It also scales load balancing instances automatically and on-demand. Since Elastic Load Balancing uses request routing algorithms to distribute incoming application traffic across multiple instances or scale them as needed, it increases the fault tolerance of your applications.


      An Elastic Load Balancer (ELB) has the ability to automatically scale load balancers and applications based on real-time traffic. Because of its elasticity, it is usually implemented as a software load balancer. It uses system health checks to locate application pool members (application servers) and route traffic appropriately to available servers, manage failover for high availability targets, or automatically add additional capacity. spin-up.


      Subscribe For Free Demo

      [custom_views_post_title]

        How Does an Elastic Load Balancer Work?

        Elastic load balancing measures your load balancer as the traffic on your server changes. It automatically routes incoming application traffic to the instance. The Elastic Load Balancer acts as a point of contact for incoming traffic, and by monitoring the health of the instances, the Elastic Load Balancing Service can forward traffic requests to healthy instances.


        Does Avi Offer a Elastic Load Balancer?

        Yes. The AV Vantage Platform features a 100% software elastic load balancer that can scale automatically through the application performance monitoring capabilities built into the AV Vantage Platform. With on-demand scaling of load balancers and the ability to trigger scaling of backend application servers through ecosystem integration with the orchestration platform, AV Vantage provides a superior end user experience. By automatically scaling up or down in response to traffic patterns, the platform eliminates the common practises of over-provisioning application load balancing capability that is a challenge with hardware, equipment-based load balancers.


        Types of Elastic Load Balancers:

        There are three types of load balancers available. You can use the one that best suits your use case:

        1. Classic Load Balancer (CLB)

      • This is the previous generation load balancer that was used for EC2-Classic instances.
      • It works at both request level and connection level. But it does not support features like host-based routing or path-based routing.
      • Once configured, it distributes the load to all registered instances, regardless of what is on the server.
      • Therefore, it can be used to distribute traffic to only one URL.

      • 2. Application Load Balancer (ALB)

      • This load balancer is specially designed for web applications with HTTP and HTTPS traffic.
      • There is a networking model called the OSI Model (Open System Interconnection) that is used to explain how a computer network works. This model has 7 layers and the top layer is the application layer.
      • This load balancer works at this application layer, hence the name.
      • It also provides advanced routing features such as host-based and path-based routing and also works with containers and microservices host-based routing
      • Suppose you have two websites: medium.com and admin.medium.com. Each website is hosted on two EC2 instances for high availability and you want to distribute the incoming web traffic between them.
      • If you were using CLB you would need to create two load balancers, one for each website.
      • But you can do the same thing using a single ALB!
      • Therefore you will save money as you will be paying for only one ALB instead of two CLBs.
      • Suppose your company’s website is payzello.com and the company’s blog is hosted at payzello.com/blog. The operations team has decided to host the main website and blog at different instances.
      • Using ALB you can route traffic based on the path of the requested URL. So again a single ALB is enough for you to handle it.

      • 3. Network Load Balancer (NLB)

      • This load balancer operates at the network layer of the OSI model, hence the name.
      • Let’s say your company website is running on four m4-xlarge instances and you are using ALB to distribute traffic among them.
      • Now your company today launched a new product which went viral and your website starts receiving millions of requests per second.
      • In this case, the ALB may not be able to handle the sudden increase in traffic.
      • This is where NLB really shines. It has the ability to handle sudden increase in traffic as it works at the connection level.
      • It also provides support for static IPs.
      • I hope by this time you have got a rough idea about load balancers. Now, enough talking, let’s get practical.

        Creating an Application Load Balancer:

      • We will handle the case of path-based routing. We will handle two paths here, “/” and “/blog”.
      • We’ll launch two instances, one to handle each path. Let’s get started!
      • 1. Launch Two EC2 Instances

      • To learn how to launch an EC2 instance, you can read my article on launching an Amazon EC2 instance.
      • When launching, give your instance a name tag.
      • For the first example, give a tag with name as the key and key as the value. For the second example, give a tag with name as key and blog as value. This will help us differentiate between them.
      • After launching the two instances, your dashboard should look like this.

      • 2. Install Apache Server on Instances

        Now First instance (with key name) and run following command to install and start Apache server:

        • sudo yum update -y
        • sudo yum install -y httpd
        • sudo service httpd start
        • sudo chkconfig httpd on
        • cd /var/www/html
        • sudo su
        • echo “This is the main website” > index.html
        • Now paste the IP address of the instance in the browser and press Enter.
        • Now run the same command except the second example (with the blog name) and the last one. Instead, run the following command.
        • echo “This is a blog website” > Blog
        • Paste the IP address of this example into the browser with /blog as the suffix and press Enter. You should see something like below.

        3. Create Target Groups

        A target group allows you to tell the load balancer which protocol and port the registered instance will receive traffic on.

        • 1. In the left navigation bar, scroll down and click on Target Group. Now click on Create Target Group at the top.
        • 2. Give a key name to your target group and click on the Create button.
        • 3. Now, navigate to the Target tab at the bottom, click Edit, select the main instance, click Add to Register, and click Save. Create another target group with the name Blog and add the blog instance to it as we did above.
        • 4. Creating and Configuring Application Load Balancer.

        Now, scroll down in the left navigation and click on Load Balancers. Click on the Create Load Balancer button at the top.

      • 1. Select Application Load Balancer.
      • 2. Give your load balancer a name and select at least two availability zones for High Availability and click on Next: Configure Security Settings button.
      • 3. You might see a warning message, but that’s because we’re only listening for HTTP traffic which is fine for our case, so click the Next: Configure Security Group button again.
      • 4. Select the Existing Group option here and select the same security group that you assigned to the launched instance. Once done, click on the Next: Configure Routing button.
      • 5. In Target groups, select the current target group. Select Main in Name and click on Next.
      • 6. Click Next again, review and click on Create. Congratulations, you have just created an application load balancer! But we still have to configure our blog instance so let’s continue. Note the DNS name of the load balancer here. We’ll need it eventually.
      • 7. Select the Audience tab and click View/Edit Rule.
      • 8. Click the + sign at the top to add a rule. Select “Path is” in the add condition and type /blog.
      • 9. Then in Add Action select Forward to and select Blog and then click on Save. Now, we can use the DNS name of our load balancer to go down two different paths and see the result.

        Why Elastic Load Balancer:

        Elastic Load Balancing (ELB) is a load-balancing service for Amazon Web Services (AWS) deployments. ELB automatically distributes incoming application traffic and scales resources to meet traffic demands. ELB helps an IT team to adjust capacity according to the incoming application and network traffic. Users enable ELBs to maintain consistent application performance within a single availability zone or across multiple availability zones. Historically, load balancing has caused a computer to divide the amount of work between multiple computers so that users can, in general, receive service faster. ELB offers advanced features including:


      • Detecting unhealthy Elastic Compute Cloud (EC2) instances.
      • Spreading examples only in healthy channels.
      • Flexible cipher support.
      • Centralised management of Secure Sockets Layer (SSL) certificates.
      • Optional public key authentication.
      • Support for both IPv4 and IPv6.

      • High availability

        The most well-known service that relies on an ELB is Amazon’s EC2, as the ELB performs a health check to ensure that an instance is still running before it sends traffic. When an instance fails or becomes unhealthy, the ELB routes the traffic to the remaining healthy EC2 instances. If all EC2 instances in a particular availability zone are unhealthy, the ELB can route traffic to other availability zones until the original instance is restored to a healthy state.


        Automatic scaling

        A developer can use the auto scaling feature of AWS to guarantee that he has enough EC2 instances running behind an ELB. The developer sets the auto scaling conditions, and when a condition is met, a new EC2 instance can spin up to meet the desired minimum. A developer can also set a condition to spin up new EC2 instances to reduce latency.


        The protection

        ELB supports applications within the Amazon Virtual Private Cloud for robust network security. An IT team can specify whether it wants to be Internet facing or an internal load balancer. The latter option enables a developer to route traffic through an ELB using a private IP address. A developer can route traffic between different levels of an application using multiple Internet-facing and internal load balancers; This approach allows an IT team to use a security group with a private IP address while exposing only the web-facing tier and its public IP address.


      Course Curriculum

      Develop Your Skills with AWS Certification Training

      Weekday / Weekend BatchesSee Batch Details

        Use of Elastic Load Balancer:

        In simple terms, cloud computing refers to storing and accessing data and programs on a computer’s hard drive or remote servers hosted on the Internet instead of on a local server. It is also called Internet based computing.

      • Cloud features
      • No upfront investment
      • Reduce operating costs
      • Highly scalable
      • Easy access
      • Reducing business risk and maintenance expenses
      • Amazon Web Services
      • Amazon Web Services is a subsidiary of Amazon.com that provides on-demand cloud computing platforms to individuals, companies and governments based on a paid subscription. Elastic Load Balancer is a service provided by Amazon in which the incoming traffic is efficiently distributed across a bunch of backend servers thereby increasing the speed and performance.


        Whereas this website may be down due to the large amount of traffic during the competition. A solution is needed to handle both the situations efficiently.

        The solution to this problem is Elastic Load Balancer!! It automatically increases your resource and balances the load which is enough to handle the large incoming traffic.


        AWS Elastic Load Balancing Components:

        Load Balancer- The load balancer acts as a single point of contact for the client. The load balancer distributes incoming application traffic across multiple targets, such as EC2 instances, across multiple availability zones (AZs), thereby increasing the availability of your application. You add one or more listeners to your load balancer.


        Listener or vSRX instance— Listener is a process of verifying connection requests using the protocol and port that you have configured. Listeners as vSRX instances examine connection requests from clients using the protocols and ports you configure, and forward requests to one or more target groups based on rules you define. Each rule specifies a target group, condition, and priority. When the condition is met, the traffic is routed to the target group. You must define a default rule for each vSRX instance, and you can add rules that specify different target groups based on the content of the request (also known as content-based routing).


        Target Groups or VSRX Application Workloads— Each VSRX application as a target group is used to deliver requests to one or more registered targets. When you create each vSRX instance as a listener rule, you specify a vSRX application and conditions. When a rule condition is met, traffic is routed to the respective vSRX application. You can create different vSRX applications for different types of requests. For example, create one vSRX application for common requests and create another vSRX application for requests to microservices for your application.


        AWS ELB supports three types of load balancers- Application Load Balancer, Network Load Balancer, and Classic Load Balancer. You can select the load balancer based on your application requirements. For more information about the types of AWS ELB load balancers, see AWS Elastic Load Balancing.


        Benefits Of Elastic Load Balancer:

      • Ensures elastic load balancing for intra available zones by automatically distributing incoming traffic.
      • Provides you the flexibility to host multiple applications on a single instance and virtualize your application goals by allowing you to centrally manage Transport Layer Security (TLS) settings and offload CPU-intensive workloads from your applications.
      • Provides robust security features such as integrated certificate management, user authentication and SSL/TLS decryption.
      • Supports auto-scaling to a sufficient number of applications to meet different levels of application load without the need for manual intervention.
      • Enables you to monitor your applications and their performance in real time with Amazon CloudWatch metrics, logging and request tracing.
      • Provides load balancing across AWS and on-premises resources using the same load balancer.

      AWS Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

        Conclusion:

      • So, based on the working of AWS Elastic Load Balancer, we can note several advantages. The most important is security with the convenience of many security features in load balancers on AWS. In addition, elastic load balancing capabilities ensure adaptability to rapid fluctuations in network traffic patterns.

      • Furthermore, the deep integration with Auto Scaling helps to validate sufficient application capacity to address different levels of application load without any human intervention. High availability and flexibility are also some notable advantages in terms of elastic load balancing. Thus, the increased scalability, redundancy and other features of AWS ELB websites and web application traffic can be handled easily. This makes the AWS ELB service provided by SNDK Corp one of a kind unique.

      • If your organisation runs a high-traffic website or database that receives a lot of queries, SNDK Corp.’s elastic load balancing service offers several advantages by optimising resource utilisation, response times, and data delivery.

      • In high-traffic environments, elastic load balancing is what makes it smooth and accurate to meet user requests. This saves users the frustration of wrangling with unresponsive applications and resources. It helps IT departments to ensure scalability and availability of services. Its advanced and unique traffic management functionality can help a business handle requests for the right resources more efficiently and for each end user.

      Are you looking training with Right Jobs?

      Contact Us

      Popular Courses

      Get Training Quote for Free