Design Latency-Based Routing to the Nearest Healthy AWS Region
Last updated: November 29, 2026
Quick Overview
Design a DNS-based traffic routing service that answers each client query with the endpoint in the region that gives that client the lowest latency, while removing unhealthy regions automatically.
Amazon
November 29, 20260
0
0 solved
Design a DNS-based traffic routing service that answers each client query with the endpoint in the region that gives that client the lowest latency, while removing unhealthy regions automatically.
Asked in AWS networking style loops (Route 53 is the obvious reference). Interviewers check whether you understand how DNS resolvers, TTLs and health checks interact, and how latency data is collected without measuring every client.
What the Interviewer Expects
- Explain why routing decisions are made per resolver or client subnet, not per user
- Build a latency map from measurements between networks and regions
- Integrate health checks and fail over within a bounded time
- Choose TTLs and explain the trade-off with failover speed
- Make the DNS data plane extremely available
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How does EDNS Client Subnet change your design?
- How would you prevent a health check flap from bouncing traffic between regions?
- How do you combine latency routing with weighted routing for a migration?
- Why might DNS-based failover be slower than you expect?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: a customer defines records like api.example.com with one endpoint per region. A query gets back the endpoint with lowest latency for the requester that is also healthy. **Non-functio...
High-Level Design
- Control plane: API for records and health checks; writes configuration to a durable store and propagates it to all DNS edge servers.
- Latency map builder: offline pipeline that produces a t...