Enable sticky sessions in Application Load balancer

Lab Details

  1. This lab walks you through the steps to create and configure a Stickiness in the Application load balancer's target group.

  2. You will practice using Amazon Machine Image (AMI) to launch Amazon EC2 Instances, then create a target group and add these instances as a target. You will also create a load balancer and test the stickiness after enabling it by modifying the target group.

  3. Duration: 90 minutes

  4. AWS Region: US East (N. Virginia) us-east-1


What is Elastic Load Balancing?

  • ELB is a service that automatically distributes incoming application traffic and scale resources to meet traffic demands.

  • ELB helps in adjusting capacity according to incoming application and network traffic.

  • ELB can be enabled within a single availability zone or across multiple availability zones to maintain consistent application performance.

  • ELB offers features like:

  • Detection of unhealthy EC2 instances.

  • Spreading EC2 instances across healthy channels only.

  • Centralized management of SSL certificates.

  • Optional public key authentication.

  • Support for both IPv4 and IPv6.

  • ELB accepts incoming traffic from clients and routes requests to its registered targets.

  • When an unhealthy target or instance is detected, ELB stops routing traffic to it and resumes only when the instance is healthy again.

  • ELB monitors the health of its registered targets and ensures that the traffic is routed only to healthy instances.

  • ELB's are configured to accept incoming traffic by specifying one or more listeners. A listener is a process that checks for connection requests.

Architecture Diagram

Task Details

  1. Launching Lab Environment

  2. Create a Security Group for the load balancer and EC2 Instance

  3. Launch EC2 Instances a Security Group for Launch template

  4. Create target group and application load balancer

  5. Enable stickiness by modifying the Target Group attribute

  6. Testing the stickiness

  7. Delete AWS Resources