Reconcile Nomad's server manager back into Consul
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
When Nomad took on something similar to our [server manager](https://github.com/hashicorp/consul/blob/master/agent/router/manager.go) they noticed a few issues that we should take back into Consul:
1. The rate and stagger calculations don't look like they take into account the 10 minute connection pool retention time, so in some cluster sizes the connection pool might hold on to a few connections even after they have been rotated away, meaning we might be connections open to servers that we are no longer using. Take a look at Nomad's updates here and port them back to Consul.
2. The internals of manager.go were simplified drastically around a simple `sync.RWMutex` vs. the atomic stuff, which had been the source of subtle bugs like #3463.
3. Not sure if it's related, but it's worth checking if the mismatch in timing assumptions / creation of possible idle connections is related to the `yamux: keepalive failed: session shutdown` log messages that some users see.
Contributor guide
Assessment
This issue has not been assessed yet.