Recommended Posts

I have two servers that serve the same function. One is used as a backup of the other.

server1.domain.local

server2.domain.local

How would I create a link such as link1.tsf.local which will always point to server1.domain.local but in the event that server is down points to server2.domain.local

Link to comment
https://www.neowin.net/forum/topic/1120078-using-dns-to-provide-redundancy/
Share on other sites

using what for your nameserver, bind, microsoft?

This sort of thing is not done in dns - now some dns services provide this feature but its not actually done in the dns server software... You need another system that monitors the systems and changes the record in dns when the server goes down.

example of dns service provider that provides this functionality

http://www.zoneedit.com/failover.html

And for this to work you need to use a very low TTL to make it feasible.

Here is a script that you could run to change your records for you

http://www.freebsdwiki.net/index.php/BIND,_dynamic_DNS,_failover_A_records

There is nothing in MS dns to do that - like I said you would need some script or software to monitor the systems and then change the dns record. You could modify the script I linked to do what you want. MS dns might a bit more difficult to work with than bind.

That is NOT WHAT he asked at all!! That is simple round robin, 1 time get this address, next time get that address.

You can load balance that way - not failover!

"which will always point to server1.domain.local but in the event that server is down points to server2.domain.local"

That is NOT WHAT he asked at all!! That is simple round robin, 1 time get this address, next time get that address.

You can load balance that way - not failover!

"which will always point to server1.domain.local but in the event that server is down points to server2.domain.local"

It achieves the same effect. The second server must be up and running in order to provide fall-over, why not use it and load balance as well.

This is how it would work: http://www.nber.org/sys-admin/dns-failover.html

"It achieves the same effect."

No not really - right off their page

"If one is down. the questions are, will the browser try the second IP address. and how long does it wait to do so?"

You have NO control over what a users browser is, you have no control if the browser will try the other IP. Does his version MS dns even return both IPs on a query? Not sure? The article states BIND does, he is using MS - I know 2k8r2 dns returns both, but not sure what MS dns his is using. If that's the case if 1 server is down you have a %50 change of users getting the BAD IP.

Is is NOT what the user asked for at all. He asked for "failover" - DNS does not provide that feature, round robin is not a failover mechanism. And again he clearly stated he did not want to query server 2 unless server 1 was down. In a round robin setup - your going to get a % of the users hitting all server listed. Maybe the 2nd server only has a page saying - hey sorry we are down sort of thing.

That is what he asked for, not round robin. Maybe it would work, but that is not what he asked for - why didn't he has for load balancing functionality if that is what he wanted?

It doesn't know if up or down, it returns ALL the entries you have there. DNS does not have any method to check if something is up or down, alive, answering pings, nothing. Its just a listing of IPs from names, and names from IPs - nothing more.

Now with the newer browsers if dns returns 1.2.3.4, and 1.2.3.5 and 1.2.3.6 for example - SOME browsers might try .4 and if does not answer in some period of time, might be 10 seconds, might be 30 seconds try .5, etc..

But not all browsers do this, if this is all internal you could check your brower your users use to see what they do.

Keep in mind if .4 .5 and .6 are all up then load would be split 33% roughly each. Since the order returned would rotate as queries came in for the record.

  • 5 months later...

There is nothing in MS dns to do that - like I said you would need some script or software to monitor the systems and then change the dns record. You could modify the script I linked to do what you want. MS dns might a bit more difficult to work with than bind.

Budman - the script you linked to - does it work in Windows environment?

Its a perl script, you can run perl on windows - will it work, have no idea pointed to it like 6 months ago as an example of how you could check for something and then change dns, etc.

