+ All Categories
Home > Documents > TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation,...

TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation,...

Date post: 21-May-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
13
Fernando Ipar / Percona University Montevideo / April 2019 TiDB 101
Transcript
Page 1: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

Fernando Ipar / Percona University Montevideo / April 2019

TiDB 101

Page 2: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019

●Internal Principal Consultant @ Pythian.

●Pager-carrying, buck stops at my team.

●OSDB Practice (MySQL/MariaDB, MongoDB, Cassandra, …).

●19 years of MySQL experience.

"2

About me

Page 3: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "3

TiDB

Created by PingCAP (Founded in April 2015 by 3 Infrastructure Engineers)

Page 4: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019

●SQL-based (MySQL[0] protocol).

●Distributed (ACID).

●Transactional (Snapshot Isolation, advertised as REPEATABLE-READ).

●Inspired on Google’s Spanner and F1.

●HTAP workloads.

●Open Source (Open Core).

●RocksDB for storage (though Storage Engine API exists)[1].

●“15+ Petabytes in 300+ Companies”[2]

[0] https://github.com/pingcap/docs/blob/master/sql/mysql-compatibility.md

[1] https://blog.pythian.com/tag/myrocks/

[2] https://www.pingcap.com/success-stories/https://www.pingcap.com/success-stories/

"4

TiDB Overview

Page 5: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019

●You need a sharded MySQL.

●You have a sharded MySQL but have found out the shard key does not match all query use cases (who would have thought?!).

●Your data set does not fit on a single machine and your query volume is rather low.

"5

Good Use Cases

Page 6: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019

●Your workload is very latency-sensitive.

●Your data fits in a single server.

●You’re closer to OLTP than OLAP.

●You have very large transactions.

"6

Poor Use Cases

Page 7: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "7

TiDB Overview - Architecture

Image Credit: https://github.com/pingcap/docs/blob/master/architecture.md

Page 8: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "8

TiKV

Image Credit: https://github.com/tikv/tikv

Page 9: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "9

TiDB: OLTP + Ad Hoc OLAP

Image Credit: https://www.slideshare.net/morgo/tidb-introduction

Page 10: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "10

TiDB: SQL Parser and Coprocesor.

Image Credit: https://www.slideshare.net/morgo/tidb-introduction

Page 11: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "11

TiDB: Replicating from MySQL

Image Credit: https://github.com/pingcap/docs/blob/master/tools/syncer.md

Page 12: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "12

https://pingcap.com/tidb-academy/

I have certification vouchers for questions I can’t answer right now or otherwise interesting questions.

Page 13: TiDB 101 · SQL-based (MySQL[0] protocol). Distributed (ACID). Transactional (Snapshot Isolation, advertised as REPEATABLE-READ). Inspired on Google’s Spanner and F1. HTAP workloads.

© The Pythian Group Inc., 2019 "13

THANK YOU


Recommended