Try
↑ ↓ move↵ openesc close

Interview prep / DNS and traffic steering

Senior · DNS and traffic steering · System design interview question

How does latency-based DNS routing choose an endpoint, and where can it go wrong?

Sketch your own answer first, then compare it with the one below.

A strong answer

The provider measures delay from regions to endpoints and answers each query with the endpoint that looks fastest for the asker's region.

The authoritative server sees the resolver, not the user. If a user is far from the resolver, the choice fits the resolver's location. The EDNS Client Subnet extension passes part of the client address to help, and not every resolver sends it.

Other problems follow. The table of delays goes stale, the answer is cached for the TTL, and the choice ignores load, so the nearest endpoint can be the one that is overloaded. Combine it with health checks and capacity limits.

Sources

Learn it by running it

The dns and traffic steering lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms