[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache clustering w/ load balancing and failover

Thomas Lamy wrote:

Mathieu Martin wrote:
Mario Lopez wrote:

Why not using 'roundrobin' ???

Install a couple of Web-Servers, give each Server an IP and then setup for each Server a A-Record on your DNS-Server pointing to the same hostname.
The problem with round robin is that when one server fails
over it keeps sending them connections, I once saw a DNS server implemented in Perl which worked in a round robin fashion but making some kind of test to know if the server was up and running correctly, I remeber it was called something like "lb-named"

Why not use (keepalived?) with round robin dns then?. You get load balancing, redundancy, and you don't need unnecessary additionnal servers or kernel patches or whatever. Even with a lot of servers, it should scale pretty well. Works too with servers in several locations on different internet pipes, as long as there are at least two servers on each pipe for redundancy.

You're wrong. round robin dns isn't HA, isn't load balancing, it's just
request spreading. You can't control how many (DNS-)clients cache one of the
RR IP's, therefore you won't get even load on your RR'ed servers.
Plus you _have_ to use a tool like "lb-named" to keep your round robin dns
from giving out the IP of a failed server.

It really comes down to using LVS+(keepalived|heartbeat|...) or pen.

If you use keepalived to switch IP's, you don't care about your dns server giving the IP of a failed server because your working server(s) keep answering on the ip of the failed server. And BIG isp's caches cache entire dns query results (all ip's, not only one). It's up to the client's dns resolver to use one IP at random. If you've got enough volume that you need load sharing, you should have enough randomness to split the load _almost_ equally. Of course, I'm not saying this is as good as a real LVS setup, but it could be a good compromise.


Reply to: