Home > Database > Mysql Tutorial > What is router in mysql

What is router in mysql

(*-*)浩
Release: 2020-10-12 17:23:34
Original
9986 people have browsed it

The router in mysql is an open source lightweight middleware between the application layer and the DB layer. The router can forward the request analysis of the front-end application to the back-end DB server for processing, thereby achieving DB load balancing.

What is router in mysql

What is MySQL Router?

(Recommended tutorial: mysql video tutorial)

MySQL Router is an open source lightweight middleware between the application layer and the DB layer , it can forward the request analysis of the front-end application to the back-end DB server for processing, thereby achieving DB load balancing. It can be said that it is a replacement for the previous MySQL Proxy. We can find its source code on Github. Similar tools include 360’s Atlas, Meituan-Dianping’s DBProxy, MyCat, etc.

MySQL Router Architecture

What is router in mysql

Using this architecture, the front-end application does not need to directly connect to the DB Server, but Just connecting to MySQL Router can easily expand the database cluster. Next, let's take a look at some of its other main functions.

Main functions

1. Automatic failover

Using MySQL Router to implement read-write separation, the front-end application layer does not It is necessary to connect directly to the underlying DB, but to connect to MySQL Router uniformly. MySQL Router is transparent to the front-end application layer, and we do not need to do any processing at the code layer. The application layer will use MySQL Router as a normal MySQL instance. If the underlying DB Master fails, it will automatically use the Backup node to replace it, which is very convenient.

2. DB load balancing

MySQL middleware distributes requests to the underlying database according to certain rules through a connection pool-like method, thereby realizing DB reading and writing. Separation and high availability.

The above is the detailed content of What is router in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template