Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB Database with Zookeeper

I'm new to Zookeeper and I'm still not sure about how Zookeeper works with database. In its documentation, it says "Read requests are serviced from the local replica of each server database." So does it mean every server in a Zookeeper system is also a database? Or there is a separate database and each server in zookeeper copy all data in the database and store in its own database (Crazy idea if it's true?)? Or the database in zookeeper server is built up from the data that every times a client requests to have?
Thank you very much

like image 532
Xitrum Avatar asked Dec 28 '25 16:12

Xitrum


1 Answers

Every server in a zookeeper cluster keeps a copy of the entire database. As writes are performed, they are sent to every server in the cluster, and a copy of the write is stored on each server.

The size of the data set zookeeper stores should not be very large, as zookeeper stores the entire data set in memory on the jvm heap. Zookeeper is meant more as a place to store configuration information, and for co-ordination between various nodes, rather than storing large amounts of information.

like image 136
sbridges Avatar answered Dec 31 '25 17:12

sbridges



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!