The Weighted Routing Policy in Amazon Route 53 allows traffic distribution across multiple resources based on assigned weights. This provides flexible traffic control, enabling use cases such as load balancing, application testing, and gradual traffic shifting.
Each DNS record is assigned a weight.
Route 53 calculates the traffic percentage sent to each record using:
Traffic Percentage=Record Weight∑All Record Weights\text{Traffic Percentage} = \frac{\text{Record Weight}}{\sum \text{All Record Weights}}
Weights do not have to sum to 100; they only define relative traffic distribution.
Consider a setup with three EC2 instances, each in a different AWS region:
| EC2 Instance | Region | Weight | Traffic Share |
|---|---|---|---|
| Instance 1 | us-east-1 | 70 | 70% |
| Instance 2 | eu-central-1 | 20 | 20% |
| Instance 3 | ap-southeast-1 | 10 | 10% |
weighted.stephanetheteacher.com