In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following is mainly about whether mysql supports distribution. I hope these contents can bring you practical use. This is also the main purpose of my article on whether mysql supports distribution or not. All right, don't talk too much nonsense, let's just read the following.
First of all, the database is a software, the most basic function is data storage and data query. Generally speaking, the processing of data is divided into reading and writing, so many scenarios of distributed solutions are actually done around these two dimensions.
Before you start a distributed solution, explain why there should be a distributed scheme. If the things that can be solved by a single computer, there is no need to consider distribution at all. If you want to divide, it can no longer be naturally combined, which is also a balance that needs to be mastered in the distributed solution. Now the HTAP solution in the industry is actually a combination of OLTP+OLAP scenarios. From a stand-alone point of view, Oracle is definitely the best HTAP solution. But in oracle, in addition to the price problem, there is another problem, that is, scalability, not to mention the details of sharding, the design idea of Oracle is share everything, so the partition table scheme is more appropriate.
But MySQL is obviously not good, because you can hardly hear the solution of using partition tables in the Internet industry, because no matter how to divide and expand, the data are all on a single machine, and the performance of the single machine is not satisfactory. So single machine capacity, single machine performance is a bottleneck, then there can be two or more instances to share the pressure.
Let me give you a simple example. From the point of view of data processing, data has read and write requirements, so our requirements can be extended to read requirements and write requirements respectively.
The expansion of reading requirements is relatively simple, that is, it is often said that reading and writing are separated. This general middleware can be supported.
As shown in the lower left corner of the solution in the following figure, the read expansion can be easily achieved. The read expansion here is linear, not exponential, and transparent to the business.
The difficulty lies in writing extensions. The core of writing extensions involves distributed transactions. If we really want to split them, we can divide them into different dimensions. For example, for pipelined data, the dependence of this kind of data before and after is very low, so the writing requirement is insert, and the writing requirement is relatively simple. In this way, the middleware scheme can be used to assist to achieve the slicing scheme of sharding. Many of the distributed solutions that we usually understand are actually talking about this. The expansion of this scheme is exponential, for example, 2 nodes become 4, 4 become 8, and so on, which is transparent to the business.
But there is a more complex category, that is, stateful data. We cannot split it directly, or we can split it directly. We can split it according to the dimension of the business. It is not recommended to use middleware directly for this split. For example, if a business is split, it can be divided into business 1, business 2, business 3. Business 8, then the split logic of these 8 services is not made into a smooth way of hash, but is suggested to be combined according to the priority and other dimensions of business logic. For example, if the priority of business 1 is high, it can be an independent node. If the data volume and priority of business 3-business 6 are different, it can be a node. It is recommended that the writing of data into routing rules should be processed at the application level. This is a more controllable solution. This expansion scheme is not transparent to the application and requires the cooperation and processing of the application. But the revenue is also clearly the best balance, such as the concept of game clothing, which is very common in the game industry, is this kind of division, so the expansion can be linear.
If we want to talk about the distributed scheme based on this, in fact, a set of cluster or business is treated as a transparent node, and other auxiliary schemes are used to meet the expansion requirements. The relationship-based distributed scheme is more based on static routing, and a lot of extra work needs to be done for capacity expansion, which can not achieve smooth elasticity. This is naturally an opportunity for NoSQL,NewSQL to give full play to his talents.
Therefore, in the choice of options, to have overall vision and a higher vision, not everything is MySQL,Oracle, deep ploughing is naturally good, and other better options can also be considered.
For the above about whether mysql supports distributed, do you think it is very helpful? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.