DNS is one of those systems that is one of the easiest to setup, yet it is one of the hardest to setup right. Most of the time just works is good enough for probably 90% of the installations out there. But as system administrators, just works should never be what we strive for. We should always go for the best implementation that we possibly can achieve.
There are basically two choices you need to make when you want to setup your DNS.
- Do I want to host DNS internally
- Do I want to host DNS externally
Both of these options have their advantages and drawbacks. In broad strokes they can be listed as:
- Low management overhead – you don’t need to worry about the hardware, high availability and distribution of server
- Low learning curve – You are generally given a web interface that makes it very simple to add records, with explanations for what each of them do to help you along
- Low cost to get in, on the low end of traffic levels very affordable.
- Highly customizable
- You aren’t reliant on another entity for your DNS
- When your traffic starts to climb, the cost/benefit ration is squarely in the favor of in house hosting
- At a certain volume of traffic they can become very expensive
- Making many changes can be painful without writing code against their API, if they have one
- You are reliant on another entity to keep a core service running
- You have to put out the hardware cost up front
- You need to have people with the proper skills to manage the servers properly
- You need to have the a large enough infrastructure to have proper HA.
Now, after all of that, what does this have to do with us? Well it has come to that point in the life of these sites what we need to move our services in house, our provider’s website does not provide the flexibility that we need to be able to bring everyone these great Q&A sites. Basically we have outstripped the capabilities of our provider’s web interface and the effort to code against their API is just not worth it compared to the added flexibility and benefit of running our own.
As part of bringing things in house I started looking for a good sizing tool, so that I could decide on the right hardware to support the amount of DNS traffic the Stack Exchange network receives. Unfortunately there is not a whole lot of information out there about sizing DNS servers. Luckily there are a lot of people that use our site who have a lot of varied experiences and knowledge – our very own Chris S provided me a rough formula to get a general Idea of the proper sizing for our DNS servers.
His formula is fairly simple, and gives you a good idea of how much server you should buy (or if the equipment has already been purchased, how many requests it will be able to handle).
req/s / 10 = CPU in MHz Zone(s) file size * 2† = RAM (+OS)
†3 if dynamic updates are allowed
Over the next few weeks, we will be building out our own internal DNS system. We have the people and ability, and gosh darn it the desire to do DNS right. Pulling our DNS services in house will give use the ability to do things like DNSSEC, run Bind 10 when it stabilizes, and many other things to get us to our goal of being a great example to the world.