a56e7122d6
This commit replaces the simplistic rate limiting technique added in 557cb6e2, to use the golang.org/x/time's rate limiter. This has the benefit of performing traffic shaping to meet a target maximum rate, and yet tolerate bursts. Bursts are expected during initial sync, though should become more rare afterwards. Performing traffic shaping with this mechanism should improve the ability of the gossip syncer to detect sustained bursts from the remote peer, and penalize them appropriately. This commit also modifies the default parameters to accept bursts of 10 queries, with a target rate of 1 reply every 5 seconds. |
||
---|---|---|
.. | ||
ann_validation.go | ||
bootstrapper.go | ||
gossiper_test.go | ||
gossiper.go | ||
log.go | ||
syncer_test.go | ||
syncer.go | ||
utils.go |