We're delighted to announce the release of Vitess 20 along with version 2.13.0 of the Vitess Kubernetes Operator.
Version 20 focuses on usability and maturity of existing features, and continues to build on the solid foundation of scalability and performance established in previous versions. Our commitment remains steadfast in providing a powerful, scalable, and reliable solution for your database scaling needs.
What's New in Vitess 20 #
- Query Compatibility: enhanced DML support including improved query compatibility, Vindex hints, and extended support for various sharded
update
anddelete
operations. - VReplication: multi-tenant imports (experimental).
- Online DDL: improved support for various schema change scenarios, dropping support for
gh-ost
. - Vitess Operator: automated and scheduled backups.
Dive Deeper #
Let’s look into some key highlights of this release.
Query Compatibility #
The latest Vitess release enhances DML support with features like Vindex hints, sharded updates with limits, multi-table updates, and advanced delete operations.
Vindex hints enable users to influence shard routing:
SELECT * FROM user USE VINDEX (hash_user_id, secondary_vindex) WHERE user_id = 123;
SELECT * FROM order IGNORE VINDEX (range_order_id) WHERE order_date = '2021-01-01';
Sharded updates with limits are now supported:
UPDATE t1 SET t1.foo = 'abc', t1.bar = 23 WHERE t1.baz > 5 LIMIT 1;
Multi-table updates and multi-target updates enhance flexibility:
UPDATE t1 JOIN t2 ON t1.id = t2.id JOIN t3 ON t1.col = t3.col SET t1.baz = 'abc', t1.apa = 23 WHERE t3.foo = 5 AND t2.bar = 7;
UPDATE t1 JOIN t2 ON t1.id = t2.id SET t1.foo = 'abc', t2.bar = 23;
Advanced delete operations with subqueries and multi-target support are included:
DELETE FROM t1 WHERE id IN (SELECT col FROM t2 WHERE foo = 32 AND bar = 43);
DELETE t1, t3 FROM t1 JOIN t2 ON t1.id = t2.id JOIN t3 ON t1.col = t3.col;
These features provide greater control and efficiency for managing sharded data. For more details, please refer to the Vitess and MySQL documentation.
VReplication: Multi-tenant Imports (experimental) #
Many web-scale applications use a multi-tenant architecture where each tenant has their own database (with identical schemas). There are several challenges with this approach like provisioning and scaling potentially tens of thousands of databases, and uniformly updating database schemas across them.
A sharded Vitess keyspace is a great option for such a system with a single logical database serving all tenants. Vitess 20 adds support for importing data from such a multi-tenant setup into a single Vitess keyspace, with new --shards
and --tenant-id
flags for the MoveTables workflow. You would run one such workflow for each tenant, with imported tenants being served by the Vitess cluster.
Online DDL #
Vitess migrations now support enum
definition reordering. Vitess opts to use enum
s by alias (their string representation) rather than by ordinal value (the internal integer representation).
Vitess now has better analysis for INSTANT
DDL scenarios, enabled with the --prefer-instant-ddl
DDL strategy flag. It is able to predict whether a migration can be fulfilled by the INSTANT
algorithm and use this algorithm if so.
It also improves support for range partitioning migrations, and opts to use direct partitioning queries over Online DDL where appropriate.
VDiffs can now be run on Online DDL Workflows which are still in progress (i.e. not yet cut-over).
Release 20.0 drops support for gh-ost
for Online DDL, as we continue to invest in vitess
migrations based on VReplication. The gh-ost
strategy is still recognized; however:
- Vttablet binaries no longer bundle the
gh-ost
binary. The user should provide their owngh-ost
binary, and supplyvttablet --gh-ost-path
. - Vitess no longer tests
gh-ost
in CI/endtoend tests.
Vitess-operator #
Automated and scheduled backups are now available as an experimental feature in v2.13.0. We have added a new user guide for this feature.
Vitess and the Community #
As an open-source project, Vitess thrives on the contributions, insights, and feedback from the community. Your experiences and input are invaluable in shaping the future of Vitess. We encourage you to share your stories and ask questions, on GitHub or in our Slack community.
Getting Started #
For a seamless transition to Vitess 20, we highly recommend reviewing the detailed release notes. Additionally, you can explore our documentation for guides, best practices, and tips to make the most of Vitess 20. Whether you're upgrading from a previous version or running Vitess for the first time, our resources are designed to support you every step of the way.
Thank you for your support and contributions to the Vitess project!
The Vitess Team