Question

Does anyone has any idea, or even better any data to back it up, how many DNS resolves happen per "normal" usage of the website. And before anyone starts asking what I consider normal usage of the website, well what ever you guys have an idea and data to back it up.

In other words lets say that user visits one website 20 days a month, each day he spends looking at around 10 pages all day, so say that he makes around 1000 page requests a day. Meaning 20 000 page requests a day.

Any idea who many DNS resolves would that be since I know that browser and operating system cash DNS resolve but I have no idea for how long do they keep it.

Was it helpful?

Solution

Well.. It's a difficult question to answer correctly, because it's a tricky one, if you ask it in this way.

You really cant measure that by thinking in HTTP requests, because lots of things can happen that will make your numbers vary. For example, an ISP or a user flushes its DNS cache, so a new request will be needed to get the IP address of your domain. Also, some client implementations may choose to not obey your expiration times. And let's not talk about the slashdot effect that can really bring your servers down! Also, you may get requests for MX records if you handle mail, and also you can get lots of invalid DNS requests by an evil entity for whatever reason, that may put some non-desired load on the servers.

Now, about the expiration time: A DNS server can be configured to set a TTL (Time To Live) to each DNS record individually (how you set it will depend on your particular server and/or hosting solution).

If you dont expect to change the IP address of the domain name, then you can set a very high TTL (in seconds) like 86400, which is equivalent to 1 day. This means that when an ISP queries your DNS to get the ip address of the domain, it will keep the record 1 day before issuing a new DNS request for it.

Normally, end users will query the DNS of the ISP they use, so they will first query (if needed) the ISP's DNS instead of yours, and then the ISP will decide (based on TTL) if a query to your own DNS is needed. If not, they will serve the cached record to the client. This will reduce a lot the requests you get to your own servers.

Sometimes, DNS records are used to make a round-robin solution, returning a new IP address for each DNS request. In this case, the TTL might be much shorter. An alternative is to handle the requests at the same ip address but load balance them to "internal" servers, without public ip addresses.

You can read a little more about DNS ttl here: http://www.simpledns.com/help/v51/index.html?df_ttl.htm

Hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top