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.

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 0.0.0.0 cookie app00 check
    server app01 0.0.0.0 cookie app00 check
    server app02 0.0.0.0 cookie app00 check

backend bar
    server app03 0.0.0.0 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
1  
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
1  
serverphorums.com/read.php?10,335637 –  quanta Aug 12 '12 at 8:24
    
So it looks like this will never happen. Bummer. –  Xiong Chiamiov Aug 13 '12 at 22:05
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.