How to configure Tyk to retry upstream requests

How would I go about configuring Tyk to retry requests a certain number of times to an upstream server in the event of failures such as timeouts.

I’d like to, for example retry 3 times before giving up and possible when failed the last time invoke a callback .

1 Like

This is not natively possible with Tyk, it would be the client’s responsibility to retry on failure.

You could however achieve this by offloading to a custom plugin. Python, Lua, Javascript or gRPC.

Something to consider is the complexity of doing this, eg which error response codes are acceptable to perform retry, if it retries on timeout, do you retry on post/put/patch requests - which could be dangerous?