SlideShare a Scribd company logo
Integrating Best of Breed Open
Source Tools to Vitess:
Orchestrator
Alkin Tezuysal
PlanetScale
Perconalive, May 2021
About me
Sr. Technical Manager at PlanetScale
Maintainer for Vitess
Open source database evangelist previously at Percona,
Pythian and others with Enterprise Background
Born to Sail, Forced to Work!
@ask_dba
Founded Feb. 2018 by co-creators of Vitess
~50 employees
HQ Mountain View, 100% remote team
@ask_dba
Vitess
A database clustering system for horizontal scaling of
MySQL / MariaDB
● CNCF graduated project
● Open source, Apache 2.0 licence
● Contributors from around the community
● Written in Golang
@ask_dba
Agenda
Vitess architecture overview
Vitess use cases and sharding
Vitess Open Source Tools
● XtraBackup - Percona
● pt-online-schema change - Percona
● gh-ost - Github
● Orchestrator - Shlomi Noach
● And more ...
@ask_dba
Vitess architecture basics
How the Vitess architecture enables transparent
database infrastructure operations
@ask_dba
Glossary
● Keyspace: Logical database (sharded)
○ Keyspace ID
○ Primary Vindex
○ Vindex
● VTGate: Proxy server
● VTTablet : Backend server
● Topology : Configuration server (etcd,
zookeper)
@ask_dba
Vitess architecture basics
Consider a common replication cluster
@ask_dba
Vitess architecture basics
Each MySQL server is assigned a vttablet
- A daemon/sidecar
- Controls the mysqld process
- Interacts with the mysqld server
- Typically on same host as mysqld
@ask_dba
Vitess architecture basics
In production you have multiple clusters
@ask_dba
Vitess architecture basics
User and application traffic is routed via
vtgate
- A smart, stateless proxy
- Speaks the MySQL protocol
- Impersonates as a monolith MySQL
server
- Relays queries to vttablets
@ask_dba
Vitess architecture basics
A vitess deployment will run multiple
vtgate servers for scale out
@ask_dba
Vitess architecture basics
vtgate must transparently route queries
to correct clusters, to relevant shards
app
app
commerce
shard 0
commerce
shard 1
internal
unsharded
?
@ask_dba
Vitess architecture basics
Queries route based on schema & sharding scheme
app
app
commerce
shard 0
commerce
shard 1
internal
unsharded
USE commerce;
SELECT order_id, price
FROM orders
WHERE customer_id=4;
@ask_dba
Vitess architecture basics
topo: distributed key/value store
- Stores the state of vitess: schemas,
shards, sharding scheme, tablets,
roles, etc.
- etcd/consul/zookeeper
- Small dataset, mostly cached by
vtgate
commerce
shard 0
commerce
shard 1
internal
unsharded
@ask_dba
vtctld: control daemon
- Runs ad hoc operations
- API server
- Reads/writes topo
- Uses locks
- Operates on tablets
Vitess architecture basics
commerce
shard 0
commerce
shard 1
internal
unsharded
@ask_dba
Vitess knows
Vitess keeps known schemas, shards, clusters,
server roles, all in topo
It keeps a state
@ask_dba
Vitess Controlplane Includes
● Proxy server (vtgate)
● Managed Backup and Recovery (XtraBackup)
● Integrated failover (a.k.a Orchestrator/vtorc)
● Sharding Schemes (Horizontal)
● Advanced Replication (Vreplication,Vstream)
● Online DDL (gh-ost, pt-osc)
● And more
@ask_dba
Vitess architecture summary
@ask_dba
Supported Backend Databases
● MySQL 5.7 / 8.0
● MariaDB 10.3
● Postgresql
@ask_dba
Vitess Use Cases and Sharding
● Part or entire application scaling
● Management of existing MySQL topology
● Sharding and resharding
● Minimizing backup/recovery scenarios
Vitess Open Source Tools
● XtraBackup - Percona ✔
● pt-online-schema change - Percona ✔
● gh-ost - Github ✔
● Orchestrator - Shlomi Noach → vtorc - in progress
● And more ...
XtraBackup
● For MySQL 5.7 and MySQL 8.0
● MariaDB 10.3 is not compatible with XtraBackup.
$ vtctl Backup <tablet-alias>
$ vtctl BackupShard [-allow_master=false]
<keyspace/shard>
pt-online-schema
● Supported since version 9.0.0 GA
● Automatic handling of flags
● Uses @@ddl_strategy session variable
mysql> set @@ddl_strategy='pt-osc --max-load
Threads_running=200';
mysql> ALTER TABLE user MODIFY user_id BIGINT
$ vtctlclient ApplySchema -ddl_strategy "pt-osc
--max-load Threads_running=200" -sql "ALTER TABLE
user MODIFY user_id INT " commerce
gh-ost
● Supported since version 9.0.0 GA
● Automatic handling of flags
● Uses @@ddl_strategy session variable
mysql> set @@ddl_strategy='gh-ost --max-load
Threads_running=200';
mysql> ALTER TABLE user MODIFY user_id BIGINT
$ vtctlclient ApplySchema -ddl_strategy "gh-ost
--max-load Threads_running=200" -sql "ALTER TABLE
user MODIFY user_id INT " commerce
Choosing a DDL strategy
● Online / VReplication
● gh-ost or pt-osc
Read more on Vitess Documentation.
Orchestrator - Vtorc
● Experimental
● Development in progress, help needed.
Orchestrator Highlights
● Developed by Shlomi Noach , several contributors
● MySQL Replication Topology Management and High
Availability solution
● Provides HTTP API & Web Interface
● Supports Discovery, Refactoring, Recovery with
pre/post hooks
DEMO and Q/A
@ask_dba
Resources
Docs: vitess.io/docs/
Code: github.com/vitessio/vitess
Slack: vitess.slack.com
@ask_dba
Thank you!
Questions?
github.com/askdba
@ask_dba
@ask_dba

