spring-cloud/spring-cloud-netflix

RequestSpecificRetryHandler retries same server for SERVER_THROTTLED

Open

#2,585 创建于 2017年12月27日

在 GitHub 查看
 (10 评论) (0 反应) (0 负责人)Java (2,433 fork)batch import
help wanted

仓库指标

Star
 (4,805 star)
PR 合并指标
 (平均合并 3小时 47分钟) (30 天内合并 5 个 PR)

描述

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 ?

贡献者指南