I am using JMeter to load test my service. But a lot of my calls are returning a 504 (Gateway Timout). Researching this has shown that Envoy has a default of 15 seconds for a time out for egress calls. (Meaning calls my service makes to other services.)
In an attempt to extend this timeout I am trying to add an EnvoyFilter
. I found an example of one here: https://github.com/istio/istio/issues/16915#issuecomment-760892724
But it uses syntax that is no longer supported. I have tried to update it to the latest syntax, but it is not working. And when it is active, I cannot load the swagger docs for the service.
Here is my current attempt:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: istio-outbound-traffic-timeout
namespace: devunstable-framework-logging
spec:
workloadSelector:
labels:
app: logging-service-devunstable-team1
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_OUTBOUND
patch:
operation: INSERT_BEFORE
value:
name: envoy.lua
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():add("x-envoy-upstream-rq-timeout-ms", "600000")
end
If there is an Envoy expert out there who can help me figure out how to add this header to my outbound (egress) requests, I would be grateful.