Netflix / ocelli

Apache License 2.0
53 stars 28 forks source link

Implement rate limiter / load shedder #44

Open elandau opened 9 years ago

elandau commented 9 years ago

Not sure this belongs here or in Hystrix but we need a rate limiter that sheds load when latencies shoot up. The rate limiting operation needs to be performed per operation.

Proposed implementation

Use a modified leaky bucket to limit the total time allotted to the client for accessing a service.

The above algorithm may give too much bias to L_actual should there be an extreme outlier. This can be mitigated using an exponential average of recorded latencies to smooth out occasional outlier. To adapt to changing latency trends the system may use a longer exponential average to adjust L_avg.