Vitess Running Sharded MySQL on Kubernetes

Vitess继续发展成为一个可大规模扩展的云切分解决方案。它现在用于为Slack、Square、JD.com等公司存储核心业务数据。
本课程将介绍vitess的高级功能,重点介绍使其成为云本机的原因。
最后,我们将演示大多数分片系统尚未解决的强大的物化视图功能。

展开查看详情

1.Vitess, k8s & sharding Sugu Sougoumarane, Co-creator CTO, PlanetScale @vitessio

2.What is Vitess ● Sharding middleware for MySQL ● Massively scalable ● HA ● Cloud-native

3.Vitess stats Marquee adopters Started 2010 100+ contributors 8,000+ stars 800+ Slack members 16,000+ commits 1000+ forks pxhere CC0

4.Key adopters 25% Migrated to Vitess Cash App fully runs on Vitess All of advertising campaign management

5.

6.The Community Quiz of Kings

7.Vitess on Kubernetes

8.2015

9.Production Workloads Oldest, since 2016 Hundreds of keyspaces 10,000+ Tablets Migrate from cloud to cloud MySQL 8.0

10.

11.

12.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

13.Starting with Vitess app server app server Vitess MainDB Connection pooling app server Deadlines Hot row protection Row count limit Blacklisting

14.Growing with Vitess app server app server Vitess Replica Master Replica routing app server Load balancing Master promotion with Orchestrator

15.Growing with Vitess Replica DB2 app server app server Vitess Unified View Replica app server DB1

16.Growing with Vitess Replica DB2 app server Replica DB1:S1 app server Vitess Sharding agnostic Replica app server DB1:S2 Replica DB1:S3

17. Zone 1 Zone 2 Zone 3 Growing with Vitess Replica Replica Replica DB2 app server Replica Replica Replica DB1:S1 app server Vitess Multi-zone Replica Replica Replica app server DB1:S2 Isolation Replica Replica Replica DB1:S3

18.Demo

19.Marketplace schema product customer merchant pid cid name description name orders oid cid pid mname

20.Sharded product customer merchant unsharded sharded sharded product customer merchant pid cid name description name orders oid cid pid mname

21.VReplication product customer merchant unsharded sharded sharded select customer merchant pid, select * cid from orders mname sum(price) name where as amount from orders in_keyrange( sales mname, pid orders ‘unicode_loose_md5’, orders amount ‘-80’) oid oid cid cid pid pid mname mname product id select * from product product id

22.Use cases ● Materialized Views ● Real-time Rollups ● Resharding ● Backfilling of lookup vindexes ● Schema deployment ● Data migration ● Change notification

23.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?