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

Add HTTP headers for controlling percentage of requests faults should be applied to #10648

Closed
Augustyniak opened this issue Apr 4, 2020 · 1 comment
Milestone

Comments

@Augustyniak
Copy link
Contributor

Augustyniak commented Apr 4, 2020

Title:
Add support for HTTP headers controlling the percentage of requests Envoy injects faults into.

Context:
Envoy currently supports 3 types of faults it can ingest when it receives special HTTPs headers as part of ingress network requests. These HTTP headers are: x-envoy-fault-abort-request, x-envoy-fault-delay-request and x-envoy-fault-response-limit and their documentation can be found here. Envoy always ingests a fault when it sees one of the aforementioned HTTP headers. There is no way to tell Envoy what percentage of requests a given fault should be applied to.

Proposal
Add support for 3 additional HTTPs headers that would allow mobile applications talking with Envoy to tell Envoy what % of requests a given type of fault should be applied to:

Header Being Proposed Possible Values of Proposed Header Corresponding Runtime Setting
x-envoy-fault-abort-request-percentage int from (0, 100] Range fault.http.abort.abort_percent
x-envoy-fault-delay-request-percentage int from (0, 100] Range fault.http.delay.fixed_delay_percent
x-envoy-fault-response-limit-percentage int from (0, 100] Range fault.http.rate_limit.response_percent
  • Envoy will check the value of x-envoy-fault-abort-request-percentage header only if x-envoy-fault-abort-request is present. The same is true for other header pairs:
    • x-envoy-fault-delay-request-percentage and x-envoy-fault-delay-request
    • x-envoy-fault-response-limit-percentage and x-envoy-fault-response-limit
  • If a header responsible for providing percentage value is not present Envoy will assume that the percentage is equal to 100. This approach makes the proposed API backward compatible.

Relevant Links
This EnvoyMobile Issue explains in detail why we cannot put 'percentage' logic on the client-side if our mobile application use EnvoyMobile networking library.

@Augustyniak Augustyniak changed the title Add HTTP headers for controlling percentage of requests faults are injected into Add HTTP headers for controlling percentage of requests faults should be applied to Apr 4, 2020
@mattklein123 mattklein123 added this to the 1.15.0 milestone Apr 14, 2020
@Augustyniak
Copy link
Contributor Author

The changes proposed as part of this issue were implemented in #10724. Since the PR was merged I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants