Database Middleware 01-Understanding MYCAT__ Database

Source: Internet
Author: User
Tags mysql client

Mycat is a set of free and open source distributed database middleware. Presumably do the development or operation of a friend of the word middleware should be more familiar with, we have seen Java middleware, message middleware, and so on, here again a database middleware. So what is middleware, it is easy to understand, is in the middle of the object. In the middle of who, must be in the middle of the client and service side. Then the database middleware is the thing that is in the middle of the database client and database server.
Originally we connect the database, we through the client directly to connect our service side. So why go through a middleware now, this is not superfluous. For our simple database structure, this is really superfluous, but for a large database cluster, the role of the middleware can be large. We know that in order to improve the throughput of the database, the database can be divided and read-write separation can be used. In order to improve the availability of the database, the database can be highly available for clustering. Now our clients are no longer a single database node, but a large number of nodes composed of a huge database cluster. For example, read and write separation, there may be a master node, multiple from the node, the main node responsible for the data write operations, from the node responsible for data reading operations, from the node to do load balancing. So this time in fact, the client face is two machines, in the client will be configured with two data sources, in the database operation when the need for our clients to judge, in the end is to choose which machine to operate. Two nodes are also relatively good choice, if more machines, such as database node has 50,000 units, then you can again let the client side to make a choice. This is when database middleware comes in handy. For example, we split the database and divide it into different databases of different nodes, then we are in the SQL operation, we have to manually again database Routing and table routing, this is a repetition of the wheel, in order to avoid every time to do so, this time also shows the role of database middleware. The database middleware provides a façade for the client to block the backend connected to the back end, which is the virtual database and virtual table managed by the middleware. Why is it virtual, because the database middleware does not operate data, the operation of the data is still distributed to the backend data nodes. There may be multiple nodes on the back end, which may be distributed across multiple nodes for a single table, but the database middleware is presented to the client in one piece. The client operates this table of database middleware so that it can operate on multiple tables of multiple nodes maintained by the middleware, and the client does not need to focus on how it operates. Mycat also has a very big advantage is that it does not create a protocol of its own, but the use of the MySQL protocol, so that we operate mycat, like the operation of our MySQL, can be connected through the MySQL client mycat, can use the MySQL command and so on , so it's very easy to get started with Mycat. The programming language used by Mycat is Java, and running requires the support of the JVM. In addition, because Mycat is open source, for mycat transformation is more convenient, such as custom segmentation rules and so on. Here Shing so much, in short, is the production of database middleware can well help developers and architects to solve the database of large distributed cluster broughtof the various problems. All is a personal understanding, if have the wrong place, a lot of correct.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.