Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4717

The 'grace' is deprecated and will be removed in a future version

$
0
0

Hi,

I’ve recently upgraded to a newer version of Haproxy and was hit by this warning:

The ‘grace’ is deprecated and will be removed in a future version

When researching I stumbled upon this inthe release notes:

  • The grace directive has been marked as deprecated and is scheduled tentatively for removal in 2.4 with a hard deadline of 2.5. It was meant to postpone stopping of a process during a soft-stop, but is incompatible with soft reloading. We suspect that it is not widely used, but the warning will help us to know if some specific uses remain.

I guess we’re one of those users of this specific function. We’re using Haproxy in a dockerized environment so we do not reload Haproxy, we replace it, and when a node goes down for maintenance it takes some time to bring it down so we use grace. This is our use-case:

listen fe_ingress_stats
  bind *:8887
  mode http
  stats enable
  stats show-legends
  stats show-node
  stats uri /

  acl going_down stopping
  grace 10s
  monitor-uri /healthy
  monitor fail if going_down

It is my understanding that grace will keep the listen alive for 10 seconds after SIGUSR1 has been issued, but the monitor uri will return failing if the process is stopping.

We then have our loadbalancer listening on /healthy like this:

  # Haproxy dashboard answers on /healthy on port 8887
  health_check {
    healthy_threshold   = 2
    unhealthy_threshold = 2
    timeout             = 3
    target              = "HTTP:8987/healthy"
    interval            = 5
  }

Are there any way I can achieve the same without grace?

(Original thread: Using `stopping` variable from internal state together with `monitor fail`)

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>