Client Side Load Balancer: Ribbon
Ribbon is a client-side load balancer that gives you much control over the behavior of HTTP and TCP clients. Feign already uses Ribbon, so, if you use @FeignClient
, this section also applies.
A central concept in Ribbon is that of the named client. Each load balancer is part of an ensemble of components that work together to contact a remote server on demand, and the chorus has a name that you give it as an application developer (for example, by using the @FeignClient annotation). On-demand, Spring Cloud creates a new ensemble as an ApplicationContext
for each named client by using RibbonClientConfiguration
. This contains (amongst other things) an ILoadBalancer
, a RestClient
, and a ServerListFilter
.
How to Include Ribbon
To include Ribbon in your project, use the starter with a group ID org.springframework.cloud
and an artifact ID of spring-cloud-starter-netflix-ribbon
. See the Spring Cloud Project page for details on setting up your build system with the current Spring Cloud Release Train.
For the full article link is https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-ribbon.html