Interview Prep/Networking/DNS & Service Discovery

You are moving a site to a new server. What do you do with DNS to make the cutover smooth?

BeginnerScenarioDNS & Service Discovery
Answer

Situation read → DNS caching makes cutovers slow unless you prepare.

What I'd do →

  1. Lower the TTL (for example from 86400 to 60 seconds) at least one old-TTL period before the change
  2. Bring the new server up and test it with curl --resolve www.example.com:443:203.0.113.20 https://www.example.com
  3. Change the record
  4. Watch both servers' logs until traffic drains from the old one, then raise the TTL again

Why → Resolvers honor the TTL they cached, so you must wait out the old value before the low TTL takes effect.

Interview tip → Mention that some ISPs and apps ignore low TTLs, so keep the old server alive for a while.

All Networking questions Roadmap: Networking for DevOps

More on DNS & Service Discovery