Beyond MySQL's knowledge summary of branching popular databases

  • 2020-05-12 06:22:01
  • OfStack

Jane interface

MySQL is one of the most popular free open source programs in history. It is the database backbone for thousands of web sites, and can be turned into (and Linux®) As a testament to the exponential growth of Internet over the past 10 years.

So, if MySQL is really so important, why are 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, modify it as they like, and then distribute it themselves. For a long time, there was no trusted MySQL branch in the developer's own production environment. But that soon changed. There are several branches that have attracted the attention of many people.

This article discusses three popular MySQL branches of interest: Drizzle, MariaDB, and Percona Server(including the XtraDB engine). This article provides a brief overview of why each branch occurs, its purpose, and whether it can be used in your own production environment. By the end of this article, you should be able to answer the question "are these MySQL branching products a good solution for my environment?" Questions like this.

Why branch?

Why do I need to branch MySQL? That's a very reasonable question. Thousands of websites rely on MySQL, and for many, it seems like a good solution. But, as is often the case, what works for many doesn't necessarily work for all. This makes some developers want to develop better solutions based on their own needs. What could be better than turning a good solution into a perfect one? .

Below we will go into more detail on how these branches seek to change. Some branches felt that MySQL had become too bloated, offering many features that users would never be interested in, at the expense of performance simplicity. If people are particularly happy with the leaner MySQL 4, why add the extra complexity to MySQL 5? For this branch, the better MySQL branch would be simpler, faster, and therefore offer fewer features, but this would make these features work extremely quickly and keep in mind the target audience, in this case, the high-availability web site.

For other branches, MySQL doesn't provide enough new functionality, or it's too slow to add new functionality. They may argue that MySQL is not keeping up with the growth of the target market for high-availability websites that run on multi-core processors with lots of memory. As those familiar with MySQL know, MySQL offers two storage engines: MyISAM and InnoDB. The 1 branch decided that neither of the two storage engines provided the content they needed, so they created a new storage engine that was well suited to their goals.

In addition, the highest goal of some branches is to become an alternative to MySQL, where you can easily access their branches without changing any code. This branch USES the same code and interface as MySQL, so it makes the transition very easy. However, another branch claimed that it was not compatible with MySQL and needed to change the code. Each branch has a different level of maturity, with some claiming to be ready for production and others claiming that they are far from the top end of the scale.

Finally, there is still uncertainty about how MySQL will evolve under Oracle. Oracle acquired Sun and MySQL, and now Oracle controls the MySQL products themselves and leads the development community in developing new finished products. Since Oracle already has a commercial database, there are concerns that they may not have enough resources to keep MySQL in the lead. Therefore, many branches are also the result of these underlying concerns that MySQL as the leading free open source database may offer too little functionality, the release cycle may be too slow, and the support may be more expensive.

XtraDB

XtraDB is a standalone product, but it is still considered a branch of MySQL. XtraDB is actually a storage engine based on the MySQL database. XtraDB is considered to be an additional storage engine that has become part of the standard MyISAM and InnoDB MySQL 1. MySQL 4 and 5 install each table using the default MyISAM storage engine. InnoDB is also a relatively new storage engine choice. When setting up a database, the database administrator and developer can select the storage engine type based on each table. The main difference between the two storage engines is that MyISAM does not provide transaction support, while InnoDB does. Other differences are many subtle performance differences, and InnoDB offers many subtle performance improvements over MyISAM, as well as greater reliability and security in dealing with potential data loss. It seems that InnoDB is a more suitable storage engine for future improvements, so starting with version 5.5, MySQL has changed the default storage engine from MyISAM to InnoDB.

