Vitess 10 is released with many excellent features and also many bug fixes that were bothering the user base. We are going to see all the features and exciting announcements.
So, Let’s roll!
Major Themes in Vitess
In this release, we can see that Vitess Maintainers have continued to focus on compatibility. It is the most critical component of Vitess, being part of the MySQL ecosystem. We have seen the start of work on benchmarking and various performance optimizations. The whole improvements have given us a clear vision of the progress in terms of performance.
Compatibility (MySQL, frameworks)
For over a year, the developers started having a tough time ensuring that Vitess can be a drop-in replacement for MySQL. They have done work on every level of Vitess – from what the TCP packets look like to parsing and query planning.
In this release, we can see the creation of automated tests running a popular database framework. During testing, the devs have found and fixed various issues that would have stopped most users from using Vitess with this framework. With this release of V10.0, we can witness that Vitess (unsharded) passes all automated end-to-end tests of the Ruby on Rails framework. Now, even if we don’t use Rails, the improvements might still benefit us. We can also see a significant overlap between frameworks regarding the type of queries issued and their expectations on results coming back.
The new release comes with the addition of freno-style throttling to VReplication workflows. Both source and target tablets can now be throttled based on the replication lag of the corresponding shards.
We can now import data from another Vitess cluster through New commands Mount and Migrate. The release also includes Improved different metrics, various bug fixes and fine-tuning of the VReplication V2 user commands.
The schema management is now more improved. We will take a look at the significant changes.
Improved SQL syntax
Several SQL syntaxes got improvement. Few are listed below:
SHOW VITESS_MIGRATIONS SHOW VITESS MIGRATIONS LIKE '<uuid>' SHOW VITESS MIGRATIONS LIKE ‘<migration-context>’ SHOW VITESS MIGRATIONS LIKE '<state>' ALTER VITESS_MIGRATION ‘<uuid>’ CANCEL ALTER VITESS_MIGRATION' <uuid>' RETRY REVERT VITESS_MIGRATION ‘<uuid>’
For further information on this subject, you can always consult here.
Introduction of VReplication-based migrations via ddl_strategy=’online.’
VReplication acts as the underlying mechanism behind resharding, materialed news, MoveTables, and more. In this new release, it is now capable of running schema migrations. We can learn more about it here.
Revertible Online DDL: lossless, online reverting for completed migrations
We can see support via REVERT VITESS_MIGRATION ‘<uuid>’ statement. Again, the support is visible for CREATE TABLE statements in all online DDL strategies (reverting a CREATE TABLE hides away the table). The new release also supports DROP TABLE statements in all online DDL strategies (reverting a DROP TABLE reinstates the table with all data). Also, keeping for ALTER TABLE in online (VReplication) strategy is new. After migration completion, reverting of an ALTER TABLE is lossless and retains changes made to the table. The operation is rapid and only requires catching up on the binlog events since migration completion. Learn more by clicking here.
Declarative schema changes
Declarative schema changes happen with the ddl_strategy=’online|gh-ost|pt-osc -declarative’. We now see for each table the supply of CREATE TABLE or DROP TABLE statement but never ALTER TABLE statement. Also, now Vitess can automatically decide whether the existing schema matches the required schema or works towards matching it. Declarative schema changes are now idempotent. We can see more here.
The new release of Vitess 10 has had a particular focus on performance optimization. Some highlights include the addition of a new and more performant Cache Implementation for query plans. The new cache uses an LFU eviction algorithm to make it more resilient against pollution. It behaves amazingly better in pathological cases (such as bulk inserts into an active database) while having faster response times and better hit rates during regular operation.
Also, the Vitess SQL Parser performance has been dramatically improved, both in parsing speed and in reducing memory allocations. The improvement will result in less CPU usage for vtgate instances, faster query times and less GC churn. Third party applications that depend on Vitess’ parser will also receive these benefits if they upgrade to the newest version where the external API remains primarily unchanged.
Several AST operations that Vitess performs on SQL syntax trees have been redesigned not to allocate memory unless strictly necessary. It will significantly decrease memory usage for vtgate processes, particularly in busy Vitess clusters. We can see most of the improvements in CPU and memory usage of vtgate.
With the new release, Vitess 10.0 introduces an experimental multi-cluster admin API and web UI called VTAdmin. Deployment of the vtadmin-api and vtadmin-web components is entirely opt-in.
To ensure with the new release that Vitess delivers high performance to its users, we can see the improvement of benchmarking and performance monitoring techniques ever since Vitess 9.0. The release of Vitess 10.0 underwent significant improvements, including the support for Vitess’s microbenchmarks.
We can also see enhanced configurability & reproducibility of benchmarks. The profiling of Vitess and the recording of Vitess and MySQL metrics also significantly improved this update.
Vitess 10.0 is out now, and check it out by downloading here.