-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Title: Add a Kill Request HTTP filter which can crash Envoy when enabled by a Kill request
Description:
We plan to add a KillRequest HTTP filter which can crash Envoy when receiving a Kill request. It will be used to fault inject kill request to Envoy and measure the blast radius.
The new KillRequest filter will be disabled at build time by default in Envoy by comment out the KillRequest filter extension in extensions_build_config.bzl
KillRequest API
KillRequest filter can be configured through the KillRequest proto:
// Configuration for KillRequest filter.
// [#next-free-field: 2]
message KillRequest {
// The probability that a Kill request will be triggered.
type.v3.FractionalPercent probability = 1;
}Users can specify the probability of Envoy being killed by a Kill request in KillRequest proto. The motivation for the probabilistic feature is to measure how fast the Envoy pool can recover and how many requests will fail during Envoy is down when clients are sending requests to a large Envoy pool with small probability of killing Envoy.
Header Control
The KillRequest filter will be controlled via HTTP header x-envoy-kill-request. The header value must be one of (case-insensitive) ["true", "t", "yes", "y", "1"] in order for the request to be a Kill request.
To summarize, Envoy will be crashed by a Kill request if all of the following conditions are satisfied:
x-envoy-kill-requestheader must be present with header value in one of (case-insensitive)["true", "t", "yes", "y", "1"]- A random process determines the KillRequest filter is enabled with probability configured in
KillRequestproto.
If KillRequest filter is not enabled, the filter does nothing and passes on the request to the next filter.
\cc @htuch