The Weighted Routing Policy in Amazon Route 53 allows you to distribute traffic across multiple resources by assigning them different weights. This approach provides fine-grained control over how DNS requests are directed to specific instances or endpoints.
You can assign a weight to each resource (e.g., EC2 instances).
The weight determines the percentage of DNS requests that will be routed to that resource.
Route 53 calculates the proportion of requests based on the formula:
Traffic Percentage=Record Weight∑All Record Weights\text{Traffic Percentage} = \frac{\text{Record Weight}}{\sum \text{All Record Weights}}
The weights do not need to sum up to 100; they are only relative to each other.
Consider the following setup with three EC2 instances:
| 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