AWS Elastic Load Balancing Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

Load Balancer

Load Balancers

A load balancer serves as the single point of contact for clients. The load balancer distributes incoming traffic across multiple targets, which actually know how to handle requests and provide responses. This increases the availability of the application. A load balancer can have one or more listeners.

Load Balancer Name

The name of a load balancer must be unique within the set of Application Load Balancers and Network Load Balancers for the region.

Listener

Listeners

A listener checks for connection requests from clients, over a pre-configured protocol and port, and forwards requests to a target group.

Target Group

Target Group

A target group routes requests to one or more registered targets, which can be EC2 instances, using a pre-configured TCP protocol and the port. A target can be registered with multiple target groups. A target group supports health checks: health checks are performed on all target registered to a target group that is specified on a listener rule for the load balancer.

Target

Target Type

Instance

The target is specified by the instance ID.

IP

The target type is specified by an IP address. The IP address can be specified from one of the following CIDR blocks:

  • the subnets of the VPC for the target group.
  • 10.0.0.0/8 (RFC 1918)
  • 100.64.0.0/10 (RFC 6598)
  • 172.16.0.0/12 (RFC 1918)
  • 192.168.0.0/16 (RFC 1918)

Publicly routable IP addresses can't be specified.

Load Balancer Types

Used by Amazon ECS.

Application Load Balancer

Allows containers to use dynamic host port mapping (multiple tasks allowed per container instance). Multiple services can use the same listener port on a single load balancer with rule-based routing and paths.

Network Load Balancer

Network Load Balancers

A Network Load Balancer functions at the fourth layer of the Open Systems Interconnection (OSI) model. After the load balancer receives a request, it selects a target from the target group for the default rule using a flow hash routing algorithm, based on the protocol, source IP address, source port, destination IP address, destination port, and TCP sequence number, and then attempts to open a TCP connection to the selected target. It can handle millions of requests per second.

Elastic Load Balancing creates a network interface for each Availability Zone you enable. Each load balancer node in the Availability Zone uses this network interface to get a static IP address. When you create an Internet-facing load balancer, you can optionally associate one Elastic IP address per subnet.

Network Load Balancer Operations

Create a Netwrok Load Balancer
Test a Network Load Balancer

Classic Load Balancer