uber-archive / hyperbahn

Service discovery and routing for large scale microservice operations
MIT License
396 stars 57 forks source link

Add subchannel update damper #307

Closed kriskowal closed 7 years ago

kriskowal commented 7 years ago

This adds a configurable option for ServiceProxy to debounce requests to update service channels by a minimum period (default 0). The period can be altered by an external agent (remote configuration).

The updateServiceChannels function is not covered by our tests currently. None of our tests appear to exercise ring changes.

Without configuring the min update period, this retains the current behavior, except using setTimeout instead of setImmediately, effectively introducing an implicit minimum delay of 4ms.

r @Raynos

Raynos commented 7 years ago

lgtm.

Recommend hooking up minUpdatePeriod to flipr before deploying.

Recommend spamming restart in travis until you get the "lucky green".

kriskowal commented 7 years ago

@Raynos Added remote config.

Raynos commented 7 years ago

Still lgtm :P