Vitess, k8s & sharding Sugu Sougoumarane, Co-creator CTO, PlanetScale @vitessio
What is Vitess ● Sharding middleware for MySQL ● Massively scalable ● HA ● Cloud-native
Vitess stats Marquee adopters Started 2010 100+ contributors 8,000+ stars 800+ Slack members 16,000+ commits 1000+ forks pxhere CC0
Key adopters 25% Migrated to Vitess Cash App fully runs on Vitess All of advertising campaign management
The Community Quiz of Kings
Vitess on Kubernetes
2015
Production Workloads Oldest, since 2016 Hundreds of keyspaces 10,000+ Tablets Migrate from cloud to cloud MySQL 8.0
Architecture shard n topology app server vtctld shard 1 vttablet app server mysqld vtgate master app server vtgate vttablet vttablet vttablet vttablet mysqld mysqld mysqld mysqld big data replicas big data replicas App Vitess
Starting with Vitess app server Vitess app server MainDB Connection pooling app server Deadlines Hot row protection Row count limit Blacklisting
Growing with Vitess app server Replica Vitess app server Master Replica routing app server Load balancing Master promotion with Orchestrator
Growing with Vitess Replica DB2 app server Vitess app server Unified View Replica DB1 app server
Growing with Vitess Replica DB2 app server Replica DB1:S1 Vitess app server Sharding agnostic Replica DB1:S2 app server Replica DB1:S3
Zone 1 Zone 2 Zone 3 Growing with Vitess Replica Replica Replica DB2 app server Replica Replica Replica DB1:S1 Vitess app server Multi-zone Replica Replica Replica app server DB1:S2 Isolation Replica Replica Replica DB1:S3
Demo
Marketplace schema customer merchant product cid name pid name description orders oid cid pid mname
Sharded product customer merchant unsharded sharded sharded merchant product customer name pid cid description name orders oid cid pid mname
VReplication customer merchant product sharded sharded unsharded select customer merchant select * pid, cid mname from orders sum(price) name where as amount in_keyrange( from orders sales mname, ‘unicode_loose_md5’, pid orders orders ‘-80’) amount oid oid cid cid pid pid mname mname product id select * from product product id
Use cases ● Materialized Views ● Real-time Rollups ● Resharding ● Backfilling of lookup vindexes ● Schema deployment ● Data migration ● Change notification
What’s next? ● Sign into slack channel at vitess.io ● Try bringing up a cluster on your laptop or kubernetes ● https://vitess.io/docs/tutorials/ ● https://github.com/vitessio/vitess ● Square Cash blog posts on sharding with Vitess ● @sougou ● @vitessio @planetscaledata @ssougou Questions?
Recommend
More recommend