More Related Content

PDF
Introduction to Vitess on Kubernetes for MySQL - Webinar
PDF
MySQL Ecosystem in 2020
PDF
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
PPTX
Mysql 8 vs Mariadb 10.4 Highload++ 2019
PDF
How to upgrade like a boss to MySQL 8.0 - PLE19
PDF
How to shard MariaDB like a pro - FOSDEM 2021
PDF
When is Myrocks good? 2020 Webinar Series
PPTX
How to upgrade like a boss to my sql 8.0?
Introduction to Vitess on Kubernetes for MySQL - Webinar
MySQL Ecosystem in 2020
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Mysql 8 vs Mariadb 10.4 Highload++ 2019
How to upgrade like a boss to MySQL 8.0 - PLE19
How to shard MariaDB like a pro - FOSDEM 2021
When is Myrocks good? 2020 Webinar Series
How to upgrade like a boss to my sql 8.0?

What's hot (20)

POTX
Serverless
PPTX
Myrocks in the wild wild west! FOSDEM 2020
PPTX
Intro to MySQL Part I
PPTX
Proxysql use case scenarios hl++ 2017
PPTX
Mysql ecosystem in 2019
PDF
20171104 hk-py con-mysql-documentstore_v1
PDF
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
PPTX
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
PDF
Modern MySQL Monitoring and Dashboards.
PDF
Using MySQL in Automated Testing
PDF
My First 90 days with Vitess
PPTX
The New MariaDB Offering: MariaDB 10, MaxScale and More
PDF
How MariaDB is approaching DBaaS
PDF
Mysql User Camp : 20-June-14 : Mysql Fabric
PDF
Getting started in the cloud for developers
PPTX
Working with the Moodle Database: The Basics
PPTX
Tips to drive maria db cluster performance for nextcloud
PDF
Mysql User Camp : 20th June - Mysql New Features
PDF
The MySQL Server Ecosystem in 2016
PPTX
How we switched to columnar at SpendHQ
Serverless
Myrocks in the wild wild west! FOSDEM 2020
Intro to MySQL Part I
Proxysql use case scenarios hl++ 2017
Mysql ecosystem in 2019
20171104 hk-py con-mysql-documentstore_v1
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
Modern MySQL Monitoring and Dashboards.
Using MySQL in Automated Testing
My First 90 days with Vitess
The New MariaDB Offering: MariaDB 10, MaxScale and More
How MariaDB is approaching DBaaS
Mysql User Camp : 20-June-14 : Mysql Fabric
Getting started in the cloud for developers
Working with the Moodle Database: The Basics
Tips to drive maria db cluster performance for nextcloud
Mysql User Camp : 20th June - Mysql New Features
The MySQL Server Ecosystem in 2016
How we switched to columnar at SpendHQ
Ad

Similar to Integrating best of breed open source tools to vitess orchestrator pleu21 (20)

