need some advice before i go running into LVS only to find its not what i want.

im looking to replace our current load balancing software (XR or crossroads as its also know). as we are getting a lot of unexpected crashes randomly from the software. i have spoken with the developers many times including logs and other data yet we are still getting problems.

i would like some advice regarding LVS and if its capable of doing what we presently do with XR.

This is what we presently do using XR (crossroads).

we have a server at amazon running linux which houses XR this system has three IP addresses configured for it to monitor, our DRP site the server is on but IIS is disabled, so XR effectively sees it as DOWN and does not route traffic to it.

Our primary server at our offices which XR will see as UP due to it serving content and a last resort which is an apache instance running on the Amazon linux box serving a static webpage saying our systems are being worked on please be patient (words to that effect).

when traffic comes in to the amazon system it automatically routes it to our system as its first in the server list and was found to be active, if our main server goes down then the next one in the config is the backup, which would automatically start up and then have traffic passed to it. if both servers failed, then then last one in the list is the internal apache box which would then start getting traffic and serve a page explaining things are not working.

can i do this within LVS? i know a normal LB solution would have at least two hosts and the LB would seamlessly distribute traffic between them etc?

any advice on this would be appreciated or any suggestions on alternatives to what we are using (ideally no costs involved).


can i do this within LVS?

Yes, to real server and one sorry. LVS(IPVS) is a functional Linux kernel, for management cluster you can use keepalived.

HAProxy is a load balancing proxy server.

  • so am i right in thinking that LVS does not do the load balancing / HA once installed you have to install seperate components to get it working? – Kristiaan Jan 31 '11 at 13:39
  • LVS only engineer. You need install control tools(ipvsadm or keepalived) – alvosu Jan 31 '11 at 14:47

ipvsadm (aka lvs) does only set up the load-balancing. It does not monitor the real servers. We use lvs-kiss to accomplish that. There you can define

  • A test method for the real server (is it up or down)
  • The time the test method needs to finish can be taken to influence the balancing of incoming requests
  • You can define a script to run on failure of a real server (e.g. take it out from ipvsadm completely, so already connected clients are forced to reconnect to the survivors)
  • Define a script to run on recovery

In the run-on-failure script you could count the surviving real servers. If that drops to zero you could start a local (i.e. located on the LB itselv) static http server on the logical ip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.