Vitess, k8s & sharding Sugu Sougoumarane, Co-creator CTO, - - PowerPoint PPT Presentation

vitess k8s sharding
SMART_READER_LITE
LIVE PREVIEW

Vitess, k8s & sharding Sugu Sougoumarane, Co-creator CTO, - - PowerPoint PPT Presentation

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+


slide-1
SLIDE 1

Sugu Sougoumarane, Co-creator CTO, PlanetScale

Vitess, k8s & sharding

@vitessio

slide-2
SLIDE 2

What is Vitess

  • Sharding middleware for MySQL
  • Massively scalable
  • HA
  • Cloud-native
slide-3
SLIDE 3

pxhere CC0

Vitess stats

Started 2010

8,000+ stars 16,000+ commits

Marquee adopters

100+ contributors 800+ Slack members 1000+ forks

slide-4
SLIDE 4

Key adopters

25% Migrated to Vitess Cash App fully runs on Vitess All of advertising campaign management

slide-5
SLIDE 5
slide-6
SLIDE 6

The Community

Quiz of Kings

slide-7
SLIDE 7

Vitess on Kubernetes

slide-8
SLIDE 8

2015

slide-9
SLIDE 9

Production Workloads

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

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12

Architecture

shard n shard 1

vtgate app server app server app server mysqld vttablet master vtgate big data Vitess topology mysqld vttablet mysqld vttablet replicas mysqld vttablet big data replicas mysqld vttablet vtctld App

slide-13
SLIDE 13

Starting with Vitess

Vitess app server app server app server MainDB Connection pooling Deadlines Hot row protection Row count limit Blacklisting

slide-14
SLIDE 14

Growing with Vitess

Vitess app server app server app server Master Replica Replica routing Load balancing Master promotion with Orchestrator

slide-15
SLIDE 15

Growing with Vitess

Vitess app server app server app server DB2 Replica DB1 Replica Unified View

slide-16
SLIDE 16

Growing with Vitess

Vitess app server app server app server DB2 Replica DB1:S1 Replica DB1:S2 Replica DB1:S3 Replica Sharding agnostic

slide-17
SLIDE 17

Growing with Vitess

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

slide-18
SLIDE 18

Demo

slide-19
SLIDE 19

Marketplace schema

customer cid name

  • rders
  • id

cid pid mname merchant name product pid description

slide-20
SLIDE 20

Sharded

customer cid name

  • rders
  • id

cid pid mname merchant name product unsharded customer sharded merchant sharded product pid description

slide-21
SLIDE 21

VReplication

customer cid name

  • rders
  • id

cid pid mname merchant mname product unsharded product id customer sharded merchant sharded sales pid amount product id

  • rders
  • id

cid pid mname

select * from product select pid, sum(price) as amount from orders select * from orders where in_keyrange( mname, ‘unicode_loose_md5’, ‘-80’)

slide-22
SLIDE 22

Use cases

  • Materialized Views
  • Real-time Rollups
  • Resharding
  • Backfilling of lookup vindexes
  • Schema deployment
  • Data migration
  • Change notification
slide-23
SLIDE 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?