-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Programmers Guide
allenxwang edited this page Jan 26, 2013
·
17 revisions
Eureka provides service discovery functionality and can be integrated with ribbon to provide dynamic list of servers. To use Eureka with ribbon, follow these steps:
- Include ribbon-eureka in your dependency
- (Done by default) Enable the load balancer for the client and configure the load balancer to be DynamicServerListLoadBalancer or its sub class. This is true by default.
- Configure the ServerList to be com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
- Configure the server refresh rate. (optional, default is 30 seconds)
Here is an example
myclient.ribbon.NIWSServerListClassName=com.netflix.niws.loadbalancer.DiscoveryEnabledNIWSServerList
# refresh every minute
myclient.ribbon.ServerListRefreshInterval=60000
In addition, your need to have proper configuration files for Eureka client. See here.