-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Title: Add capability to control abort-percentage & abort-http-status settings using HTTP headers
Context: At Lyft, we have plans to run client-side fault injection tests. These tests would allow engineers to gain visibility into how our apps actually behave in degenerate conditions such as backend service mesh outages and connectivity loss. Some example use cases include:
- Simulating client-side app behavior when a series of endpoints or service goes down.
- Identifying client error-handling issues for specific request error status code.
Proposal:
Our plan is to add the following capabilities to http/fault/fault_filter.cc:
- Specify a % of ingress requests that should be aborted
- Specify the HTTP status code that should be returned for aborted requests
These capabilities are already available as fault injection runtime settings. We have an example of similar settings being controlled using HTTP headers - see x-envoy-fault-throughput-response and x-envoy-fault-delay-request HTTP headers that were implemented as part of this Github Issue.
We propose to add support for the following two HTTP headers:
| HTTP Header | Type | Associated Runtime Setting |
|---|---|---|
| x-envoy-fault-abort-percentage | int (percentage between 0 and 100) | fault.http.abort.abort_percent |
| x-envoy-fault-abort-http-status | int (status codes e.g. 504, 404, etc.) | fault.http.abort.http_status |