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 does proxy mean in mysql

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

Share

Shulou(Shulou.com)06/01 Report--

The editor will share with you what proxy means in mysql. I hope you will gain a lot after reading this article. Let's discuss it together.

Mysql proxy is an official mysql middleware service provided by mysql. Upstream, several [mysql-client] can be connected to the upstream, and several [mysql-server] can be connected to the back end. The most basic use of [mysql-proxy] is as an intermediate layer for request interception and request transfer.

Mysql proxy means:

# background

The topic shared by my colleagues today is mysql-proxy, so I come down to understand it for myself. I don't want to be proficient, but I just want to know this thing.

# introduction

Mysql-proxy is an official mysql middleware service provided by mysql. Upstream, several mysql-client can be connected, and back end can be connected to several mysql-server.

It uses the mysql protocol, and any upstream that uses mysql-client can migrate to mysql-proxy without modifying any code.

The most basic use of mysql-proxy is as an intermediate layer of request interception and request transfer:

Further, mysql-proxy can analyze and modify requests. Intercepting queries and modifying results need to be done by writing Lua scripts.

Mysql-proxy allows users to specify Lua scripts to intercept requests, analyze and modify requests, and it also allows users to specify the results returned by Lua scripts to the server

Modify it, add some result sets or remove some result sets.

So, basically, mysql-proxy is an officially provided framework with good extensibility that can be used to accomplish:

Sql interception and modification

Performance analysis and monitoring

Separation of reading and writing

Request routing

# purpose

1. The shared colleague uses proxy because the test environment encounters the test / developer's careless update/delete operation on the whole table, resulting in abnormal test data, thus affecting the progress of the project, so he accesses mysql-proxy to intercept and check the sql statement, and can send the sql statement to a sql review service provided by DBA to determine whether there is a problem with the sql statement

two。 There is also such an experience before, the order form is divided into 128libraries according to the order number, but not all tables have the order number (the pot of historical architecture). If there is a need to query the order number according to the mobile phone number, resulting in traversing the query 128to determine whether it exists, then proxy intervention is needed, and Ali's mycat middleware was used at that time.

# insufficient

The addition of a layer of proxy will increase the consumption of network requests, so the performance will be affected to some extent.

After reading this article, I believe you have a certain understanding of the meaning of proxy in mysql, want to know more about it, welcome to follow the industry information channel, thank you for reading!

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