1.5 Important features of TiDB database platform

  |   0 评论   |   0 浏览

1.5 Important features of TiDB database platform(TiDB 技术特性)

主讲人

Coca Li(李宋高)

PingCAP Tech Center Leader

Chinasoft / AsiaInfo / Suning / PingCAP

Database Administrator for Oracle & MySQL & TiDB

Before we begin

  • Context: Want to know more about TiDB
  • Goal: Study the architecture and features of TiDB
  • Outline:
    • The architecture of TiDB
    • Important features
    • What's more in TiDB 4.0?

Part I: The architecture of TiDB

  • A overview of TiDB's Architecture
  • Goal
  • Subtopics
    • Basic Architecture
    • Extended Architecture with TiSpark
    • Extended Architecture with TiFlash
  • Key points
  • Review of goal

Subtopic: Basic Architecture

151BasicArchitecture.png

三个基本组件:

  • 无状态的 SQL 引擎 -- 建立连接,解析 SQL
  • 分布式的 Key-Value 存储引擎
  • 调度引擎 -- 元数据管理、全局事务管理

Subtopic: Extended Architecture with TiSpark

152ExtendedArchitecturewithTiSpark.png

TiSpark:分布式计算引擎,并行计算

Subtopic: Extended Architecture with TiFlash

153ExtendedArchitecturewithTiFlash.png

行存转列存。

Part II: Important features

  • An overview of TiDB's feature
  • Goal
  • Subtopics
    • Scalability
    • High Availability
    • Distribute Transaction
    • Real-time HTAP
  • Key points
  • Review of goal

Subtopic: Scalability

  • Scalability
    • Scale out Online
    • Scale in Online
    • Data rebalance automatically

在线扩缩容,理论上可以无限扩展。

Subtopic: HA

  • High Availability
    • Shared nothing
    • Raft based
    • Self-recovery in fault
    • Multi-active architecture with three data centers in two cities

不存在单点瓶颈,强一致,自动恢复,两地三中心多活的架构。

Subtopic: Distributed transaction

  • Distributed transaction
    • ACID controlled by TiDB database
    • Needn't to specify sharding key in application
    • Support one request based on several data notes

支持分布式事务

Subtopic: Real-time HTAP

  • Online Transaction / Real-time Online Analysis mixed load integrated Architecture
    • Raft based data replica
    • Row storage for TP and column storage for AP in one database
    • Standard SQL for TP & AP
    • Consistent result by follower read
    • No ETL, No T + 1

实时 HTAP。

Part III: More in TiDB 4.0

  • An overview of TiDB 4.0
  • Goal
  • Subtopics
    • TiUP
    • Large transaction
    • Tmp storage
    • Dashboard
    • Elastic Scheduling
  • Key points
  • Review of goal

Subtopic: TiUP

  • Quickly to start with tidb
    • Two steps to build a tidb environment online
    • Support offline setup mode
    • Remove disk IO detection

在线部署和离线部署。

Subtopic: Big Transaction

  • Transaction in TiDB 3.0
    • 100 MB limit
    • 6 MB per kv pair
    • 300,000 keys per transaction
  • Transaction in TiDB 4.0
    • 10 GB limit(more memory needed)
    • 6 MB per kv pair

Subtopic: Tmp storage

154Tmpstorage.png

内存不够用时,将数据转储到临时表。

Subtopic: Dashboard

  • Cluster Status

  • Hot key Visualization

  • Query SQL Analysis

  • Performance Diagnosis

    4.0 引入的可视化组件,方便快速查看集群状态,快速识别热点,定位慢 SQL,提供性能调优建议。

Subtopic: Elastic Scheduling
155ElasticScheduling.png

Quiz

  • Do we need to specify the sharding key in TiDB?
  • What's the limit for transaction size in TiDB 4.0?