backup servers as overflow servers

From: Dale Roberts <roundcube#daleroberts.info>
Date: Tue, 22 Jan 2008 15:41:47 +0000

Hi all

I just wanted to know if, with HAProxy, you can have a client request sent to a backup server if all the non backup server are still alive, but overloaded (as defined by maximum connection count, maximum queue size and connecion timeouts).

I ask, as I'd like to be able to send "current" users of web site (i.e. those with a cookie) as well as excessive new users (i.e. those without a cookie) to a backup server so that they get a nice "we are busy, please try again later" message. I'm happy for users to get a cookie that "binds" them to that backup server till they close their browser as they will alleviate problem of impatient page refreshes.

Obviously other suggestions on how to nicely do this are welcomed.

From my reading of the manual for HAProxy (not quite exhaustive yet) and some brief fiddling I can see that once connected to a backup server (and armed with it's cookie) you get returned to that backup server even when the main server are back on-line. But it appears that if the normal server are on-line and you're connection can't be served you get a 503 error, with no way to tell HAProxy to instead re-dispatch the request to a backup server.

I hope this makes sense and many thanks in advance for any feedback. Received on 2008/01/22 16:41

This archive was generated by hypermail 2.2.0 : 2008/01/22 16:45 CET