0

I have Automatic failover and failback configuration HAPROXY:

defaults
 mode http
 option http-server-close
 timeout client 20s
 timeout server 20s
 timeout connect 4s

frontend ft_app
 bind 10.0.0.100:80 name app
 default_backend bk_app

backend bk_app
 server s1 10.0.0.1:80 check
 server s2 10.0.0.2:80 check backup

How can I implement a delay between switching, when primary server to come back?

1 Answers1

0

On the server line, consider adding:

rise n where n is the number of consecutive checks required before the server is considered healthy (default 2).

inter ms where ms is the interval in milliseconds between consecutive health checks (default 2000). See also fastinter and downinter, which further modify health check timing when the server is in various states.

Michael - sqlbot
  • 22,658
  • 2
  • 63
  • 86