Skip to content

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

@Augustyniak

Description

@Augustyniak

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions