Add the node for the microservices that you want to retry with the current application properties file Zuul also go in.
How many services are configured to retry.
Consider doing a batch from the class to see the source TODO
1. About 3 Zuul break 2 Zuul, and then a partial failure to access the service provider interface occurs because the
caller has not joined the retry configuration of the Zuul.
Spring.cloud.loadbalancer.retry.enabled=true
#建立连接超时时间
horus-zuul-server.ribbon.connecttimeout=250
#连接超时时间
horus-zuul-server.ribbon.readtimeout=10000
#所有操作都重试
Horus-zuul-server.ribbon.oktoretryonalloperations=true
#重试发生, change the maximum
number of nodes Horus-zuul-server.ribbon.maxautoretriesnextserver=6
#单个节点重试最大值
Horus-zuul-server.ribbon.maxautoretries=1
2 shuts down two for three service providers, and there is a case
of failure using the caller's direct access to the service provider Because the Maxautoretriesnextserver is set to 1 and the failed node has to be transferred multiple times, this parameter should be set larger.
Note: Client-ribbon is a service provider name
spring.cloud.loadbalancer.retry.enabled=true
#建立连接超时时间
client-ribbon.ribbon.connecttimeout=250
#连接超时时间
client-ribbon.ribbon.readtimeout=10000
#所有操作都重试
client-ribbon.ribbon.oktoretryonalloperations=true
#重试发生, change the maximum
number of nodes Client-ribbon.ribbon.maxautoretriesnextserver=6
#单个节点重试最大值
Client-ribbon.ribbon.maxautoretries=1
Pom file Add it yourself