Unlock instant, AI-driven research and patent intelligence for your innovation.

MGR read-write separation and load balancing method based on mysql routers

A load balancing, read-write separation technology, applied in the direction of resource allocation, program control design, structured data retrieval, etc., can solve the problems of ProxySQL performance impact, high operation and maintenance costs, poor MGR support, etc., to achieve simple configuration, Simple operation and maintenance, load balancing effect

Pending Publication Date: 2020-05-01
辽宁振兴银行股份有限公司
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The purpose of the present invention is to provide a MGR read-write separation and load balancing method based on mysql router to solve the technical problems that ProxySQL has a great impact on performance, high operation and maintenance costs, and poor support for MGR

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • MGR read-write separation and load balancing method based on mysql routers

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] In order to better understand the purpose, structure and function of the present invention, a mysql router-based MGR read-write separation and load balancing method of the present invention will be further described in detail in conjunction with the accompanying drawings.

[0040] like figure 1 As shown, the mysql router of the present invention realizes the separation of reading and writing of mysql and load balancing; the mysqlrouter is lightweight, has low operation and maintenance costs, and has obvious performance advantages.

[0041] The main function:

[0042] 1. Automatic failover

[0043] Use MySQL Router to achieve read-write separation. The front-end application layer does not need to directly connect to the underlying DB, but connects to the MySQL Router uniformly. MySQL Router is transparent to the front-end application layer, and we don't need to do any processing at the code layer. The application layer will use the MySQL Router as a normal MySQL insta...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

An MGR read-write separation and load balancing method based on mysql routers comprises the following steps that S1, automatic failover is conducted, MySQL Router is used for realizing read-write separation, and a front-end application layer is connected to the MySQL Router in a unified mode; S2, DB load balancing: the MySQL middleware distributes the request to a bottom-layer database according to a certain rule in a similar connection pool manner, so that reading and writing separation of the DB is realized, and the availability is high; specifically, through Nginx reverse proxy, based on apolling algorithm, load balancing is achieved through application, and a read-write separation function applied to a database layer is achieved through mysql routers; according to the mysql router, mysql read-write separation and load balancing are achieved, the mysql router is light in weight, the operation and maintenance cost is low, and the performance advantages are obvious.

Description

technical field [0001] The invention belongs to the field of database high-availability architecture design, and in particular relates to a mysql router-based MGR read-write separation and load balancing method. Background technique [0002] MySQL databases are currently being used more and more in production environments. With the continuous increase in business volume, the pressure on a single-node database is very high, and it can no longer support it in some scenarios. There is an urgent need for a lightweight MySQL read-write separation method to solve the current problems. [0003] ProxySQL is developed in C++ language. Although it is also a lightweight product, its functions are sufficient to meet most of the functions required by middleware, including: [0004] 1. The most basic read / write separation, and there are many ways. [0005] 2. User-based, schema-based, and statement-based rules can be customized to route SQL statements. In other words, the rules are fle...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50G06F16/25
CPCG06F9/505G06F16/252
Inventor 康壮
Owner 辽宁振兴银行股份有限公司