What is load balancer in AWS?

This recipe explains what is load balancer in AWS

What is load balancer

AWS load balancers accept incoming client application traffic and distribute it across multiple registered targets, such as EC2 instances in different availability zones. The AWS application load balancer feature enables developers to route and configure incoming traffic between end-users and applications in the AWS public cloud.

The AWS elastic load balancer, which serves as a single point of contact for clients, only routes to healthy instances and identifies unhealthy instances. When the target becomes operational, the AWS load balancer algorithm resumes traffic routing to it. In cloud environments with multiple web services, load balancing is critical.

AWS Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets in one or more availability zones, such as containers, EC2 instances, and IP addresses. This improves the fault tolerance and availability of user applications by distributing and balancing how frontend traffic reaches backend servers. AWS load balancing also checks the health of registered targets and routes traffic accordingly.

AWS Load Balancer Types

There are four types of AWS load balancers supported:

 

  • AWS Classic Load Balancer
  • AWS Network Load Balancer (NLB)
  • AWS Application Load Balancer (ALB)
  • AWS Gateway Load Balancer (GLB)
    • A. Classic Load Balancer:

Initially, the traditional type of load balancer was used. It distributes traffic among instances and lacks the intelligence to support host-based or path-based routing. In some situations, it reduces efficiency and performance. It works at both the connection and request levels. The classic load balancer sits between the transport (TCP/SSL) and application layers (HTTP/HTTPS).

    • B. Application Load Balancer:

This type of Load Balancer is used when decisions about HTTP and HTTPS traffic routing must be made. It supports both path-based and host-based routing. This load balancer operates at the OSI Model's Application layer. Dynamic host port mapping is also supported by the load balancer.

    • C. Network Load Balancer:

This type of load balancer operates at the OSI model's transport layer (TCP/SSL). It can handle millions of requests per second. It is primarily used to balance TCP traffic.

    • D. Gateway Load Balancer:

: Gateway Load Balancers enable you to deploy, scale, and manage virtual appliances such as firewalls. Gateway Load Balancers combine a transparent network gateway with traffic distribution.

 

By acting as a single point of contact for clients, the AWS load balancer improves application availability. As needs change, users can seamlessly add and remove instances from the AWS load balancer without disrupting the overall request flow to the application. As a result, AWS elastic load balancing scales as application traffic fluctuates and can automatically scale to most workloads

Users configure the load balancer with one or more listeners. A listener checks the configured port and protocol for connection requests from clients and forwards them to registered instances using the configured port number and protocol. The AWS load balancer sends requests only to healthy instances thanks to health checks.

By default, the AWS load balancer distributes traffic evenly across enabled availability zones. Maintain instances in roughly equal numbers across availability zones to improve fault tolerance. Cross-zone load balancing is also an option. This kind of elastic load balancing ensures that traffic is distributed evenly across all registered instances

When an availability zone is enabled, a load balancer node is created within the availability zone. Targets do not receive traffic if the availability zone is not enabled, even if they are registered.

Furthermore, the classic AWS load balancer algorithm performs best with at least one registered target in each enabled availability zone, but enabling multiple availability zones for all load balancers is recommended. To ensure continuous traffic routing, AWS application load balancers require the activation of at least two availability zones.

Limitations of AWS Load Balancer

Although AWS load balancers perform well in basic functions, they face a few significant challenges.

AWS Load Balancer Latency

AWS load balancer latency is among the system’s most notable limitations. With a classic load balancer several things can cause high latency, starting with faulty configuration. Beyond that, the high latency trouble spots are basically the same for the AWS application load balancer, especially relating to backend instances:

  • Incorrect configuration
  • Issues with network connectivity
  • And as to backend instances
  • Excessive CPU utilization
  • High memory (RAM) utilization
  • Incorrect web server configuration Problems caused by web application dependencies such as Amazon S3 buckets or external databases running on backend instances

What Users are saying..

profile image

Gautam Vermani

Data Consultant at Confidential
linkedin profile url

Having worked in the field of Data Science, I wanted to explore how I can implement projects in other domains, So I thought of connecting with ProjectPro. A project that helped me absorb this topic... Read More

Relevant Projects

COVID-19 Data Analysis Project using Python and AWS Stack
COVID-19 Data Analysis Project using Python and AWS to build an automated data pipeline that processes COVID-19 data from Johns Hopkins University and generates interactive dashboards to provide insights into the pandemic for public health officials, researchers, and the general public.

Streaming Data Pipeline using Spark, HBase and Phoenix
Build a Real-Time Streaming Data Pipeline for an application that monitors oil wells using Apache Spark, HBase and Apache Phoenix .

Create A Data Pipeline based on Messaging Using PySpark Hive
In this PySpark project, you will simulate a complex real-world data pipeline based on messaging. This project is deployed using the following tech stack - NiFi, PySpark, Hive, HDFS, Kafka, Airflow, Tableau and AWS QuickSight.

Real-Time Streaming of Twitter Sentiments AWS EC2 NiFi
Learn to perform 1) Twitter Sentiment Analysis using Spark Streaming, NiFi and Kafka, and 2) Build an Interactive Data Visualization for the analysis using Python Plotly.

Learn How to Implement SCD in Talend to Capture Data Changes
In this Talend Project, you will build an ETL pipeline in Talend to capture data changes using SCD techniques.

Flask API Big Data Project using Databricks and Unity Catalog
In this Flask Project, you will use Flask APIs, Databricks, and Unity Catalog to build a secure data processing platform focusing on climate data. You will also explore advanced features like Docker containerization, data encryption, and detailed data lineage tracking.

GCP Data Ingestion with SQL using Google Cloud Dataflow
In this GCP Project, you will learn to build a data processing pipeline With Apache Beam, Dataflow & BigQuery on GCP using Yelp Dataset.

SQL Project for Data Analysis using Oracle Database-Part 6
In this SQL project, you will learn the basics of data wrangling with SQL to perform operations on missing data, unwanted features and duplicated records.

Orchestrate Redshift ETL using AWS Glue and Step Functions
ETL Orchestration on AWS - Use AWS Glue and Step Functions to fetch source data and glean faster analytical insights on Amazon Redshift Cluster

Log Analytics Project with Spark Streaming and Kafka
In this spark project, you will use the real-world production logs from NASA Kennedy Space Center WWW server in Florida to perform scalable log analytics with Apache Spark, Python, and Kafka.