Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of strong consistency in HBase

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the example analysis of strong consistency in HBase, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.

1. First, let's understand consistency.

Consistency can be divided into two different perspectives: client-side and server-side.

From the point of view of the client, consistency mainly refers to the problem of how to obtain the updated data during multiple concurrent access. From the point of view of the server, it is how to update how to replicate and distribute to the whole system to ensure that the data is ultimately consistent. Consistency is due to the problem of concurrent reading and writing, so when understanding the problem of consistency, we must pay attention to considering the scenario of concurrent reading and writing.

From the client point of view, when multi-process concurrent access, the updated data in different processes how to obtain different policies, determine the different consistency. For relational databases, it is required that the updated data can be seen by subsequent visits, which is highly consistent. If you can tolerate some or all of the subsequent access, it is weak consistency. If access to updated data is required after a period of time, it is the ultimate consistency.

From the server point of view, how to distribute the updated data to the whole system as soon as possible and reduce the time window to achieve the final consistency is a very important aspect to improve the availability of the system and user experience. For distributed data systems:

N-number of copies of data replication

W-the number of nodes that need to be written when updating data

R-number of nodes that need to be read when reading data

If WhirlR > N, the nodes written and read overlap, then it is highly consistent. For example, for a typical one-master-standby synchronous replication relational database, whether reading the data of the master database or the standby database, it is the same.

If W+R=3. Different combinations of NMagol and WPerry are to strike a balance between usability and consistency in order to adapt to different application scenarios.

If any one of the write nodes fails, the availability will be reduced, but because the N nodes of the data distribution are written synchronously, strong consistency can be guaranteed.

If the write performance and availability are relatively high, only one node is required to write successfully. However, the process of reading other nodes may not be able to get the updated data, so it is weak consistency. In this case, if W.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report