-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
Welcome!
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've searched similar issues on the Traefik community forum and didn't find any.
What did you expect to see?
While reading through the source I was surprised to see that when Traefik performs a healthcheck for servers within a service, it performs them sequentially. I whipped up a quick test and confirmed that this is actually how it behaves. Interestingly, this isn't the case for services which seem to get launched as separate goroutines.
This means that, in the worst-case scenario, the last server in the service's pool will get healthchecked frequency + (timeout * poolSize) seconds apart. In my opinion, this makes the healthcheck frequency config a bit misleading as I would expect that each server is checked <frequency> seconds from the last time it was checked.
What I would like to see is an option to change this behavior and run the healthchecks concurrently. This way, each server in the pool is healthchecked roughly every X seconds defined by the frequency parameter, regardless of the (mis)behavior of other servers in the pool. The config could be something like this:
traefik.http.services.my-service.loadbalancer.healthcheck.concurrent=true