Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have a webserver that I am trying to make so it is never down, I setup a linux server that rsync's all the data from our main webserver hourly, I set that machine to do mysql replication.
The rsync server is in a whole different location/town and we want it so that if power goes out where the main server is or our T1's go down, etc. That it will automaticly roll over to my rsync server and serve the requests from there.
Is there any way to setup bind so if the main site is down it will automaticly roll over to the rsync server in the other town? We have 2 dns servers in the main location and 1 in the location with the rsync server.
I do not want to load balance between the two servers, I only want the rsync server to be accessed if the main site is down.
If you know how I can go about this could you also give me an example config for bind? Thank you very much.
Originally posted by cli_man I have a webserver that I am trying to make so it is never down, I setup a linux server that rsync's all the data from our main webserver hourly, I set that machine to do mysql replication.
The rsync server is in a whole different location/town and we want it so that if power goes out where the main server is or our T1's go down, etc. That it will automaticly roll over to my rsync server and serve the requests from there.
Is there any way to setup bind so if the main site is down it will automaticly roll over to the rsync server in the other town? We have 2 dns servers in the main location and 1 in the location with the rsync server.
I do not want to load balance between the two servers, I only want the rsync server to be accessed if the main site is down.
If you know how I can go about this could you also give me an example config for bind? Thank you very much.
As far is a know it's not possible. You might wanna try something (which is almost the same) a round-robin DNS (some load balancing). But actually you mean you don't wanna do that? It's the only way, to redirect users to different (primary or secondairy dns)
I was looking on google and found the following example and wondered what it was.
www 60 IN A 208.201.239.36
www 60 IN A 208.201.239.37
I found that at: http://hacks.oreilly.com/pub/h/79 What is the 60 in those lines? They looked like priorities, if they are could I just make one of them 10 and the other 50, then it would always send to the one with 10 unless it was down. Is there a way to do a priority on a A record?
Originally posted by cli_man I was looking on google and found the following example and wondered what it was.
www 60 IN A 208.201.239.36
www 60 IN A 208.201.239.37
I found that at: http://hacks.oreilly.com/pub/h/79 What is the 60 in those lines? They looked like priorities, if they are could I just make one of them 10 and the other 50, then it would always send to the one with 10 unless it was down. Is there a way to do a priority on a A record?
No as far as I know. The 60 means the TTL to prevent any intervening caching DNS servers from hanging onto one sort order for too long, which will hopefully help keep the number of requests to each host more or less equal.
Read this article: http://hacks.oreilly.com/pub/h/63 which explains some cheapIP take over but I think it will not fit in your situation...
No that wouldn't work as they are compleatly different classes of ip's so the routing wouldn't work.
I think what I may do is setup my 3rd dns to have a different config in it so that the first two would look at the main server and the 3rd dns would look at the rsync server. The idea being that all dns queries would always go to the first dns, if its not available then try the second, and if its not their go to the 3rd. If both dns1 and dns2 are not available that would mean the whole site was down anyway and then the 3rd would pick up from our other site and point to the rsync server
Use a DDNS server (dynamic DNS). If the main site goes down,
the DDNS servers will receive an update to point to the backup site.
This is not a trivial task.
Several points to consider:
[list=1][*]When is the main site failed? You may to check whether MySQL is up too.[*]How do you test whether the system is up? Maybe a transaction on application level with url_get or the like... The entire system is checked like this. How frequently do you check?[*]You may want to put the primary (D)DNS on the backup site. If the main site goes down, it can be reached to accept address updates[/list=1]
This whole concept goes out of sync if the backup site (or only its link) fails.
I never used backhand. Could be interesting too.
I also saw web sites like www.hp.com returning two IP addresses.
I have no idea how browsers behave in this case.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.