Published May 4, 2022

Episode 510: Deepthi Sigireddi on How Vitess Scales MySQL

Deepthi Sigireddi delves into the transformative scalability of Vitess for MySQL databases, showcasing its innovative sharding mechanisms and architecture, including VT Gates and tablets, to handle complex data environments and ensure distributed transaction management with consistency across sharded systems.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Data Consistency

    Vitess employs various methods to maintain data consistency across distributed databases, crucial for ensuring reliable transactions. explains that in a traditional RDBMS, consistency involves enforcing database-level rules like uniqueness constraints and default values 1. However, in a distributed system like Vitess, these constraints must be re-implemented across multiple shards. This is particularly important when a column value needs to be unique across all shards, which Vitess ensures if the column is part of the sharding scheme 1.

       

    Transaction Modes

    Vitess supports different transaction modes, each with implications for database consistency and performance. In unsharded mode, Vitess is fully ACID compliant, similar to MySQL. However, in sharded mode, some guarantees break down, affecting atomicity 2. Deepthi describes three transaction modes: single, multi, and best effort. The multi mode, for example, involves writing data in parallel across shards but commits sequentially, which can lead to non-atomic transactions if a commit fails 2.

       

    Distributed Transactions

    Distributed transactions in Vitess involve a prepare and commit process, ensuring either complete success or failure. If a transaction fails, Vitess attempts resolution, though this can be slower than best-effort modes 3. Deepthi also discusses isolation and durability, noting that Vitess does not provide read committed isolation in multi mode, leading to potential fractured reads 4. Durability is achieved through semi-synchronous replication, ensuring data is not lost even if a node fails 4.

Related Episodes