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 are the implementation methods of mysql read-write separation

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

What are the knowledge points of this article "mysql separation of reading and writing?" most people do not quite understand, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the ways to achieve the separation of mysql reading and writing?"

1. Based on the internal implementation of the program code. Classify the routes in the code according to select and insert, which is the most widely used method in the production environment.

The advantage is good performance, because implemented in the program code, there is no need to add additional equipment as hardware expenditure.

The disadvantage is that it needs to be implemented by developers.

Not all applications are suitable for the separation of read and write in the program code. If you want some large and complex Java applications, if you achieve the separation of read and write in the program code, the code will change greatly.

2. Implementation based on intermediate agent. Agents are generally located between the client and the server.

After receiving the client request, the proxy server forwards it to the back-end database through judgment.

Representative procedure:

(1) MySQL-Proxy:MySQL open source project, SQL is judged by its own lua script.

(2) Atlas: a data middle tier project based on MySQL protocol, developed and maintained by the infrastructure team of Qihu 360Web platform Department

It is optimized on the basis of the mysql-proxy0.8.2 version, adding some new features.

The mysql service uses Atlas inside 360. it carries billions of read and write requests every day and supports transactions and stored procedures.

(3) Amoeba: developed by Chen Silu, this program is developed by Java language and produced by Alibaba, but does not support transactions and stored procedures.

Amoeba is a software that is very easy to use and portable, so it is widely used as a database agent in production environment.

The above is about the content of this article on "what are the implementation methods of mysql separation of reading and writing". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

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

Internet Technology

Wechat

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

12
Report