vitess qcon
play

Vitess@QCon Sugu Sougoumarane, Co-creator CTO, PlanetScale - PowerPoint PPT Presentation

Vitess@QCon Sugu Sougoumarane, Co-creator CTO, PlanetScale @ssougou ssougou.blogspot.com Database trends Transactional data explosion Move to cloud Transactional data options Single instance RDBMS NoSQL App Sharded


  1. Vitess@QCon Sugu Sougoumarane, Co-creator CTO, PlanetScale @ssougou ssougou.blogspot.com

  2. Database trends ● Transactional data explosion ● Move to cloud

  3. Transactional data options ● Single instance RDBMS ● NoSQL ● App Sharded RDBMS ● NewSQL

  4. Cloud ● Instances go down all the time ○ Good master promotion story ● Durability through replication ○ Semi-sync ● Small instances ● Discovery mechanism

  5. Vitess ● Leverage MySQL ● Massive Scale ● Battle-hardened ● Runs “anywhere”

  6. Vitess stats Started 2010 Marquee adopters 100+ contributors 6,000+ stars 500+ Slack members 15,000+ commits pxhere CC0

  7. Key adopters 20% Migrated to Vitess 10,000+ Tablets on Kubernetes Cash App fully runs on Vitess

  8. The Community In production Evaluating Quiz of Kings

  9. MySQL Community Award “Application of the year 2018”

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

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

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

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

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

  15. ALL YOUR DATABASE

  16. Architecture shard n lockserver 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

  17. Sharding concepts VTGate Database ● VSchema ● Schema ● Primary Vindex ● Primary Key ● Secondary Vindex ● Secondary Key ○ Unique ○ Unique ○ Non-unique ○ Non-unique ● Shared Vindex ● Foreign Key ● Sequences ● Auto-increment

  18. Resharding ● No downtime ● Vertical and Horizontal ● Splits and Merges ● Checks and balances

  19. Demo lookup user merchant unsharded sharded sharded user merchant name_user_idx id name name name uid product order id id uid pid mname

  20. Questions? ● Sign into slack channel at vitess.io ● Try bringing up a cluster on your laptop or kubernetes ● GH: http://github.com/vitessio/vitess

  21. Appendix

  22. Demo user merchant lookup select sharded sharded unsharded name, id as uid user merchant name_user_idx from user select * id name name from merchant name where uid in_keyrange( mname, ‘unicode_loose_md5’, product order order ‘-80’) id id id uid uid pid pid mname mname select * from product product product id id

  23. DB Protection ● Connection pools ● Hot rows ● Damage control ○ Row-count limit ○ Time limit ○ Transaction time limits ● Blacklisting

  24. Observability ● Stats end points ● Per-query stats ● Querylog

  25. Life of a Query: VTGate vschema shardmap Vindexes vindex Keyspace ids shards AST Plan Engine Engine Parse PlanBuilder SQL Part 1 Part 2 topology health SQL ScatterConn Gateway vttablets

  26. Life of a Query: VTTablet Filtered Replication schema PKs AST Plan Parse PlanBuilder ACL Consolidator SQL Pool Deadliner MySQL BinlogPlayer Transaction Watcher

  27. Roadmap ● Materialized views ● Real-time rollups ● VSchema-based resharding ● Full cross-shard SQL support

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend