Elastic Load Balancer

What is LB?

Load Balancer (LB) is like a traffic manager for your web applications. It evenly distributes incoming web traffic among multiple servers, ensuring no single server gets overwhelmed, thus improving performance and reliability.

What is Application Load Balancer?

An Application Load Balancer (ALB) is a type of LB that operates at the application layer, making it intelligent and capable of routing traffic based on content. It's specifically designed for modern applications that rely on multiple services.

Key Components of an Application Load Balancer

  1. Load Balancer:
    • Serves as the primary contact point for clients.
    • Distributes incoming application traffic to various targets, like EC2 instances, across multiple Availability Zones, enhancing overall application availability.
  2. Listeners:
    • Responsible for handling connection requests from clients.
    • Operate on specified protocols and ports that you configure.
    • Rules defined for each listener guide how the load balancer routes requests to its registered targets.
    • Rules include a priority, one or more actions, and conditions. Actions are executed when rule conditions are met.
    • It's crucial to define a default rule for each listener, and additional rules can be optionally configured.
  3. Target Groups:
    • Route requests to one or more registered targets, such as EC2 instances.
    • Defined by the protocol and port number specified.
    • Targets can be registered with multiple target groups for added flexibility.
    • Health checks are configurable on a per target group basis.
    • Health checks assess the well-being of all targets within a group specified in a listener rule for the load balancer.

How Application Load Balancer Works:

  • Content-Based Routing: ALB can route traffic based on content, examining HTTP/HTTPS headers, allowing for advanced routing decisions.
  • Path-Based Routing: It can route requests based on the URL path, directing traffic to different backend services.
  • Host-Based Routing: ALB supports routing based on the host header, enabling serving multiple applications from the same load balancer.
  • Containerized Applications: ALB is well-suited for containerized applications, efficiently managing traffic within a containerized environment.

Why Application LB has More Functions Compared to Network LB:

  • Layer 7 vs. Layer 4: Application LB operates at Layer 7 (application layer), offering more advanced routing based on content, while Network LB operates at Layer 4 (transport layer), focusing on routing based on IP addresses and ports.
  • Content Awareness: ALB understands the content of the traffic, making it ideal for modern applications with dynamic routing needs.
  • Flexible Routing: ALB's ability to route based on various factors like path, host, and content provides greater flexibility compared to Network LB.


In conclusion, AWS Application Load Balancer is a powerful tool for intelligently managing web traffic, providing advanced routing options for modern applications. Understanding its capabilities and following the simple steps to configure it ensures a seamless and optimized web application experience for your users.