PDF
KubeCon_NA_2021
PDF
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
PDF
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
PPTX
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
PPTX
Mysql ecosystem in 2018
PDF
The MySQL Server ecosystem in 2016
PDF
MariaDB: Connect Storage Engine
PDF
The MySQL Server ecosystem in 2016
PPSX
Sharding MySQL with Vitess
PPTX
Rising Interest in Open Source Relational Databases
PDF
Databases in the Hosted Cloud
PDF
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
PDF
MySQL InnoDB Cluster / ReplicaSet - Tutorial
PDF
MySQL InnoDB Cluster / ReplicaSet - Tutorial
PDF
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
PDF
Percona XtraDB Cluster ( Ensure high Availability )
PPTX
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
PDF
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
PDF
Percona, software libre y bases de datos
PDF
MariaDB 10: A MySQL Replacement - HKOSC
KubeCon_NA_2021
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
NOSQL Meets Relational - The MySQL Ecosystem Gains More Flexibility
Vitess VReplication: Standing on the Shoulders of a MySQL Giant
Mysql ecosystem in 2018
The MySQL Server ecosystem in 2016
MariaDB: Connect Storage Engine
The MySQL Server ecosystem in 2016
Sharding MySQL with Vitess
Rising Interest in Open Source Relational Databases
Databases in the Hosted Cloud
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
MySQL InnoDB Cluster / ReplicaSet - Tutorial
MySQL InnoDB Cluster / ReplicaSet - Tutorial
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
Percona XtraDB Cluster ( Ensure high Availability )
Архитектура приложений с использованием MySQL, Петр Зайцев (Percona)
MySQL Day Paris 2016 - MySQL HA: InnoDB Cluster and NDB Cluster
Percona, software libre y bases de datos
MariaDB 10: A MySQL Replacement - HKOSC
Ad

More from Alkin Tezuysal (17)

