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

What is sharding syncopation?

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Today, I will talk to you about what sharding segmentation is, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

What is syncopation?

Database sharding is an inherent relational process in which rows of a table can be divided into different groups through some logical data blocks. For example, if you are partitioning a very large table named foo according to a timestamp, all data before August 2010 will enter partition A, and all data after that will enter partition B. Partitions can speed up reading and writing because they target smaller datasets in separate partitions.

Partitioning is not always available (MySQL is not supported until version 5.1), and the cost of the commercial system it requires is prohibitive. More importantly, most partition implementations store data on the same physical machine, so it is affected by the hardware foundation. In addition, partitions cannot identify the reliability or lack of reliability of the hardware. As a result, many intelligent people begin to look for new ways to scale.

Sharding is essentially a database-level partition: instead of dividing the rows of a data table by blocks, it splits the database itself (usually across different computers) by some logical data elements. In other words, sharding does not divide the data table into small pieces, but the entire database into small pieces.

Vertical split

The most important feature of vertical segmentation is that the rules are simple and the implementation is more convenient, which is especially suitable for systems with very low coupling between businesses, little interaction and clear business logic. In this system, it is easy to split the tables used by different business modules into different databases. Splitting according to different tables will have less impact on the application, and the splitting rules will be relatively simple and clear.

Horizontal split

Horizontal segmentation is slightly more complex than vertical segmentation. Because you want to split different data in the same table into different databases, the split rule itself is more complex for the application than splitting based on the table name, and later data maintenance will be more complex.

Two kinds of split combination

Let's consider data segmentation in terms of the general situation: on the one hand, it is usually impossible for all tables in a library to be concatenated by a single table, which implies that horizontal segmentation is almost always for tables that are closely related to a small rub (which is actually a vertical split block), but not for all tables. On the other hand, for some systems with very high load, even a single table cannot bear its load through a single database host, which means that vertical sharding alone cannot completely solve the problem. Therefore, most systems will combine vertical segmentation and horizontal segmentation, first do vertical segmentation of the system, and then selectively do horizontal segmentation for each small rubbing table. Thus, the whole database is divided into a distributed matrix.

After reading the above, do you have any further understanding of what sharding segmentation is? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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

Database

Wechat

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

12
Report