System designI Built a DNS Server to Understand the Thing I'd Blindly Trusted for Ten Years
There are technologies you use every single day without ever looking them in the eye. For me, DNS was one of them. I'd been typing domain names for a decade. Buying domains, pointing records, waiting for "propagation," cursing when it didn't come up, rejoicing when it did — without really understanding why it came up. DNS, to me, was like the light switch on the wall: flip it and the room lights up; if it breaks, call an electrician. Until one deploy night, the site went down. ping to the IP was fine. curl straight to the IP returned the page. Only the domain name sat there in silence. I stared at it and realized something a little humiliating: I didn't know where to even start fixing it, because I had never truly understood the thing that was broken. So I did what probably only an engineer would find reasonable: instead of skimming the docs, I sat down and wrote an entire DNS server in Rust. The project is called mini-dns. This post is what a black box told me once I finally opened it up.