Beyond Mysql. A summary of the knowledge of the popular database branch _mysql

Source: Internet
Author: User
Tags mysql code mysql in percona percona server
Introduction

MySQL is one of the most popular free open source programs in history. It is the backbone of the database for tens of thousands of websites, and it can be a powerful proof of the exponential growth of the Internet over the past 10 years (and linux®).

So, if MySQL is really that important, why is there more and more high-end derivatives of the core MySQL products? This is because MySQL is a free open-source application, so developers can always get their code and modify the code to their own ideas, and then distribute the code themselves. For a long time, there were no trusted MySQL branches in the developer's own production environment. However, this situation soon changed. There are several branches that have attracted the attention of many people.

This article discusses three popular MySQL branches that are focused on: drizzle, mariadb, and Percona Server (including the XTRADB engine). This article will briefly describe the reasons for each of the branches and their objectives, and whether they can be used in your own production environment. At the end of this article, you should be able to answer the question, "is this a good solution for my environment for these MySQL branching products?"

Why do you want to branch?

Why do I need to branch MySQL? This is a very reasonable question. Thousands of websites rely on MySQL, and for many people it seems like a good solution. But that's usually the case, and for many people it's not necessarily for everyone. This has prompted some developers to develop better solutions to their needs. What better way to turn a good solution into a perfect solution?

Here's a look at more details about these branches looking for change. Some branches think that MySQL has become too bloated, providing features that many users will never be interested in, sacrificing the simplicity of performance. If people are particularly satisfied with the more streamlined MySQL 4, why add additional complexity to MySQL 5? For this branch, better MySQL branching should be simpler, faster, and less available, but it will make these functions work extremely quickly, And keep in mind the target audience, in this case, the target audience is the High-availability Web site.

For other branches, MySQL does not provide enough new functionality or is too slow to add new features. They may argue that MySQL does not have the same development as the target market for highly available sites, which run on multi-core processors with large amounts of memory. As anyone familiar with MySQL knows, MySQL offers two storage engines: MyISAM and InnoDB. This branch argues that neither of these storage engines provides the content they need, so they create a new storage engine that works well for its goals.

In addition, the top goal of some branches is to become a replacement for MySQL, where you can easily access their branches without changing any code. The branch uses the same code and interface as MySQL, making the transition very easy. However, another branch claims that it is incompatible with MySQL and needs to change the code. The maturity of each branch is different, and some branches claim to be ready to put into production, while others claim that they are far from achieving the highest goal.

Finally, there is little certainty about how MySQL will evolve under Oracle. Oracle acquired Sun and also acquired MySQL, now Oracle controls the MySQL product itself and leads the development community to develop new products. Since Oracle already has a business database, there are concerns that they may not have enough resources to keep MySQL in the lead. So many of the branches are also the result of these potential concerns, fearing that MySQL, as a leading free Open-source database, may have too little functionality, slow publishing cycles, and more expensive support.

Xtradb

XTRADB is a stand-alone product, but it is still considered a branch of MySQL. XTRADB is actually a storage engine for MySQL based databases. XTRADB is considered to be an additional storage engine for standard MyISAM and InnoDB that have become part of MySQL. MySQL 4 and 5 use the default MyISAM storage engine to install each table. InnoDB is also a relatively new storage engine selection, where database administrators and developers can choose the type of storage engine based on each table. The main difference between the two storage engines is that MyISAM does not provide transactional support, while InnoDB provides transactional support. Other differences are a number of subtle performance differences, and InnoDB provides a number of minor performance improvements compared to MyISAM, and provides higher reliability and security when dealing with potential data loss. It seems that InnoDB is a more appropriate storage engine for future improvements, so from version 5.5 MySQL has changed the default storage engine from MyISAM to InnoDB.

Based on these advantages, the InnoDB storage engine itself splits a branch, an updated storage engine named XTRADB. How new is this storage engine? It was first released by Percona 3 years ago, so it's relatively new. It is designed specifically for modern, high-availability Web sites running on modern servers. It is designed to run on a server with more than 10 or more cores and large memory (GB and more). Any company can purchase these types of servers from a server management company, so the database should be designed to take full advantage of these servers.

The XTRADB branch has another goal, a simple alternative to the InnoDB storage engine, so that users can easily switch their storage engines without changing any existing application code. XTRADB must be able to backward-compatible InnoDB to provide all the new features and improvements they want to add. They have achieved this goal.

How fast is XTRADB? A performance test I found shows that it can handle 2.7 times times more transactions per minute than the built-in MySQL 5.1 InnoDB engine. Speed is clearly a factor that cannot be overlooked, especially when considering alternatives.

Percona

Compared with the built-in MySQL storage engine, XTRADB offers some great improvements, but it is not a stand-alone product and cannot easily fit into an existing MySQL installation. Therefore, if you want to use this new engine, you must use the product that provides it.

Percona Server is such a product, by the leading MySQL consulting company Percona released. Percona Server is a stand-alone database product that provides users with the ability to swap out their MySQL installation and switch to Percona server products. By doing this, you can take advantage of the XTRADB storage engine. Percona Server claims to be completely compatible with MySQL, so you don't have to change any code in the software theoretically. This is indeed a great advantage for controlling quality when you are looking for quick performance improvements. Therefore, a good reason to take the Percona Server is to use the XTRADB engine to minimize code changes as much as possible.

In addition, they are the original authors of the XTRADB storage engine. Percona This code as open source code, so you can find it in other products, but the original creator of the engine is the same person who wrote the product, so you can use this information at your whim.

The following is a statement from the Percona Server, which comes from their own web site:

Scalability: Handling more transactions; Scaling on a powerful server

Performance: Percona Server with xtradb is very fast

Reliability: Avoid damage, provide crash security (CRASH-SAFE) replication

Management: Online backup, online form import/export

Diagnostics: Advanced Analysis and instrumentation

Flexibility: Variable page size, improved buffer pool management The final statement of the Percona team is "Percona Server is the closest version of the official MySQL Enterprise release released by Oracle", so with other changes to a large number of basic core MySQL code The branch of the division is different. One drawback of Percona Server is that they manage their own code and do not accept the contributions of outside developers in such a way as to ensure that they control the functionality contained in the product.

Mariadb

Another product that provides the XTRADB storage engine is the MARIADB product. It is very similar to the Percona product, but provides more low-level code changes to try to provide more performance improvements than standard MySQL. MARIADB directly utilizes the XTRADB engine from Percona, because they use exactly the same engine, so there is no significant difference in the use of the storage engine each time.

In addition, MARIADB provides the standard storage engine provided by MySQL, namely MyISAM and InnoDB. So, in fact, it can be viewed as a MySQL extension set that provides not only all the functionality that MySQL provides, but also other features. MARIADB also claims to be a replacement for MySQL, so when you switch from MySQL to MARIADB, you can install it without changing any of the codebase.

Finally, and perhaps most importantly, the main creator of MARIADB is Monty Widenius, the original founder of MySQL. Monty established a company called Monty program to manage the development of MARIADB, which employs developers to write and improve mariadb products. This is both a good thing and a bad thing: The upside is that they are the best at Maria and bug fixes, but the company is not for profit but for product-driven, which can be problematic because a company without a profit doesn't have to last forever.

Drizzle

The last product described in this article is drizzle. Unlike the two products introduced earlier, drizzle is very different from MySQL, even claiming that they are not a replacement for MySQL. They expect some major changes to MySQL to provide an excellent solution for high availability issues, even if it means changing all aspects of MySQL that we've become accustomed to.

On the company's FAQ page, read the questions provided in it and find that drizzle has further emphasized its basic objectives. They are dissatisfied with some of the changes to the MySQL code after the MySQL 4.1 version, claiming that many developers do not want to spend extra money. They acknowledge that their products are not even compatible with the SQL relational database. This is really a lot different from MySQL.

With the habit of MySQL has such a big change, why do we have to consider this product? To be exact, the reason is the same as the above, drizzle is a major modification of the MySQL engine, it clears out some underperforming and unnecessary features, rewrites a lot of code, optimizes them, You can even change the language from C to + + to get the code you need. In addition, drizzle did not end the modification, the product was designed to take into account its target market, that is, a large number of content of multi-core servers, running Linux 64-bit machine, the cloud used in the server, hosting the Web site server and every minute to receive tens of thousands of clicks of the server. This is a fairly specific market. Is it too specific? Keep in mind that these types of companies currently invest in their databases, if they can install drizzle instead of MySQL, then their server costs will be cut by half and can save a lot of money!

So, isn't everyone supposed to use drizzle? And so on, as drizzle repeatedly points out, it's not compatible with MySQL. So if you're using a MySQL platform now, you need to rewrite a lot of code to make drizzle work in your environment.

Although it takes extra work to get it running, it's not as fast and easy to use as Percona or MARIADB. I am introducing drizzle because, although it may not be your choice at the moment, it is likely to become a choice for some people in a few years. Because the goal of this article is to improve your understanding of the tools you use in the future, this is a good opportunity to introduce you to this product. Many leading DB experts believe that drizzle will be the choice for a high-availability database installation over the next 5 years.

Drizzle is a fully open source product that openly accepts the contribution of developers. It does not have a company that supports its development like MARIADB, nor does it have a large number of external developers to contribute to it, as Percona does. Drizzle has a great room to grow and provides some new functionality, but may need to rewrite most of the MySQL code.

Contrast chart

The following is an overview of the three MySQL branch products described in this article.

Products Price Goal Main function Is it ready to be put into production?
Percona Server Free Provides wrappers and other profiling tools for the XTRADB storage engine Xtradb Is
Mariadb Free Extend MySQL to include XTRADB and other performance improvements Xtradb Is
Drizzle Free Provides more robust scalability and performance improvements than MySQL High Availability Is

Conclusion

This article describes the three new branches of the MySQL product, designed to address some of the problems they encounter when using MySQL. These three branches are free open source products. When used, you need to weigh their pros and cons against the functionality that MySQL has already provided. I believe that MySQL will still be the first choice to meet the needs of the database for most people who read this article. I doubt most of the readers who read this article are the owners of 1,000,000-click Sites per hour. I want to emphasize again that MySQL is still a very good product and a very good database for most usage.

However, for those who think their site needs more availability, scalability, and performance than the current MySQL can provide, any one of these 3 products may provide you with the solution you need. Further, if you think your site will be a lucrative site, consider using one of the three products to resolve the problem before it occurs.

Finally, the root cause of these MySQL branches is that some creators want to change some of the basic features of MySQL because they can't wait for MySQL to do the work for themselves. In addition, Oracle's current status threatens the future of MySQL, and many developers (including MySQL's original developers) are concerned about the future of the product, and they are worried about whether Oracle will be focused on keeping the product's leading database. These concerns seem reasonable to me, so keep these products in mind as we move towards the future.

Related Article

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.