PDF
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
PDF
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
PDF
Boosting MySQL with Vector Search Scale22X 2025.pdf
PDF
Boosting MySQL with Vector Search Fosdem 2025.pdf
PDF
London MySQL Day - Lightning Talk Dec 2024.pdf
PDF
Design and Modeling with MySQL and PostgreSQL - Percona University Istanbul S...
PDF
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
PPTX
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
PDF
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
PDF
How OLTP to OLAP Archival Demystified
PDF
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
PDF
My first 90 days with ClickHouse.pdf
PDF
Vitess - Data on Kubernetes
PPTX
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
PPTX
When is MyRocks good?
PDF
PXC (Xtradb) Failure and Recovery
PDF
Securing your database servers from external attacks
Boosting MySQL with Vector Search -THE VECTOR SEARCH CONFERENCE 2025 .pdf
Unified Observability - Alkin Tezuysal - FOSSASIA Summit March 2025 .pdf
Boosting MySQL with Vector Search Scale22X 2025.pdf
Boosting MySQL with Vector Search Fosdem 2025.pdf
London MySQL Day - Lightning Talk Dec 2024.pdf
Design and Modeling with MySQL and PostgreSQL - Percona University Istanbul S...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
How OLTP to OLAP Archival Demystified
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
My first 90 days with ClickHouse.pdf
Vitess - Data on Kubernetes
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
When is MyRocks good?
PXC (Xtradb) Failure and Recovery
Securing your database servers from external attacks

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
composite construction of structures.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Well-logging-methods_new................
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
Welding lecture in detail for understanding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Construction Project Organization Group 2.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Foundation to blockchain - A guide to Blockchain Tech
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
composite construction of structures.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Well-logging-methods_new................
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
CYBER-CRIMES AND SECURITY A guide to understanding
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Welding lecture in detail for understanding
Embodied AI: Ushering in the Next Era of Intelligent Systems
R24 SURVEYING LAB MANUAL for civil enggi
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Construction Project Organization Group 2.pptx
Mechanical Engineering MATERIALS Selection
additive manufacturing of ss316l using mig welding
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Integrating best of breed open source tools to vitess orchestrator pleu21

  • 1. Integrating Best of Breed Open Source Tools to Vitess: Orchestrator Alkin Tezuysal PlanetScale Perconalive, May 2021
  • 2. About me Sr. Technical Manager at PlanetScale Maintainer for Vitess Open source database evangelist previously at Percona, Pythian and others with Enterprise Background Born to Sail, Forced to Work! @ask_dba
  • 3. Founded Feb. 2018 by co-creators of Vitess ~50 employees HQ Mountain View, 100% remote team @ask_dba
  • 4. Vitess A database clustering system for horizontal scaling of MySQL / MariaDB ● CNCF graduated project ● Open source, Apache 2.0 licence ● Contributors from around the community ● Written in Golang @ask_dba
  • 5. Agenda Vitess architecture overview Vitess use cases and sharding Vitess Open Source Tools ● XtraBackup - Percona ● pt-online-schema change - Percona ● gh-ost - Github ● Orchestrator - Shlomi Noach ● And more ... @ask_dba
  • 6. Vitess architecture basics How the Vitess architecture enables transparent database infrastructure operations @ask_dba
  • 7. Glossary ● Keyspace: Logical database (sharded) ○ Keyspace ID ○ Primary Vindex ○ Vindex ● VTGate: Proxy server ● VTTablet : Backend server ● Topology : Configuration server (etcd, zookeper) @ask_dba
  • 8. Vitess architecture basics Consider a common replication cluster @ask_dba
  • 9. Vitess architecture basics Each MySQL server is assigned a vttablet - A daemon/sidecar - Controls the mysqld process - Interacts with the mysqld server - Typically on same host as mysqld @ask_dba
  • 10. Vitess architecture basics In production you have multiple clusters @ask_dba
  • 11. Vitess architecture basics User and application traffic is routed via vtgate - A smart, stateless proxy - Speaks the MySQL protocol - Impersonates as a monolith MySQL server - Relays queries to vttablets @ask_dba
  • 12. Vitess architecture basics A vitess deployment will run multiple vtgate servers for scale out @ask_dba
  • 13. Vitess architecture basics vtgate must transparently route queries to correct clusters, to relevant shards app app commerce shard 0 commerce shard 1 internal unsharded ? @ask_dba
  • 14. Vitess architecture basics Queries route based on schema & sharding scheme app app commerce shard 0 commerce shard 1 internal unsharded USE commerce; SELECT order_id, price FROM orders WHERE customer_id=4; @ask_dba
  • 15. Vitess architecture basics topo: distributed key/value store - Stores the state of vitess: schemas, shards, sharding scheme, tablets, roles, etc. - etcd/consul/zookeeper - Small dataset, mostly cached by vtgate commerce shard 0 commerce shard 1 internal unsharded @ask_dba
  • 16. vtctld: control daemon - Runs ad hoc operations - API server - Reads/writes topo - Uses locks - Operates on tablets Vitess architecture basics commerce shard 0 commerce shard 1 internal unsharded @ask_dba
  • 17. Vitess knows Vitess keeps known schemas, shards, clusters, server roles, all in topo It keeps a state @ask_dba
  • 18. Vitess Controlplane Includes ● Proxy server (vtgate) ● Managed Backup and Recovery (XtraBackup) ● Integrated failover (a.k.a Orchestrator/vtorc) ● Sharding Schemes (Horizontal) ● Advanced Replication (Vreplication,Vstream) ● Online DDL (gh-ost, pt-osc) ● And more @ask_dba
  • 20. Supported Backend Databases ● MySQL 5.7 / 8.0 ● MariaDB 10.3 ● Postgresql @ask_dba
  • 21. Vitess Use Cases and Sharding ● Part or entire application scaling ● Management of existing MySQL topology ● Sharding and resharding ● Minimizing backup/recovery scenarios
  • 22. Vitess Open Source Tools ● XtraBackup - Percona ✔ ● pt-online-schema change - Percona ✔ ● gh-ost - Github ✔ ● Orchestrator - Shlomi Noach → vtorc - in progress ● And more ...
  • 23. XtraBackup ● For MySQL 5.7 and MySQL 8.0 ● MariaDB 10.3 is not compatible with XtraBackup. $ vtctl Backup <tablet-alias> $ vtctl BackupShard [-allow_master=false] <keyspace/shard>
  • 24. pt-online-schema ● Supported since version 9.0.0 GA ● Automatic handling of flags ● Uses @@ddl_strategy session variable mysql> set @@ddl_strategy='pt-osc --max-load Threads_running=200'; mysql> ALTER TABLE user MODIFY user_id BIGINT $ vtctlclient ApplySchema -ddl_strategy "pt-osc --max-load Threads_running=200" -sql "ALTER TABLE user MODIFY user_id INT " commerce
  • 25. gh-ost ● Supported since version 9.0.0 GA ● Automatic handling of flags ● Uses @@ddl_strategy session variable mysql> set @@ddl_strategy='gh-ost --max-load Threads_running=200'; mysql> ALTER TABLE user MODIFY user_id BIGINT $ vtctlclient ApplySchema -ddl_strategy "gh-ost --max-load Threads_running=200" -sql "ALTER TABLE user MODIFY user_id INT " commerce
  • 26. Choosing a DDL strategy ● Online / VReplication ● gh-ost or pt-osc Read more on Vitess Documentation.
  • 27. Orchestrator - Vtorc ● Experimental ● Development in progress, help needed. Orchestrator Highlights ● Developed by Shlomi Noach , several contributors ● MySQL Replication Topology Management and High Availability solution ● Provides HTTP API & Web Interface ● Supports Discovery, Refactoring, Recovery with pre/post hooks