Use backups if unavailable (not just down)
- by PriceChild
Using haproxy, I want:
A pool of 'main' servers and 'backup' servers, though they don't necessarily have to be in separate pools.
Each backend has a low 'maxconn' (in this case 1)
Clients should not wait in a queue. If there are no immediately available servers in the 'main' pool they should be shunted to the 'backup' pool without delay.
Right now I have one backend, 'main' servers have an absurdly high weighting and it 'works'.
acl use_backend + connslots is along the right lines but without the patch in my own answer it isn't perfect.
Bonus points for not requiring a modified haproxy binary.