README 未给出安装步骤,需参考 vitess.io 官方文档
vitess
vitessioApache-2.0活跃维护Vitess 是面向 MySQL 的数据库集群系统,通过分片和集群管理实现水平扩展,适合在 Kubernetes 上运行大规模 MySQL 服务。
Vitess is a database clustering system for horizontal scaling of MySQL.
围绕 MySQL 构建的云原生分布式数据库,用通用分片实现水平扩展
Vitess 是面向 MySQL 的数据库集群系统,通过分片和集群管理实现水平扩展,适合在 Kubernetes 上运行大规模 MySQL 服务。
核心能力
- 通过通用分片实现无限水平扩展
- 应用代码和查询无需感知数据分布
- 支持分片的拆分与合并,原子切换只需几秒
- 源自 YouTube 数据库基础设施,支撑数万 MySQL 节点
容易踩的坑
- v24.0.5Vitess v24.0.5最新正式版2026-10-13 · 2026-10-13 20:27 UTC
Release of Vitess v24.0.5
Summary
Unsupported
sql_modevalues are rejectedVTGate
VTGate already rejected
SET sql_mode = ...statements that enable a mode the Vitess parser does not support (ANSI_QUOTES,NO_BACKSLASH_ESCAPES,PIPES_AS_CONCAT,REAL_AS_FLOAT). The check compared mode names textually and could be bypassed. VTGate now implements MySQL 8.x'ssql_modeassignment semantics and validates every assignment against them:- Setting an unsupported mode is rejected even when the underlying MySQL already runs with that mode, that is, when the
SETwould not change the value. Such statements previously succeeded, even though VTGate does not parse queries under these modes. The combination modeANSIis rejected as well, because it enablesANSI_QUOTES,PIPES_AS_CONCAT, andREAL_AS_FLOAT. IGNORE_SPACEandHIGH_NOT_PRECEDENCEare now also rejected. They are the two remaining modes that change how SQL text is interpreted. The Vitess parser does not honor them, so VTGate would parse queries differently than the session'ssql_modepromises.- Unknown mode names and invalid numeric values fail with MySQL's own errors:
ER_WRONG_VALUE_FOR_VAR(1231), andER_UNSUPPORTED_SQL_MODE(3899) for the bits of modes removed in MySQL 8.0. - Numeric values decode against MySQL's
sql_modebitmask. For example,SET sql_mode = 1048576reports thatNO_BACKSLASH_ESCAPESis unsupported. Valid numeric values are accepted. - Constant values are validated at planning time, with no shard round trip. This includes constant expressions such as
CONCATover literals, and it also applies when--enable-system-settingsis disabled. Non-constant expressions are validated at execution time, once their value is known.
VTTablet
VTTablet applies the same validation at its own entry points and returns the same errors: connection settings, on the settings pool and on reserved connections, and session-scope
SET sql_modestatements. This covers clients that bypass VTGate's validation, such as VTGates that are not upgraded yet and clients that talk to the query service directly.SET_VARoptimizer hints are forwarded to MySQL unchanged.Every MySQL connection Vitess creates now strips the modes that change how SQL text is interpreted from the session
sql_modeit inherits from the server's global value. All other modes, such as the strict modes and the zero-date modes, are kept. This applies to every component: query serving, schema tracking, heartbeats, replication management, Online DDL, VReplication and VDiff, and connections to external MySQL servers. The globalsql_modeis not changed.Impact
- Clients that run
SET sql_modewith an unsupported mode, includingANSI,IGNORE_SPACEandHIGH_NOT_PRECEDENCE, now receive an error. This also happens when theSETmatches the backend's currentsql_mode. Clients that set mode names MySQL would itself reject receive an error as well. - During a rolling upgrade, VTTablets are typically upgraded before VTGates. A session that sets a now-rejected
sql_modethrough a VTGate that is not upgraded yet starts receiving errors from upgraded VTTablets. - A backend whose global
sql_modeincludes one of these modes keeps it, but Vitess sessions no longer inherit it.
See #20883 for details.
Table ACL: callers with every role on every table may run statements whose tables cannot be determined
v24.0.4 began denying, under strict table ACL (
--queryserver-config-strict-table-acl), statements whose tables vttablet cannot determine (DO,CALL,REPAIR,OPTIMIZE,LOAD DATA, and aCREATE TABLEthat vttablet's parser cannot fully parse) for every caller outside the exempt ACL (--queryserver-config-acl-exempt-acl); see GHSA-w6mx-2f8x-pqf4. A caller that is a reader, a writer and an admin in a table group cover - Setting an unsupported mode is rejected even when the underlying MySQL already runs with that mode, that is, when the
- v23.0.8Vitess v23.0.82026-10-13 · 2026-10-13 20:27 UTC
查看更新说明
Release of Vitess v23.0.8
Summary
Unsupported
sql_modevalues are rejectedVTGate
VTGate already rejected
SET sql_mode = ...statements that enable a mode the Vitess parser does not support (ANSI_QUOTES,NO_BACKSLASH_ESCAPES,PIPES_AS_CONCAT,REAL_AS_FLOAT). The check compared mode names textually and could be bypassed. VTGate now implements MySQL 8.x'ssql_modeassignment semantics and validates every assignment against them:- Setting an unsupported mode is rejected even when the underlying MySQL already runs with that mode, that is, when the
SETwould not change the value. Such statements previously succeeded, even though VTGate does not parse queries under these modes. The combination modeANSIis rejected as well, because it enablesANSI_QUOTES,PIPES_AS_CONCAT, andREAL_AS_FLOAT. IGNORE_SPACEandHIGH_NOT_PRECEDENCEare now also rejected. They are the two remaining modes that change how SQL text is interpreted. The Vitess parser does not honor them, so VTGate would parse queries differently than the session'ssql_modepromises.- Unknown mode names and invalid numeric values fail with MySQL's own errors:
ER_WRONG_VALUE_FOR_VAR(1231), andER_UNSUPPORTED_SQL_MODE(3899) for the bits of modes removed in MySQL 8.0. - Numeric values decode against MySQL's
sql_modebitmask. For example,SET sql_mode = 1048576reports thatNO_BACKSLASH_ESCAPESis unsupported. Valid numeric values are accepted. - Constant values are validated at planning time, with no shard round trip. This includes constant expressions such as
CONCATover literals, and it also applies when--enable-system-settingsis disabled. Non-constant expressions are validated at execution time, once their value is known.
VTTablet
VTTablet applies the same validation at its own entry points and returns the same errors: connection settings, on the settings pool and on reserved connections, and session-scope
SET sql_modestatements. This covers clients that bypass VTGate's validation, such as VTGates that are not upgraded yet and clients that talk to the query service directly.SET_VARoptimizer hints are forwarded to MySQL unchanged.Every MySQL connection Vitess creates now strips the modes that change how SQL text is interpreted from the session
sql_modeit inherits from the server's global value. All other modes, such as the strict modes and the zero-date modes, are kept. This applies to every component: query serving, schema tracking, heartbeats, replication management, Online DDL, VReplication and VDiff, and connections to external MySQL servers. The globalsql_modeis not changed.Impact
- Clients that run
SET sql_modewith an unsupported mode, includingANSI,IGNORE_SPACEandHIGH_NOT_PRECEDENCE, now receive an error. This also happens when theSETmatches the backend's currentsql_mode. Clients that set mode names MySQL would itself reject receive an error as well. - During a rolling upgrade, VTTablets are typically upgraded before VTGates. A session that sets a now-rejected
sql_modethrough a VTGate that is not upgraded yet starts receiving errors from upgraded VTTablets. - A backend whose global
sql_modeincludes one of these modes keeps it, but Vitess sessions no longer inherit it.
See #20883 for details.
Table ACL: callers with every role on every table may run statements whose tables cannot be determined
v23.0.7 began denying, under strict table ACL (
--queryserver-config-strict-table-acl), statements whose tables vttablet cannot determine (DO,CALL,REPAIR,OPTIMIZE,LOAD DATA, and aCREATE TABLEthat vttablet's parser cannot fully parse) for every caller outside the exempt ACL (--queryserver-config-acl-exempt-acl); see GHSA-w6mx-2f8x-pqf4. A caller that is a reader, a writer and an admin in a table group cover - Setting an unsupported mode is rejected even when the underlying MySQL already runs with that mode, that is, when the
- v24.0.4Vitess v24.0.42026-10-01 · 2026-10-01 14:25 UTC
查看更新说明
Release of Vitess v24.0.4
Summary
lz4 backup engine: library upgrade and
--compression-levelmappingThe
lz4compression engine now uses thepierrec/lz4/v4library instead ofpierrec/lz4v2. This fixes broken block decoding on amd64 in the v2 library. The frame format is unchanged, so backups written by older Vitess versions remain restorable and backups written by this version are restorable by older versions.The upgrade changes how
--compression-levelis interpreted for the lz4 engine. Values0and1, including the default of1, select the fast compressor;1previously requested a hash-chain search depth of 1. Values2through9now select lz4's named hash-chain levels (Level2throughLevel9) instead of using the raw value as the hash-chain search depth, so higher values produce a better ratio at more CPU cost. Negative values, which previously requested an unlimited search, and values above9, which were used as the search depth, selectLevel9. Other compression engines are not affected.See #20778 for details.
Connections whose certificate revocation cannot be checked against a configured CRL are rejected
The certificate revocation lists configured with
--grpc-crl,--mysql-server-ssl-crl,--tablet-grpc-crl,--vtgate-grpc-crl, and the other*-crlflags are now enforced in every SSL mode and on resumed TLS sessions, see GHSA-fxqj-c35w-x6rq. Each certificate of the peer's verified chain, except the trust anchor the chain ends at, is checked against the CRLs signed by its issuer, the next certificate of the chain.Connections that are now rejected
In the
preferredandrequiredSSL modes, the server's certificate chain is otherwise not verified. A client with a CRL now builds that chain to the configured CA, or to the system roots when no CA is configured, and rejects the connection when the chain cannot be built or verified, rather than leave the CRL unchecked. For example:- A client in
requiredmode with a CRL but no CA file, connecting to a server whose certificate a private CA issued. - A client with a CRL and the root CA configured, connecting to a server that presents its certificate without the intermediate CA that issued it.
- A client with a CRL connecting to a server whose certificate has expired or is not valid for server authentication, which these modes accept without a CRL.
To keep such connections working, configure the CA that the server's chain leads to, have the server present its whole chain and a valid certificate, or drop the CRL.
A gRPC client with a CRL configured (
--tablet-grpc-crl,--vtgate-grpc-crl,--vtctld-grpc-crl, and the other*-grpc-crlflags) but neither a client certificate nor a CA now connects with TLS, verifying the server against the system roots, rather than in plaintext with the CRL silently ignored. Configure the CA along with the CRL, or drop the CRL.Configurations that are refused at startup
The following configurations are now refused when the TLS configuration is built, at startup, because the CRL cannot be applied as configured. Most of them used to run with the CRL silently ignored.
- A server-side CRL (
--grpc-crl,--mysql-server-ssl-crl) without the matching CA (--grpc-ca,--mysql-server-ssl-ca). Without a CA no client certificate is requested, so the CRL could not apply. Configure the CA, or drop the CRL. - A server-side CRL (
--grpc-crl,--mysql-server-ssl-crl) without the matching certificate and key (--grpc-certand--grpc-key,--mysql-server-ssl-certand--mysql-server-ssl-key). The server is then not configured for TLS at all: the gRPC server used to start in plaintext, and the MySQL server without TLS, with the CRL silently ignored. Configure the certificate and the key along with the CA, or drop the CRL.
- A client in
- v23.0.7Vitess v23.0.72026-10-01 · 2026-10-01 14:24 UTC
查看更新说明
Release of Vitess v23.0.7
Summary
lz4 backup engine: library upgrade and
--compression-levelmappingThe
lz4compression engine now uses thepierrec/lz4/v4library instead ofpierrec/lz4v2. This fixes broken block decoding on amd64 in the v2 library. The frame format is unchanged, so backups written by older Vitess versions remain restorable and backups written by this version are restorable by older versions.The upgrade changes how
--compression-levelis interpreted for the lz4 engine. Values0and1, including the default of1, select the fast compressor;1previously requested a hash-chain search depth of 1. Values2through9now select lz4's named hash-chain levels (Level2throughLevel9) instead of using the raw value as the hash-chain search depth, so higher values produce a better ratio at more CPU cost. Negative values, which previously requested an unlimited search, and values above9, which were used as the search depth, selectLevel9. Other compression engines are not affected.See #20778 for details.
Connections whose certificate revocation cannot be checked against a configured CRL are rejected
The certificate revocation lists configured with
--grpc-crl,--mysql-server-ssl-crl,--tablet-grpc-crl,--vtgate-grpc-crl, and the other*-crlflags are now enforced in every SSL mode and on resumed TLS sessions, see GHSA-fxqj-c35w-x6rq. Each certificate of the peer's verified chain, except the trust anchor the chain ends at, is checked against the CRLs signed by its issuer, the next certificate of the chain.Connections that are now rejected
In the
preferredandrequiredSSL modes, the server's certificate chain is otherwise not verified. A client with a CRL now builds that chain to the configured CA, or to the system roots when no CA is configured, and rejects the connection when the chain cannot be built or verified, rather than leave the CRL unchecked. For example:- A client in
requiredmode with a CRL but no CA file, connecting to a server whose certificate a private CA issued. - A client with a CRL and the root CA configured, connecting to a server that presents its certificate without the intermediate CA that issued it.
- A client with a CRL connecting to a server whose certificate has expired or is not valid for server authentication, which these modes accept without a CRL.
To keep such connections working, configure the CA that the server's chain leads to, have the server present its whole chain and a valid certificate, or drop the CRL.
A gRPC client with a CRL configured (
--tablet-grpc-crl,--vtgate-grpc-crl,--vtctld-grpc-crl, and the other*-grpc-crlflags) but neither a client certificate nor a CA now connects with TLS, verifying the server against the system roots, rather than in plaintext with the CRL silently ignored. Configure the CA along with the CRL, or drop the CRL.Configurations that are refused at startup
The following configurations are now refused when the TLS configuration is built, at startup, because the CRL cannot be applied as configured. Most of them used to run with the CRL silently ignored.
- A server-side CRL (
--grpc-crl,--mysql-server-ssl-crl) without the matching CA (--grpc-ca,--mysql-server-ssl-ca). Without a CA no client certificate is requested, so the CRL could not apply. Configure the CA, or drop the CRL. - A server-side CRL (
--grpc-crl,--mysql-server-ssl-crl) without the matching certificate and key (--grpc-certand--grpc-key,--mysql-server-ssl-certand--mysql-server-ssl-key). The server is then not configured for TLS at all: the gRPC server used to start in plaintext, and the MySQL server without TLS, with the CRL silently ignored. Configure the certificate and the key along with the CA, or drop the CRL. - A
*-crlfile that holds no C
- A client in
- v24.0.3Vitess v24.0.32026-09-03 · 2026-09-03 14:40 UTC
查看更新说明
Release of Vitess v24.0.3
Summary
VRLog Feature Removed
The VRLog feature — a streaming log of VReplication events served at VTTablet's
/debug/vrlogHTTP endpoint, disabled by default since v22 — has been removed. The--vreplication-enable-http-logflag that enabled it is now a deprecated no-op and will be removed in v26.Migration: remove
--vreplication-enable-http-logfrom VTTablet startup arguments.Impact: The
/debug/vrlogendpoint no longer exists. Passing--vreplication-enable-http-loglogs a deprecation warning and has no effect.See #20467 for details.
The entire changelog for this release can be found here.
The release includes 61 merged Pull Requests.
Thanks to all our contributors: @app/vitess-bot, @arthurschreiber, @timvaillancourt, @yushuqin
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Vitess
Vitess is a cloud-native horizontally-scalable distributed database system that is built around MySQL. Vitess can achieve unlimited scaling through generalized sharding.
Vitess allows application code and database queries to remain agnostic to the distribution of data onto multiple database servers. With Vitess, you can even split and merge shards as your needs grow, with an atomic cutover step that takes only a few seconds.
Vitess was a core component of YouTube's database infrastructure from 2011, and grew to encompass tens of thousands of MySQL nodes. Starting in 2015, Vitess was adopted by many other large companies, including Slack, Square (now Block), and JD.com.
For more about Vitess, please visit vitess.io.
Community
Vitess has a growing community.
If you are interested in contributing or participating in our monthly community meetings, please visit the Community page on our website.
We also maintain a roadmap on our website.
Follow our blog for low-frequency updates like new features and releases.
Reporting a Problem, Issue, or Bug
To report a problem, create a GitHub issue.
For topics that are better discussed live, please join the Vitess Slack workspace. You may post any questions on the #general channel or join some of the special-interest channels.
Security
Reporting Security Vulnerabilities
To report a security vulnerability, please email vitess-maintainers.
See Security for a full outline of the security process.
Security Audit
A third party security audit was performed by ADA Logics. Read the full report.
License
Unless otherwise noted, the Vitess source files are distributed under the Apache Version 2.0 license found in the LICENSE file.