Course contentsShow
← Cloud and Infrastructure
Lesson 276 of 2,9895. Load Balancing and Traffic ManagementFree lesson

Weighted Target Groups and Canary Deployments

Configure weighted traffic distribution to gradually roll out new application versions with minimal risk.

Weighted Target Groups and Canary Deployments

What you'll learn: How to safely introduce new application versions by splitting traffic between old and new deployments using weighted routing.


What Are Weighted Target Groups?

Weighted target groups let you distribute incoming traffic across multiple target groups according to percentages you specify. Instead of sending all users to version 2.0 of your app immediately, you can send 10% of traffic to the new version and 90% to the stable old version.

This is the foundation of canary deployments — a pattern named after "canary in a coal mine." You expose a small group of users to the new version first, monitoring for errors or performance issues before rolling it out to everyone.

How It Works

When configuring an Application Load Balancer listener rule, you can forward traffic to multiple target groups with different weights:

  • Target Group A (v1.0): Weight 90
  • Target Group B (v2.0): Weight 10

The load balancer randomly distributes requests proportionally. If everything looks good after monitoring, you gradually shift weight: 70/30, then 50/50, then 20/80, until v2.0 receives 100%.

Why This Matters

Traditional "all-at-once" deployments risk affecting all users if bugs exist. Weighted routing gives you:

  • Risk mitigation — problems impact only a small percentage
  • Gradual rollout — observe real-world behavior before full deployment
  • Easy rollback — adjust weights back instantly if issues arise
  • A/B testing capability — compare versions with real user traffic

Key Takeaway: Weighted target groups enable canary deployments by gradually shifting traffic percentages between application versions, minimizing risk during updates and allowing instant rollback if problems occur.