Course description

In this practical lab, you will explore session stickiness using an AWS Application Load Balancer (ALB) and Auto Scaling Group. Starting with a CloudFormation template, you'll provision a demo environment with multiple EC2 instances running custom web servers. You'll verify load distribution across instances, enable ALB-managed session cookies, and observe how sticky sessions lock user traffic to a specific backend instance. You'll then simulate instance failure to test failover and session migration, and finally disable stickiness to restore round-robin distribution. By the end, you'll understand how session stickiness works in production, how to configure it, and its impact on high availability and user experience.

Additionally, all learners receive dedicated online support through our Slack workspace where you can ask questions, get troubleshooting help, and interact with our team throughout the entire project.

Click here to access Slack workspace link

What will i learn?

  • Provision a multi-instance web environment using CloudFormation
  • Verify load distribution across an ALB target group
  • Enable and configure ALB session stickiness with managed cookies
  • Test sticky session behavior and inspect session cookies
  • Simulate instance failure and observe failover behavior
  • Disable stickiness and validate return to round-robin distribution
  • Clean up AWS resources using CloudFormation

Requirements

  • An active AWS account with access to CloudFormation, EC2, and ELB
  • Basic understanding of AWS networking (VPC, subnets, security groups)
  • Familiarity with EC2 instances and load balancing concepts
  • A modern web browser with developer tools (to inspect cookies)

Frequently asked question

Session stickiness ensures that a user's requests are consistently routed to the same backend instance during a session, which is essential for applications that store session data locally (e.g., shopping carts, user authentication).

If the instance fails health checks, the ALB will route the user to a new instance, and a new sticky session cookie will be issued. The user may experience session data loss unless the application stores session state externally (e.g., in a database or DynamoDB).

Yes, ALB supports both application-controlled cookies and duration-based cookies. This lab uses the ALB-managed cookie (AWS ALB) for simplicity.

Akinola Ojuola

Cloud Solution Architect, DevOps Consultant & Trainer

Akinola Ojuola is a seasoned Cloud Solution Architect, DevOps Consultant and technical trainer with over 20 years of industry expertise. Throughout his career, he has worked with some of the world’s most prominent technology-driven organisations, including IBM, Fujitsu, Walmart, and MasterCard, delivering transformative solutions across various sectors. Akinola has trained and mentored more than 1,000 students across 18 countries on five continents. His commitment to real-world, practical learning has enabled hundreds of learners to launch successful careers in global tech companies. He is passionate about practical, real-world learning. His teaching approach blends deep technical knowledge with hands-on, enterprise-level experience. He holds multiple industry certifications and leads advanced projects in Cloud Architecture, DevOps, DevSecOps, and Artificial Intelligence for both private enterprises and public institutions.Whether you’re just starting or looking to advance your tech career, you’ll gain valuable, job-ready skills under his guidance.

$10

Lectures

1

Skill level

Beginner

Expiry period

1 Months

Certificate

Yes

Related courses