Search code examples
haproxy

HAProxy and DNS SRV priority and weight


If DNS SRV record has weight and priority equal to zero is that record is used by a haproxy or effectively disabled? I'm asking this, because all my SRV records in DNS server have a priority and weight set to zero and on stats page I see that all my servers are set to active or soft disabled and I get 503 Service unavailable.

enter image description here


Solution

  • A SRV weight of 0 becomes an haproxy weight of 0. An haproxy weight of 0 means "don't send traffic to this backend", aka DRAIN state (but that backend can receive traffic in some cases, e.g. session sticking).