Status code Retry #12326
Replies: 2 comments 3 replies
-
In Kong, you can achieve custom status code retry functionality, such as retrying when a service returns a 500 status code, using the Here's an example of how you can configure Kong to retry requests when the upstream service returns a 500 status code: upstream my_upstream {
server backend1.example.com;
server backend2.example.com;
server backend3.example.com;
}
server {
location / {
proxy_pass http://my_upstream;
proxy_next_upstream error timeout http_500; # Retry on 500 status code
upstream_retry max=5 timeout=1s;
}
} In this example:
By combining these directives in your Kong configuration, you can customize the retry behavior based on specific status codes, such as retrying only on 500 status codes, while still having control over the retry count and timeout. Answered by ChatGPT |
Beta Was this translation helpful? Give feedback.
-
AFAIK, it can not apply a specific retry strategy for a service |
Beta Was this translation helpful? Give feedback.
-
How does Kong support custom status code retry functionality, such as retry when the service returns a 500 status code
The proxy_next_upstream configuration is available only globally
Beta Was this translation helpful? Give feedback.
All reactions