Skip to content

Zone Affinity

Nadim Benabdenbi edited this page Dec 7, 2017 · 2 revisions

The zone affinity routes exclusively to servers that are in the same zone using a round robin load balancing.

⚠️ If there is no server in the same zone the routing will fail.

Usage

@RibbonClients(defaultConfiguration = RibbonClientsConfig.class)
@SpringBootApplication
public class Application{
...
}

@Configuration
@EnableRibbonZoneAffinity
public class RibbonClientsConfig {
}

Configuration

Default configuration

ribbon.extensions.rule.zone-affinity.enabled=true

Customization for a specific ribbon client

ribbon.extensions.client.my-client-name.rule.zone-affinity.enabled=true

Where my-client-name is the ribbon client name

Illustration

Illustration