Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Why I expect this is not the best way to solve the problem, I got thinking tonight.

I'm thinking about geo-locating servers. Given we have a load balancer + two servers to handle traffic in NA (North America) and one server in the EU.

If the two US servers die, is it possible to get HAProxy to direct traffic automatically to the EU one.

However, I don't want to use a roundrobin approach for the EU - just the two US ones. The EU should only be hit when the other two are down.

Does anyone know how to configure HAProxy to do this?

Thanks

Ben

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Indeed, it's the "backup" setting which does that. If you have multiple backup servers, you can also add "option allbackups" in the backend section to load-balance across them in case of active servers failure.

share|improve this answer

Sorry, found the answer!

http://haproxy.1wt.eu/download/1.3/doc/haproxy-en.txt

"To make a server a backup one, simply add the 'backup' option on its line."

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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