Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admission Control Filter (Client-side Throttling) #9658

Closed
tonya11en opened this issue Jan 10, 2020 · 1 comment
Closed

Admission Control Filter (Client-side Throttling) #9658

tonya11en opened this issue Jan 10, 2020 · 1 comment
Assignees
Labels
area/http no stalebot Disables stalebot from closing an issue
Milestone

Comments

@tonya11en
Copy link
Member

Admission Control Filter

TL; DR: Probabilistically reject outbound requests based on upstream success-rate.

In scenarios where a single request does not have predictable resource utilization, it can be difficult to configure circuit breaker values. Additionally, circuit breakers are unable to protect against connection thrashing, so we rely on local ratelimiting which suffers from the same problems.

It is possible to protect upstreams more generically by detecting when a significant portion of recent requests to an upstream have been rejected and probabilistically reject requests destined for it before sending it on the wire. Finagle calls this admission control and the Google SRE book calls it client-side throttling. Envoy would benefit from a filter that provides this functionality.

The general approach is outlined here, but the idea is that you keep track of the request success-rate over a rolling window and reject outbound requests with a probability of:
image

We would be able to make use of a configurable measure of success, similar to the retry policy's retry_on parameter.

@mattklein123
Copy link
Member

Calling this done with the latest PR that @tonya11en landed. We can open new issues for smaller items as needed. Thank you @tonya11en!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/http no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

No branches or pull requests

3 participants