Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Running Zookeeper

As you probably guessed, I'm going to launch Zookeeper on the local machine using its Docker image. The following command starts the Zookeeper server instance. Since it fails fast, the best approach is to always restart it:

docker run -d --name zookeeper --restart always -p 2181:2181 zookeeper

In contrast to previously discussed solutions in this area, such as Consul or Eureka, Zookeeper doesn't provide a simple RESTful API or a web management console that allows us to easily manage it. It has an official API binding for Java and C. We may also use its command line interface, which can be easily started within the Docker container. The command visible here starts the container with the command line client, and links it to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content