pool/worker: increase worker timeout to 90s

This commit increases the default worker timeout currently backing the
read and write pools. This allows the read and write pools to sustain
regular bursty traffic such as ping/pong without releasing their buffers
back to the underlying gc queue. In the future, jitter can be added to
our ping and/or gossip messages to reduce the concurrent usage of read
and write pools, which will make this change even more effective.
This commit is contained in:
Conner Fromknecht 2019-04-01 17:16:03 -07:00
parent 3a19afe46d
commit d75112ce8d
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

View File

@ -13,7 +13,7 @@ var ErrWorkerPoolExiting = errors.New("worker pool exiting")
// DefaultWorkerTimeout is the default duration after which a worker goroutine // DefaultWorkerTimeout is the default duration after which a worker goroutine
// will exit to free up resources after having received no newly submitted // will exit to free up resources after having received no newly submitted
// tasks. // tasks.
const DefaultWorkerTimeout = 5 * time.Second const DefaultWorkerTimeout = 90 * time.Second
type ( type (
// WorkerState is an interface used by the Worker to abstract the // WorkerState is an interface used by the Worker to abstract the