Ref: https://learn.cantrill.io/courses/1820301/lectures/41301588
R53 Weighted Routing - Architecture
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1200-ROUTE53/00_LEARNINGAIDS/Route53WeightedRouting-1.png
- 🔧 Multiple records with same host name are given weights
- e.g. for three different
www
records, we can assign 20, 20 and 10 as record weights
- The total weight for host name is calculated (in example above, 20+20+10=50)
- Each record is returned in DNS queries based on its record weight vs total weight
- e.g. First record is returned 20 out of 50 times (i.e. 40% of the time). Second record also returned 40% of the time; and third record, 20% of the time.
- Record weight = 0 → record is never returned
- ‼️ UNLESS all weights are 0, in which case all records are considered equally
- Records can have health checks
- If selection process chooses an unhealthy record, selection process is repeated until a healthy record is chosen
- ‼️ Health checks do NOT exclude unhealthy records from calculations!
- Host name's total weight is not adjusted!
- Selection process remains unaltered, just repeated until a healthy record is chosen
- Useful as a very simple form of load balancing, or for testing new versions of SW
- 💡 e.g. Routing 5% of the traffic to a new version of your web server, to see how the new version fares