Solved

Setting TTL for DNS Host

Posted on 2012-03-13
5
1,414 Views
Last Modified: 2012-08-13
I am in the process of setting up a second A record in my DNS for my domain name, my default TTL  is set for (7200) for my primary host IP but I’m trying to find a happy medium for the TTL so that it looks at the second IP before the web browser times out. As of now it reads

Primary:     www      .abc-123.com      TTL (7200)      IP (192.168.1.23)

Secondary:     www      .abc-123.com      TTL (7200)      IP (192.168.2.25)

 Any recommendations

Thanks
0
Comment
Question by:ahmad1467
  • 3
  • 2
5 Comments
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 37719592
The TTL has nothing to do with web browsers timing out and then going to the second address.

The TTL is how long that DNS entry should be cached by resolvers before being purged from cache and another DNS lookup is done.

That is, I lookup name www..abc-123.com and get back an address.  I keep that address in my cache for 7200 seconds (two hours).  After two hours I remove it from my cache and do another lookup the next time I need to visit that host.

I am assuming that you want a low TTL in an attempt to do load balancing?

If so, I would suggest you get a real load balancer.  The DNS Round robin method of load balancing is fine, until one of the servers goes down.  The DNS server will still return the IP address of the server that is down and so people will still try and go to it.
0
 

Author Comment

by:ahmad1467
ID: 37721302
I'm looking to have a low TTL to allow me a backup path to access the web site if the main IP address is not available.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 37721359
O.K, as I stated in the 1st e-mail.  The only way that really works, is if you remove the "main" IP address from DNS.  As long as the IP address of the "main" server is in DNS, the server will respond with that address and the users will try to get it.

In fact there is no "main" and "secondary" addresses to DNS.  There is just a list of addresses.  The DNS server will hand it out in round robin form.  That is, 1st query get address #1, second query gets address #2, third query gets address #1, fourth query gets address #2, and so on.
0
 

Author Comment

by:ahmad1467
ID: 37721676
I’m sorry this is all new to me; I just want to make sure we are talking about the same DNS record.Is this the DNS A record for my domain name? In my setup I have a domain name configure with two IP address from two different providers. On my firewall I have both connections coming in then in my FW rules I have two different Net Trans pointing to the same web server. Would this be the same thing?

Thanks
0
 
LVL 57

Expert Comment

by:giltjr
ID: 37722087
Yes we are talking about A records.

You have a single A record with two IP addresses.  When I say "lookup hostname abc-123.com" the 1st time I will get back 192.168.1.23.  The next person will get back 192.168.2.25.  The next person will get back 192.168.1.23, and it keeps alternating.

If 192.168.1.23 goes down, the DNS server has no clue that it is down and will continue to respond with that address on every other query.  So every other person will attempt to connect to the IP address that is down.

Read on round robin dns here:

http://en.wikipedia.org/wiki/Round-robin_DNS
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is intended as an extension of a blog on Aging and Scavenging by the MS Enterprise Networking Team. In brief, Scavenging is used as follows: Each record in a zone which has been dynamically registered with an MS DNS Server will have…
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question