Open itsLucario opened 2 days ago
I was testing a use case where I have a lua filter which sleeps for 4 secs, and added before the envoy router.
There is no guarantee mentioned in the doc that the lua code would run before the router, no?
I just discovered that removing the dynamic_forward_proxy
http filter (that contains cluster_init_timeout
) fixed the 504 Gateway Timeout error. Maybe this is what you are looking for?
But I see the upstream request timeout and sleep-in filter is affecting the upstream timeout. Upstream timeout should be for the time request sent out to time taken by service right.
What does the access logs say, specifically the response flags? https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#:~:text=%25RESPONSE_FLAGS%25%20/%20%25RESPONSE_FLAGS_LONG%25,Possible%20values%20are%3A
I suspect that you're running into another error as the upstream timeout occurs after the full request is complete.
Simplifying the experiment to just lua + router should help tease this out.
I was testing a use case where I have a lua filter which sleeps for 4 secs, and added before the envoy router. We have route timeout configured for 3 secs.
The expectation was the timer begins in router and the lua 4s sleep, which is before router, shouldn't affect the route timeout and request should work. But I see the upstream request timeout and sleep-in filter is affecting the upstream timeout. Upstream timeout should be for the time request sent out to time taken by service right. Time taken in envoy should not affect upstream timeout.
Example: bootstrap.yaml
cds.yaml
lds.yaml
Apply the above yaml and run
curl -vL -H 'Host: httpbin.org' http://localhost:10000/status/200
The expectation was that requests shouldn't timeout as upstream isn't taking time, but envoy's lua filter was. Am I assuming something wrong? Can someone explain this in detail
I see the enable timer happens on router decodeHeaders on end_stream (i.e., downstream request received completely) but behaviour is not the same.