Reputation: 579
I'm new to Apache ZooKeeper concept to implement the service discovery and load balancing with netflix ribbon client. I seen some examples in github (https://github.com/spring-cloud/spring-cloud-zookeeper ). Could anyone help me to know how to set-up the ZooKeeper and service discovery implementation on app service instances. I'm very curious to know about this concept.
Thanks in advance..,
Upvotes: 1
Views: 2525
Reputation: 1221
For today (in March 2018
) you should use Zookeeper Dependencies
.
Add dependency org.springframework.cloud:spring-cloud-starter-zookeeper-discovery
;
Setting up Zookeeper Dependencies
spring:
# your app name
application.name: app
cloud.zookeeper:
discovery:
root: /path/to/your/dependencies
enabled: true
dependencies:
dependencyOne:
# absolute path is /path/to/your/dependencies/dependencyOne
path: /dependencyOne
loadBalancerType: ROUND_ROBIN
required: false
stubs: org.springframework:foo:stubs
dependency.resttemplate.enabled: false
See more in spring-cloud docs
Upvotes: 1