[SATLUG] Simple fail-over options
Luis Garza
luis at luisgarza.com
Wed Nov 14 11:03:26 CST 2007
That's true. But he was going to write a script that pings and changes
the ip address of the other server.
Instead he can change the A record on the dns server.
As for the caching, he can set the TTL or time to live to something small.
But I think that maybe the real problem is keeping the two web servers
in sync.
An easy way would be to rsync the "original" content from server 1 to
server 2.
Another was would be to use some software that does version control.
That way server 1 could be the development server and server 2 would be
the live server. With a CVS or WEBDav, they can have version control on
the development server. When it is ready to be deployed to the live
server or server 2, the server 2 would just check out the new files.
If the live server or server 2 does go down and they want to user the
development server or server 1 as the temporary live server, then they
can use CVS or WEBDav to check back in the original live files on the
development server or server 1 and change the DNS A record entry from
server 2 to server 1.
That way when the live server or server 1 does come up, it will have it
original IP and hopefully content.
Changing the IP of server 1 to server 2's IP would work. But if they
are using server 1 for a development server or it is not a complete
mirror of server 2 then you can have problems with different content or
the way that the site behaves.
There is more than one way to skin a cat. Here kitty kitty kitty!
Luis
Victor wrote:
> The DNS solution returns either IP address regardless of which server
> is down. And with caching, it's not the best idea.
>
> On Nov 13, 2007 11:34 PM, Luis Garza <luis at luisgarza.com> wrote:
>
>> Samuel Leon wrote:
>>
>>> I need to get redundancy on a business webserver. Not really sure how
>>> to go about this. First I got to figure out the best way to keep the
>>> 2 servers synced. And then I was thinking about maybe writing a bash
>>> script on server#2 or something that would ping server#1 every minute
>>> or so. Then if the ping times out, it will run another script to
>>> change its IP to server#1's IP. Seems like it would work as long as
>>> server#1 is truly down and doesn't come back to life and we end up
>>> with 2 of the same IP's on the same network. Sound good or alittle
>>> too dirty?
>>>
>>>
>>> Sam
>>>
>> Well,
>>
>> To keep the 2 servers synced, you may consider WEBDav or CVS. I am
>> assuming that you may have one development server and a live server.
>> That way you can develop on one when it is finally done, you can have
>> the live server request the updated file.
>>
>> If they are the same, then rsync and backup one server to the other.
>> This can be tricky if you are also using a mysql database.
>>
>> As for your second scenario, I would setup DNS to load balance between
>> the two servers. That way if server#1 does down the DNS will respond
>> with server#2's IP address. Look up DNS and round robin.
>>
>> Luis
>>
>> --
>> _______________________________________________
>> SATLUG mailing list
>> SATLUG at satlug.org
>> http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
>> Powered by Rackspace (www.rackspace.com)
>>
>>
More information about the SATLUG
mailing list