'How to keep zookeeper run on ec2
I installed Zookeeper and Kafka on my ec2 instances, and they work well.
However, I wondered how to keep Zookeeper running on ec2.
I think if I make a real-time streaming service using Kafka, Zookeeper has to keep running state.
But it is shut down when I close a cli.
How to keep zookeeper run on ec2? Is it possible?
Solution 1:[1]
Yes, until Zookeeper is fully removed from Kafka (target late 2022}, it stores important topic and broker information.
Ideally, you'd use a process supervisor like SystemD to (re)start, stop, and monitor the process. If you apt/yum install Confluent Platform, then it'll come with SystemD scripts for both Kafka and Zookeeper, so you wouldn't need to write your own.
And you'd use zookeeper-server-start -daemon zookeeper.properties to make it run in the background.
Or you can just use Amazon MSK and not worry about the infrastructure.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
