What is the difference between ZooKeeper and any distributed KEY-VALUE store?

I am new to zookeeper and distributed systems, and I am learning it myself.

From what I understand now, it seems that ZooKeeper is just a key Value storage, its key is a path, and the value is a string, which is no different from Redis. (Obviously we can also use a slash-separated path as the key in redis.)

So my question is , What is the essential difference between ZooKeeper and other distributed KV stores? Why does ZooKeeper use so-called “paths” as keys instead of simple strings?

You are comparing ZooKeeper’s advanced data model with other key-value stores, but this is not Its uniqueness. From the perspective of a distributed system, ZooKeeper is different from many other key value stores (especially Redis) because it is very consistent and can tolerate failures when most clusters are connected. In addition, although the data It is saved in memory, but it is replicated to most of the cluster and backed by disk, so once the write is successful, it can guarantee that the write will not be lost (unless missile strikes). This makes ZooKeeper useful for storing a small amount of mission-critical state ( Such as configuration) is very useful.

In contrast, Redis is not a distributed system and does not provide the same kind of guarantees made by ZooKeeper, and many other key value stores distributed are ultimately consistent. In other words, there is no guarantee that once a value is written, all other processes in the distributed system can see the value.

Finally, in addition to the file system such as the interface for storing state, ZooKeeper also Provides fairly low-level features that can solve more complex problems. Examples about Apache Curator. The curator uses ZooKeeper’s ephemeral nodes (nodes that disappear when the client that created them disconnects) to build locks and leaders Election and other things are very useful for coordinating distributed systems. Therefore, from this perspective, ZooKeeper’s data model and related functions can be used as primitives on which higher-level tools for distributed coordination can be built. /p>

I am new to zookeeper and distributed systems, and I am learning it myself.

From what I understand now, it seems that ZooKeeper It’s just a key-value store, its key is a path, and its value is a string, which is no different from Redis. (Obviously we can also use a slash-separated path as the key in redis.)

So I The question is, what is the essential difference between ZooKeeper and other distributed KV stores? Why does ZooKeeper use so-called “paths” as keys instead of simple strings?

You are comparing ZooKeeper’s advanced data model with other key-value stores, but this is not what makes it unique. From a distributed system perspective Looking at it, ZooKeeper is different from many other key value stores (especially Redis) because it is very consistent and can tolerate failures when most clusters are connected. In addition, although the data is kept in memory, it is replicated to the cluster synchronously. Most of it is supported by disk, so once the write is successful, it can guarantee that the write will not be lost (unless missile strikes). This makes ZooKeeper very useful for storing a small amount of mission-critical state (such as configuration).

In contrast, Redis is not a distributed system and does not provide the same kind of guarantees made by ZooKeeper, and many other key value stores distributed are ultimately consistent. In other words, there is no guarantee that once the value is written, the distribution All other processes in the system can see this value.

Finally, in addition to the file system such as the interface for storing state, ZooKeeper also provides quite low-level functions that can solve more complex problems. Questions about Apache Curator. The curator uses ZooKeeper’s ephemeral nodes (nodes that disappear when the client that created them disconnects) to build locks and leader elections that are very useful for coordinating distributed systems. Therefore, from this perspective, ZooKeeper’s data model and related functions can be used as primitives on which higher-level tools for distributed coordination can be built.

p>

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4781 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.