uber-archive / hyperbahn

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

Fix circuit breaker bug from prod. #219

Closed Raynos closed 8 years ago

Raynos commented 8 years ago

We were double counting the circuit breaker by calling circuit.onRequest() but then noting that we could not handleLazily and returning early.

This broke the circuit breaker, we also potentially double count rate limiter.

In fact we do EVERYTHING again for the eager path; I think this entire code path from "try lazy; oops eager" is going to be brutally expensive for ad() and relay-ad()

We may have to port ad() and relay-ad() to be fully lazy endpoints for performance reasons.

r: @rf @kriskowal @jcorbin

kriskowal commented 8 years ago

:ok:

jcorbin commented 8 years ago

Good catch... this was a terrible bug.

rf commented 8 years ago

:+1: