For each incoming request, we want Kong to return a response after a maximum of 60 seconds.
Therefore, we are using the Service entity default values for connect_timeout, write_timeout and read_timeout.
The service retries attribute is also set to the default of 5.
However, if the upsteam is not responding within 60 seconds, Kong will try again - up to 5 times. In this case, Kong returns a response to the client only after 60*6 seconds…
We can set the retries attribute to 0 to fix this but then we will miss the benefit of the retry in case of poor connection etc’.
Is there an option to set up a timeout for the whole request process including retries? Or maybe to restrict the retries mechanism only to failures that are not timeout?
Kong will retry for connect and read timeouts (as defined on Service object in Kong) while communicating with upstreams.
I’m not sure what is the behavior of write timeouts.