Based on these advantages, the InnoDB storage engine itself has split into a branch, an updated storage engine called XtraDB. How new is this storage engine? It was first released by Percona three 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 servers with a dozen or more cores and large amounts of memory (32 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.

Another goal of the XtraDB branch is to become a simple replacement for the InnoDB storage engine, so that users can easily switch their storage engine without changing any existing application code. The XtraDB must be backward compatible with the InnoDB to provide all the new features and improvements they want to add. They achieve this goal.

How fast is XtraDB going? One e performance test I found showed that it handled 2.7 times more transactions per minute than the built-in MySQL 5.1 InnoDB engine. Speed is obviously a factor that cannot be ignored, especially when considering alternatives.

Percona

XtraDB offers some significant improvements over the built-in MySQL storage engine, but it's not a stand-alone product and can't easily fit into an existing MySQL installation. Therefore, if you want to use this new engine, you must use the product that provides it.

One such product is Percona Server, launched by the leading MySQL consulting firm Percona. Percona Server is a standalone database product that provides users with the ability to swap out their MySQL installation and swap in Percona Server products. By doing so, you can take advantage of the XtraDB storage engine. Percona Server claims to be fully compatible with MySQL, so in theory you don't need to change any code in the software. This is really a big advantage for quality control when you're looking for quick performance improvements. Therefore, a good reason to use Percona Server is to use the XtraDB engine to minimize code changes.

In addition, they are the original authors of the XtraDB storage engine. Percona USES this code as open source, 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 however you want.

Here's the Percona Server statement from their own website:

◆ scalability: handle more transactions; Scale on powerful servers

◆ performance: Percona Server using XtraDB is very fast

◆ reliability: avoid damage, provide crash safety (crash-safe) replication

◆ management: online backup, online form import/export

◆ diagnosis: advanced analysis and testing

◆ flexibility: variable page size, improved buffer pool management the Percona team's final statement was that "Percona Server is the closest to the official MySQL Enterprise distribution released by Oracle", thus distinct from other branches that have changed a lot of the basic core MySQL code. One disadvantage of Percona Server is that they manage their own code and do not accept contributions from outside developers, thus ensuring their control over 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 in an attempt to provide more performance improvements than standard MySQL. MariaDB directly leverages the XtraDB engine from Percona, and since they use the exact same engine, there is no significant difference each time the storage engine is used.

In addition, MariaDB provides the standard storage engines provided by MySQL, namely MyISAM and InnoDB. So, in fact, think of it as an extension set of MySQL, which provides not only all of the functionality that MySQL provides, but other features as well. 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 base code.

The last and perhaps most important point is that the primary creator of MariaDB was Monty Widenius, and the original creator of MySQL. Monty set up a company called Monty Program to manage the development of MariaDB. The company hired developers to write and improve MariaDB products. This is both a good thing and a bad thing: the upside is that they are the leader in Maria features and bug fixes, but companies are not profit-driven, they are product-driven, and this can be problematic, because unprofitable companies are not necessarily sustainable.

Drizzle

The last product introduced in this article is Drizzle. Unlike the previous two products, Drizzle and MySQL are quite different, and even claim that they are not substitutes for MySQL. They wanted to make some major changes to MySQL and wanted to provide an excellent solution to the high availability problem, even if it meant changing aspects of MySQL that we were used to.

On the company's FAQ page, when you read the questions provided, you will find that Drizzle further emphasizes its basic goals. They were not satisfied with the changes made to the MySQL code after version 4.1 of MySQL, claiming that many developers did not want to spend extra money. They admit that their products are not even compatible with the SQL relational database. This is indeed quite different from MySQL.

With such a big change from the customary MySQL, why should we even consider this product? Precisely for the same reason as above, Drizzle is a major change to the MySQL engine. It removes some underperforming and unnecessary features, rewrites a lot of code, optimizes it, and even changes the language from C to C++ to get the required code. In addition, Drizzle doesn't stop there. The product was designed with its target market in mind: multi-core servers with a lot of content, 64-bit machines running Linux, servers used in cloud computing, servers hosting web sites, and servers that receive tens of thousands of hits per minute. This is a fairly specific market. Is it too specific? Keep in mind how much money these types of companies are currently spending on their databases, and if they could install Drizzle instead of MySQL, they would cut their server costs by a half and save a lot of money!

So, should everyone use Drizzle? And so on. As Drizzle has repeatedly pointed out, it is not compatible with MySQL. So if you're using the MySQL platform now, you'll 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 introduced Drizzle because while it may not be your choice at the moment, it's likely to be someone's choice in a few years. Because the goal of this article is to raise your awareness of the tools you will 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 high availability database installations over the next five years.

Drizzle is a fully open source product that openly accepts contributions from developers. It doesn't have the support companies that MariaDB has, and it doesn't have the large number of outside developers that Percona has. Drizzle has a lot of room to grow and will offer some new features, but you may need to rewrite most of the MySQL code.

Contrast figure

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

product The price The target The main function Can it be put into production? Percona Server free Provides wrappers for the XtraDB storage engine and other analysis tools XtraDB is MariaDB free Extend MySQL to include XtraDB and other performance improvements XtraDB is Drizzle free Provides greater scalability and performance improvements than MySQL High availability is

conclusion

This article introduces three new branches of the MySQL product, aiming to solve some of the problems they encounter when using MySQL. All three branches are free, open source products. When you use them, you need to weigh the pros and cons of MySQL against the features it already provides. I believe that for most of you reading this, MySQL will remain the first choice to meet your database needs. I suspect that most of the people reading this are the owners of sites that get 1 million hits per hour. I want to emphasize again that MySQL is still a very good product and a very good database for most USES.

However, for those who think their website needs more availability, scalability, and performance than MySQL currently offers, any one of these three products may provide the solution you need. Further, if you think your site is going to be a profitable one, consider using one of the three products to fix the problem before it occurs.

Finally, the root cause for these MySQL branches is: 1 some authors want to change some of MySQL's basic functions, because they can't wait for MySQL to do it by itself. In addition, the current situation of Oracle threatens the future of MySQL, and many developers (including the original developers of MySQL) are concerned about the future of Oracle and whether Oracle will invest efforts to maintain its leading database status. These are all legitimate concerns in my view, so keep these products in mind as we move into the future.


Related articles: