spring-cloud/spring-cloud-netflix

RequestSpecificRetryHandler retries same server for SERVER_THROTTLED

Aberta

#2.585 aberto em 27 de dez. de 2017

 (10 comentários) (0 reação) (0 responsável)Java (2.433 forks)batch import
help wanted

Métricas do repositório

Stars
 (4.805 estrelas)
Métricas de merge de PR
 (Mesclagem média 3h 47m) (5 fundiu PRs em 30d)

Description

Netflix's RequestSpecificRetryHandler allows to retry on same server for SERVER_THROTTLED error.

When the okToRetryOnAllErrors property is true, the retry handler allows to retry on the same server unconditionally without taking into account the actual error. This is useless when the server responded with SERVER_THROTTLED.

It looks like the if statement at https://github.com/Netflix/ribbon/blob/master/ribbon-core/src/main/java/com/netflix/client/RequestSpecificRetryHandler.java#L58-L65 should be considered first before the other conditions.

I doubt Netflix is willing to change this behavior but we could override it in SpringCloud. What do you think ?

Guia do colaborador