-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Envoy's fault filter supports abort faults. When Envoy inject an abort fault it returns a response that uses text/plain as its content-type and sets "fault filter abort" as its body.
At Lyft, mobile clients try to deserialize every response that they get from the server (or/and Envoy). There are a few known issue when it comes to deserializing responses that are sent by Envoy's fault filter when an abort fault is injected:
- Even though Lyft mobile applications set
application/jsonor/andapplication/x-protobufas the value ofacceptheader that they send as part of network requests that they make, Envoy filter returns a response withcontent-typeequal totext/plain. - There is no easy way to tell when Envoy injected a fault - a mobile client would need to look for "fault filter abort" body of a request in order to be sure that Envoy injected a fault but hard-coding a string like this on the client is not preferable. Can a client just assume that every request with
x-envoy-fault-abort-requestHTTP header set ends up getting an abort fault in response? No, it's not that simple because of the existence ofx-envoy-fault-abort-request-percentageHTTP header. If a client sends a request withx-envoy-fault-abort-requestHTTP header equal to 503 andx-envoy-fault-abort-request-percentageequal to 10 (10%) it's up to the Envoy to decide whether a fault should be injected or not (with 10% chance of the fault being injected).
Because of the aforementioned issues with the current Envoy's fault filter responses the following changes to fault filter's responses is proposed:
- Make fault filter return an empty response if an abort fault is injected.
- Make fault filter set the value of
x-envoy-injected-faultsHTTP header toabortevery time an it injects an abort fault.
Reactions are currently unavailable