Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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 am running 2 Debian web servers. One is a mirror of the other. What I am looking for is a seamless fail over solution. I have read a lot about KeepAliveD (http://www.keepalived.org/), but from what I can tell it can only be implemented in a LVS (http://www.linux-vs.org/) setup, which is a kind of over kill for what we are doing. We only have 2 servers and do not necessarily need to load balance.
Are you running a DB on the servers?
If it is a database driven web site you will have to have an external db server or a external disk array with both apache servers having access to the db on the array's.
The problem being if one server fails mid transaction how do you know if the db on the other server has been updated? Even with a mirror there is delay. I've found no cheap way to accomplish this. But ....I'll admit it has been awhile since I looked into this (a year or so).
Are you running a DB on the servers?
If it is a database driven web site you will have to have an external db server or a external disk array with both apache servers having access to the db on the array's.
The problem being if one server fails mid transaction how do you know if the db on the other server has been updated? Even with a mirror there is delay. I've found no cheap way to accomplish this. But ....I'll admit it has been awhile since I looked into this (a year or so).
No, there really is no cheap way to do this effectively. You get what you pay for in this case.
You can come close with some manual juggling, like having a mirrored disk set, and periodically 'breaking' the mirror, removing the drive, and putting a blank/old one in to remirror to, and putting the one you just removed in a different location. But this is risky, involves downtime, and is VERY manual. Snapshots with systemimager or mondoarchive will let you recovery quickly, but your server will still be down while you do it.
The only 'real' way to do it is to have a duplicate server, either in a cluster or pre-configured in a 'hot-standby' mode, so that if one fails, the other takes over. Database driven? MySQL replication or Oracle RAC. If you want 24/7/365 with no downtime, you're going to have to have a fat wallet, the willingness to spend it, and some skills to configure it all.
I am running MySQL on both servers, 1 slave and 1 master replicating. Of course "some" data loss is acceptable.
Is there anyway for a backup server to know that the master is "out of commission" and assume the masters role, taking over the public IP address and start serving content.
I guess I wondering if there is a project out there that accomplishes this.
I am running MySQL on both servers, 1 slave and 1 master replicating. Of course "some" data loss is acceptable.
Is there anyway for a backup server to know that the master is "out of commission" and assume the masters role, taking over the public IP address and start serving content.
I guess I wondering if there is a project out there that accomplishes this.
I don't know if you can do it automatically, but there IS a procedure you can run to failover. If you implemented that in conjunction with heartbeat over a crossover cable between dedicated NIC's (which would remove a failed switch/router out of the equation), you could probably automate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.