0

My haproxy configuration is like this:

backend my-liveBackend
    timeout connect 5s
    timeout server 600s
    mode http
        balance uri len 52
        server my-live-backend1 10.80.1.161:8080 check
        server my-live-backend2 10.80.1.162:8080 check
        server my-live-backend3 10.80.1.163:8080 check
        server my-live-backend4 10.80.1.164:8080 check
        server my-live-backend5 10.80.10.165:8080 check backup
        server my-live-backend6 10.80.10.166:8080 check backup
        server my-live-backend7 10.80.10.167:8080 check backup
        server my-live-backend8 10.80.10.168:8080 check backup

When a non-backup server fails, haproxy doesn't activate a backup server to replace it:

enter image description here

I understand that haproxy will only activate a backup if ALL non backup fail:

https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-backup

When "backup" is present on a server line, the server is only used in load balancing when all other non-backup servers are unavailable.

We actually need a bunch of servers active (ideally 4) and some as backup when we do maintenance on the active ones. Is there an option that allows to do this? A bit like "I want at least 4 servers always active".

I couldn't find anything in the documentation to do that.

My expectation would be like this:

  • live1 UP
  • live2 DOWN
  • live3 UP
  • live4 UP
  • live5 BACKUP UP ACTIVE <<== replaces 2 while 2 is in maintenance
  • live6 BACKUP UP INACTIVE
  • live7 BACKUP UP INACTIVE
  • live8 BACKUP UP INACTIVE

1 Answer 1

0

Ok so I got up and went to the haproxy maintainer and he responded: it is on the roadmap but no ETA and this is a complicated code change.

See here: https://github.com/haproxy/haproxy/issues/866#issuecomment-776658824

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.