Its quite possible someone has written something for windows, etc. That was an example since the functionality asked for is not inherent to dns

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • NASA: This asteroid may not kill us but it probably won't be far off either by Sayan Sen Image by Zelch Csaba via Pexels New observations by NASA's James Webb Space Telescope have eliminated the last remaining impact threat posed by asteroid 2024 YR4, ruling out the possibility that the near-Earth object could strike the Moon in December 2032. NASA said observations collected by Webb on February 18 and 26, 2026, enabled scientists to refine the asteroid's orbit enough to "rule out a chance of lunar impact on Dec. 22, 2032." Instead, asteroid 2024 YR4 is now expected to pass the Moon at a distance of about 13,200 miles (21,200 km). The agency stressed that the update "reflects improved precision in our understanding of where the asteroid is expected to be in 2032 rather than a shift in its orbital path." The announcement closes a remarkable chapter in planetary defence that began in late 2024, when the approximately 60-metre-wide asteroid briefly became the most closely watched near-Earth object in the world. Discovered on December 27, 2024, by the ATLAS telescope in Chile, 2024 YR4 initially appeared to have a small chance of colliding with Earth on December 22, 2032. As astronomers gathered more observations, the impact probability briefly climbed to around 3%—the highest ever recorded for an asteroid of its size—before steadily falling as its orbit became better understood. By early 2025, international observations had ruled out any significant risk to Earth. However, astronomers were left with another possibility: a roughly 4% chance that the asteroid could instead strike the Moon. "The probability that asteroid 2024 YR4 will strike the Moon on 22 December 2032 is now approximately 4%," the European Space Agency (ESA) had said last year, noting that "there is a 96% chance that the asteroid will not impact the Moon." ESA said such an impact, while unlikely, would have presented an extraordinary scientific opportunity. "It is a very rare event for an asteroid this large to impact the Moon – and it is rarer still that we know about it in advance. The impact would likely be visible from Earth, and so scientists will be very excited by the prospect of observing and analysing it," said Richard Moissl, Head of ESA's Planetary Defence Office. "It would certainly leave a new crater on the surface. However, we wouldn't be able to accurately predict in advance how much material would be thrown into space, or whether any would reach Earth," he added. The asteroid also exposed an important blind spot in planetary defence. Because 2024 YR4 approached Earth from the direction of the Sun, it remained hidden from ground-based telescopes until after its closest approach. "We looked into how Neomir would have performed in this situation, and the simulations surprised even us," Moissl said. "Neomir would have detected asteroid 2024 YR4 about a month earlier than ground-based telescopes did. This would have given astronomers more time to study the asteroid's trajectory and allowed them to much sooner rule out any chance of Earth impact in 2032." He added, "As an infrared telescope, like Webb, Neomir would have also immediately given us a much better estimate for the asteroid's size, which is very important for assessing the significance of the hazard." The latest NASA observations underscore the value of space-based infrared telescopes in tracking faint asteroids. According to NASA, Webb made "among the faintest ever observations of an asteroid," extending the object's observational record by nearly eight months at a time when it had become too faint for other telescopes. That additional data allowed scientists to eliminate the remaining uncertainty surrounding its 2032 flyby. Although asteroid 2024 YR4 is now confirmed to pose no threat to either Earth or the Moon, scientists say its discovery remains one of the most significant real-world tests of the international planetary defence system, demonstrating how continued observations can rapidly transform an object once considered hazardous into one whose future path is known with high confidence. Source: NASA, ESA This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • Yup. Google is just scraping the entire internet for their own ad profits without sharing revenue with the sources. It's obviously stealing, but since these sites depend upon Google's search scraps to survive... As for me, I just stopped using Google for anything except Reddit searches. If Reddit's own search wasn't complete crapola, I'd never use Google search again.
    • I had a feeling this was coming. Picked up my first Mac ever last Saturday. Glad I did.
    • In a major surprise there is actually some good deals for the first time in years. At least for me.
  • Recent Achievements

    • Conversation Starter
      Admir earned a badge
      Conversation Starter
    • First Post
      The_Focal_Point earned a badge
      First Post
    • Apprentice
      daryld went up a rank
      Apprentice
    • Contributor
      Carltonbar went up a rank
      Contributor
    • One Month Later
      The_Focal_Point earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      419
    2. 2
      +Edouard
      170
    3. 3
      PsYcHoKiLLa
      130
    4. 4
      Xenon
      69
    5. 5
      neufuse
      69
  • Tell a friend

    Love Neowin? Tell a friend!