Retrying the connection with Ribbon

Hystrix is enabled by default for the application when using a Feign library. This means that you should disable it in the configuration settings if you do not want to use it. For the purpose of testing a retry mechanism with Ribbon, I suggest that you disable Hystrix. In order to enable connection retrying for Feign, you only have to set two configuration properties—MaxAutoRetries and MaxAutoRetriesNextServer. The important settings, in this case, are also ReadTimeout and ConnectTimeout. All of them may be overridden in the application.yml file. Here's the list of the most important Ribbon settings:

  • MaxAutoRetries: This is the maximum number of retries on the same server or service instances. The first ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.