Try
↑ ↓ move↵ openesc close

Interview prep / DNS and traffic steering

Mid · DNS and traffic steering · System design interview question

How does weighted DNS routing work, and how precise is it?

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

A strong answer

The authoritative server answers each query with endpoint A or B in set proportions. It is used to send a small share of traffic to a new version or to move load in steps.

It is coarse. The weight applies to queries, and a resolver caches its answer and serves every user behind it for the TTL. A large resolver sends all its users one way. With many resolvers and a short TTL the split comes close to the weight. With few large resolvers or a long TTL it can be far off.

For a precise split by request, use a load balancer or a service mesh.

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