Mycat-Background (2)

Source: Internet
Author: User

Database routing middleware Mycat-background (2) Mycat's past life

As mentioned above, Amoeba, Cobar, mycat, etc. belong to the same ancestor. If the amoeba can continue, Cobar will not come out, if Cobar the group of people are not all gone, mycat will not be a second. After the Cobar, there are many similar middleware modeled on its architecture and ideas, for specific business scenarios, the design of different middleware. Mycat is one of the more comprehensive business scenarios, the use of configuration is relatively simple, excellent performance, and the function is stable. The same kind of middleware, are designed for specific scenarios or functions, such as a certain technology hot middleware, performance and function more stable, but the business scenario is limited, the expansion of distribution is not very good.
Therefore, we here to the Mycat for a more comprehensive analysis, for the vast number of procedures ape comrades Reference:

Mycat Architecture Comparison

First, we refer to the Mycat community documentation. Compare the architectures of the three middleware of amoeba, Cobar and Mycat
650) this.width=650; "title=" "alt=" Amoeba Schema Analysis "src=" http://img.blog.csdn.net/20160201091516166 "/>
Amoeba implements the MySQL protocol stack at the front end, the front-end link belongs to the NIO implementation, and the application sends the SQL request to the AMOEBA,AMOEBA request-resolution request route to send the request through JDBC to the backend DB cluster. The returned results are merged and filtered back to the front end.
650) this.width=650; "title=" "alt=" Cobar Schema Analysis "src=" http://img.blog.csdn.net/20160201092319768 "/>
Cobar first replaced the backend JDBC with the native MySQL communication layer of its own implementation, and introduced the pooled thought management backend bio-connection pool. The implementation of its own MySQL communication layer, can achieve more back-end functions, such as primary and standby switching, read and write separation, asynchronous operation and so on. Furthermore, the Management Protocol is implemented and can be configured dynamically.
650) this.width=650; "title=" "alt=" Mycat Schema Analysis "src=" http://img.blog.csdn.net/20160201093352835 "/>
Mycat manages front-and back-end connections through connection pooling, and both the front and back end are implemented with NIO and AIO. Richer and more flexible in function and retrofit development

Summary-Why Choose Mycat

Mycat implements the MySQL protocol stack, it can be understood that Mycat is MySQL server, and mycat behind the connection of the MySQL server, it is like a MySQL storage engine, such as Innodb,myisam, so Mycat itself does not store data, data is stored on the back-end of MySQL, so the data reliability and transactions are guaranteed by MySQL, in short, Mycat is MySQL's best companion, it to a certain extent, so that MySQL has the ability to work with Oracle PK: D
Mycat function is very comprehensive, from dynamic configuration, cluster configuration, result aggregation, read/write separation, to sub-table library, disaster recovery backup and so on. And can be used for multi-tenant application development, cloud platform infrastructure, so that your architecture has a strong adaptability and flexibility, with the help of the forthcoming Mycat Intelligent Optimization module, the system's data access bottlenecks and hotspots at a glance, according to these statistical analysis data, you can automatically or manually adjust the back-end storage, Map different tables to different storage engines, and the entire application does not have to change the line of code. Mycat frame ideas and source code also have a lot of commendable places.
Although the Mycat function is very comprehensive, but some functions are limited by the open source product and the person's mentality is different, Mycat's overall is not so "comprehensive". For example, its support for some MySQL statements is not so ideal, the background database if there is a single point of slow, performance is very affected and so on, as well as weak XA distributed transactions. When we apply mycat, we need to transform mycat according to our own business.
Transformation of Mycat is not a very difficult thing, for Mycat source code research and transformation is also a very exercise team, after the successful transformation of the trust Mycat can support the future for a long time database management needs, this is really stone things. It is also a rare thing that the Mycat community is one of the most active in the open source community in China.
Next we will start from the use of Mycat, step by step into the Mycat source code principle and design ideas, and finally combined with specific application scenarios tuning Mycat. Please expect

This article is from the "Zhang Hashi Technology Blog" blog, make sure to keep this source http://zhxhash.blog.51cto.com/10645572/1743711

Mycat-Background (2)

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.