Please check the Zookeeper website for more information
Zookper: A collaborative service for distributed applications
Zookper is a distributed, Open-source, collaborative service that applies to distributed applications. It provides simple operations that allow distributed applications to implement services such as synchronization, configuration maintenance, and clustering or naming, based on these interfaces. Zookper is easy to access programmatically, and it uses a data model similar to the file tree structure. You can use Java or C for programmatic access.
It is well known that distributed system Collaboration service is difficult to have a satisfying product. These collaborative services products are easily caught in traps such as competitive selection conditions or deadlocks. The goal of Zookper is to no longer need to implement collaborative services as a result of collaboration conflicts in distributed services.
The design goal zookeeper is simple
Zookeeper enables distributed processes to work together through a hierarchical namespace that resembles file systems. These namespaces are made up of a series of data registers, which we also call the data registers as znodes. These znodes are sort of like files and folders in a file system. Unlike file systems, file system files are stored on the storage area, and zookeeper data is stored on memory. At the same time, this means that zookeeper has a high throughput and low latency.
Zookeeper achieves high performance, high reliability, and orderly access. High performance ensures that zookeeper can be applied to large distributed systems. High reliability guarantees that it will not cause any problems due to a single node failure. Orderly access can ensure that the client can achieve more complex synchronization operations.
zookeeper is reusable.
Zookeeper Service
The servers that make up the zookeeper must be able to communicate with each other. They save the server state in memory, also save the log of the operation, and persist the snapshot. As long as most servers are available, zookeeper is available.
The client connects to a zookeeper server and maintains the TCP connection. and sends the request, obtains the reply, obtains the event, and sends the connection signal. If this TCP connection is broken, the client can connect to another server.
zookeeper is orderly.
Zookeeper uses numbers to mark each update. This ensures the orderly zookeeper interaction. Subsequent operations can implement higher and more abstract services such as synchronous operations in this order.
zookeeper is efficient.
The efficiency of zookeeper is more manifested in the system with the main reading. Zookeeper can perform well on distributed systems that have a 10:1 read/write ratio of thousands of servers.
data structures and hierarchical namespaces
The Zookeeper namespace has a similar structure to the file system. The path representation of a name and file, each node of the zookeeper is uniquely identified by the path
Zookeeper ' s hierarchical Namespace
Implement
The following figure shows the advanced Component Services for the Zookeeper service. In addition to the request processor, each server in the Zookeeper server group replicates each of their own components.
Zookeeper components
The replicated database is a structure stored in memory that contains the entire data tree. All update operations are logged to the hard drive. And the write operation is serialized to the hard disk when it functions in the database.
Each zookeeper server is connected to many clients. The client connects to a server to submit the request.