suppose you only have 2 servers, would you like to place a web server on each. You want webserver X to be primary and serves all the request at all time unless it is down, at which time Y should kick in.
No load balancer is allowed to since it would not increase availability(it would have to sit on the same server as X and would likely be down if X is down).
Both X and Y service request via the same host name of course.
is this possible?
|
|
|||||
|
migrated from stackoverflow.com Jun 5 '11 at 16:47
|
Use keepalived. Configure each host with a distinct IP, then configure a shared IP in keepalived. Point your www DNS record at the shared IP. |
|||
|
|
|
Several ideas popp to mind. You'll have to research them to figure out which fits your situation the best, as I'm missing some information which would factor into it. CARP - Good if you're running FreeBSD or OpenBSD. I think that a variant is ported to Linux, but is implemented in userspace instead of at the OS level. I'm not positive. You can get some good details in the FreeBSD handbook, if you're running that. See also HAST for file synchronization. Reverse proxy - You can use this feature in apache or squid. Bsically, you have web server X and reverse proxies Y and Z. Then X has the authoritative data and requests to either Y or Z will cause them to ask X for the data. I use this to put a firewalled Mac mini on the Internet and have it dish out content from some proprietary/embedded Windows services. Then vulnerabilities in Windows become less of an issue. So in my case, it's more about security and my lesser skills are securing Windows. However, I've heard of some people using this to make "load balancing." IP - If you don't mind having to do this manually, you can always just reconfigure the IP of the second server to become the first. Not elegant or quick, but cheap and somewhat easy. CARP (see above) is effectively an automation of this. You may even be able to use a mix of cron, shell, and ping to vaguely simulate this. Load balancer hardware - I've heard of this from people with bigger systems than the one I administer. I don't know a lot about it, but it's out there. Hope that helps. |
|||
|
|
|
This can be accomplished by setting up Round-robin DNS witch works by responding to DNS requests not only with a single IP address, but a list of IP addresses. |
|||
|