Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're running multiple sites on the same hardware, and we'd like to serve them using the same pool of application machines. However, one site periodically gets greatly-increased traffic, and so we'd like to reserve a small section of machines for only the other sites.

Is it possible to do something like this in HAProxy?

backend foo
    server app00 cookie app00 check
    server app01 cookie app00 check
    server app02 cookie app00 check

backend bar
    server app03 cookie app03 check
    include foo

I realize that we could simply define the machines in multiple rules, but I'd rather avoid duplication if possible.

share|improve this question
I don't see anything in the manual that seems to prevent this. Couldn't you just try it? – gparent Mar 27 '12 at 20:16
Well, I didn't see anything in the manual that indicates there's an include statement, either. ;) FWIW, I tried it, and there is indeed no include statement allowed in backend clauses. – Xiong Chiamiov Mar 27 '12 at 23:40
So it looks like this will never happen. Bummer. – Xiong Chiamiov Aug 13 '12 at 22:05

Your Answer


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

Browse other questions tagged or ask your own question.