This policy uses a new policy matching algorithm. Do not combine with the now deprecated FaultInjection policy.
Mesh Fault Injection
You are browsing documentation for an older version of Kong Mesh. See the latest documentation here.
Configuration
MeshFaultInjection lets you configure a list of HTTP faults. They execute in the same order as they were defined.
default:
http:
- abort:
httpStatus: 500
percentage: "2.5"
delay:
value: 5s
percentage: 5
responseBandwidth:
limit: "50Mbps"
percentage: 50
- abort:
httpStatus: 500
percentage: 10
- delay:
value: 5s
percentage: 5It’s worth mentioning that percentage of the next filter depends on the percentage of previous ones.
http:
- abort:
httpStatus: 500
percentage: 70
- abort:
httpStatus: 503
percentage: 50That means that for 70% of requests, it returns 500 and for 50% of the 30% that passed it returns 503.
Abort
Abort defines a configuration of not delivering requests to destination service and replacing the responses from destination data plane by predefined status code.
httpStatus- HTTP status code returned to the source side, in the [100 - 599] rangepercentage- a percentage of requests on which abort will be injected, has to be in [0.0 - 100.0] range. If the value is a double number, put it in quotes.
Delay
Delay defines a configuration of delaying a response from a destination.
value- the duration during which the response is delayedpercentage- a percentage of requests on which abort will be injected, has to be in [0.0 - 100.0] range. If the value is a double number, put it in quotes.
ResponseBandwidth limit
ResponseBandwidth defines a configuration to limit the speed of responding to requests.
limit- represented by value measure in Gbps, Mbps, kbps, or bps, for example10kbpspercentage- a percentage of requests on which abort will be injected, has to be in [0.0 - 100.0] range. If the value is a double number, put it in quotes.