-
I have a simple app which is designed to return 500 error to test linkerd retry. This is a GET request. not POST
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
Hi @kitkars. I may not be correctly understanding your question here. Are you asking about how retry budgets work? It seems like you are correctly understanding it already; Linkerd uses retry budgets, which means that it will always keep a certain ratio of requests and retries. In this case the retry ratio is Does this answer your question? |
Beta Was this translation helpful? Give feedback.
-
I am feeling like it does not work as you might have expected. I designed a simple app which is supposed to fail with 500 error every time. (PLEASE DO NOT USE random.) The problem is - for the above setup it retries 10 times. I tried to access the app. /app just one time. I feel like it is more of a bug. |
Beta Was this translation helpful? Give feedback.
-
@kitkars So looking at Therefore, if you send only 1 request and the service fails every time, then it will be retried 1 time for 10 seconds--the 10 times that you are seeing. If you change |
Beta Was this translation helpful? Give feedback.
-
It sounds like the whole retry process should happen in 10 seconds window with some delay. That is 1 retry / second as it is min retry. After 10 seconds, 10 retries - I should get the final response. But all the 10 retries get completed pretty quickly within 2/3 seconds. If you think this behavior is right, then Is there any way to add a delay between retries? |
Beta Was this translation helpful? Give feedback.
-
I think there's a little bit of confusion over exactly what the ttl means. The Assuming that your service responds very quickly, Linkerd will do these 10 retries quickly, consuming the entire retry budget and then returning the error. If you make a second request, no retry budget will be available until 10 seconds later and no further retries will be attempted until that time. This is all by design. |
Beta Was this translation helpful? Give feedback.
-
@kitkars does the extra info around |
Beta Was this translation helpful? Give feedback.
-
@adleong @cpretzer Kind of helps. Thanks. Question 1: Question 2: |
Beta Was this translation helpful? Give feedback.
-
The backoff between reties is not configurable. The design of retries is intended to address random errors. The idea here is that if you have a request which fails, it is retried so that it might succeed the second time (or the third time, etc.). In this scenario, a single request will only need to be retried a few times before it succeeds and it will not consume the entire retry budget. If you have a request which always fails, no amount of retries will help and my recommendation is that enabling retries is not appropriate for that scenario. |
Beta Was this translation helpful? Give feedback.
The backoff between reties is not configurable.
The design of retries is intended to address random errors. The idea here is that if you have a request which fails, it is retried so that it might succeed the second time (or the third time, etc.). In this scenario, a single request will only need to be retried a few times before it succeeds and it will not consume the entire retry budget. If you have a request which always fails, no amount of retries will help and my recommendation is that enabling retries is not appropriate for that scenario.