What is split-horizon DNS and when do you need it?
IntermediateScenarioDNS & Service Discovery
Answer
Situation read → The same name returns different answers inside and outside the network.
What I'd do →
- Create a public hosted zone
example.comwith the public ALB and a private hosted zone with the same name associated to the VPC - Inside the VPC
app.example.comreturns a private IP - Outside it returns the public one
- Verify from an instance with
dig app.example.comand from home with the same command - Be careful: records missing in the private zone become NXDOMAIN inside the VPC
Why → Private zones shadow the public zone completely for associated VPCs, so every needed record must exist in both.
Interview tip → Name the failure mode: forgot to copy a record into the private zone.
More on DNS & Service Discovery
A customer types www.example.com in a browser. Walk through how DNS resolves it.BeginnerWhat is the difference between an A record and a CNAME, and when do you use each?BeginnerWhy can't you put a CNAME at the zone apex, and what do you use instead?BeginnerYou are moving a site to a new server. What do you do with DNS to make the cutover smooth?BeginnerHow do you find which nameservers are authoritative for a domain and query them directly?BeginnerWhat DNS records do you set up for company email?Beginner