tom__bo’s Blog

MySQL!! MySQL!! @tom__bo

TiDB検証環境構築 on GCP

はじめに

最近TiDB導入のための検証にアサインされて、TiDBを調べています。 MySQL互換のデータベースということでTiDBを試してみるなら、無料トライアルも用意されているフルマネージドのTiDB Cloudを利用してみると良さそうです。 しかし、実際に本番環境で利用したり、TiDBを含めたシステムを運用するためには分散システムであるTiDBの各コンポーネントの理解が必要で、そのためには自分でコンポーネントを建てたり落としたりしながら徐々にアーキテクチャを理解するのが良いでしょう。
(*TiDBにはTiDB serverをはじめPlacement Driver(PD), TiKV, TiFlashなど様々なプロセスを必要としますが、ここではこれらを"コンポーネント"と呼んでいます。TiUPのサブコマンドも"コンポーネント"なのでややこしいですが、ドキュメントのTiDB Architectureでもcomponentsと書いているのでそのままにしました。)

この記事では、Google Cloud Platformの$300分の初回無料トライアルを利用して、これの範囲内でTiDBの検証環境を構築する方法を紹介します。(半日程度のインスタンス利用ならトライアルでなくても300円くらいでできました。)
この手順に従って構築したり、必要に応じてTiFlashやTiCDC, TiDB Binlogなどのコンポーネントを設定ファイルに追記すればお好みの構成で動くTiDB検証環境が作れます。
TiUPというデプロイ・クラスタ管理ツールのおかげで、初期構築が非常に簡単なことがわかると思います。

ここで構築するのはTiDBを構成する最小コンポーネントであるTiDB Server, Placement Driver(s), TiKV(s)です。 TiDBの概要や構成についての説明は公式ドキュメントPingCAP公式のTech Blogなどがあるので、そちらを参考にしてください。

概要

改めて、ここでは以下の順番で検証環境を構築します。

  1. インスタンス構築
  2. TiUPインストール
  3. デプロイ設定(TiUP)
  4. デプロイ
  5. モニタ確認(紹介)
  6. MySQL Clientのインストール・接続
  7. Cloud Storageへのバックアップ
  8. Cloud Storageからのリストア

構築するコンポーネント群イメージ

( このイメージのとおりにインスタンスを立てたかったのですが、無料枠のためIPアドレス制限があり、TiDB server 1台、PD 3台TiKV 3台の構成になっています) ( あとから考えたら1サーバに相乗りさせればインスタンスを節約できて他のTiFlashや追加のクラスタを建てることもできたはずです...)

インスタンス構築

まずはインスタンスを構築します。 無料枠の制限のため、すべてのインスタンスe2-medium (2vCPU, 4GM memory)で構築しました。 推奨されるスペックよりかなり小さいですが、動けば良しとします。

bootdiskは10GBでは少ない気がしたので、20GBとしました

同一リージョンに建てられるIPアドレス数(やCPUコア数など)にも制限があるため、TiDB server 1台, MonitorノードはControlerノード自身にするなど厳しい構成となりました。
当然推奨される構成ではないですが、Deployできないレベルではないので、このまま進めます。 本来であればTiDB serverを複数台(最低3台)、モニターノードもオペレーション用のノードと分けるべきでしょう。

Role Hostname
Control用ノード(tiup, mysql client) 兼 モニターノード control-node-tidb-test
TiDB Server tidb-01-tidb-test
PD pd-01-tidb-test
PD pd-02-tidb-test
PD pd-03-tidb-test
TiKV tikv-01-tidb-test
TiKV tikv-02-tidb-test
TiKV tikv-03-tidb-test

GCPVPCは以下のようになりました。(これらのVPCはすでに削除済み)

SSH鍵作成・配布

control-nodeでssh keyを作成して、公開鍵を配布します。 GCP-Cの引数(コメント)として入れた文字列をユーザと認識して自動作成してくれるようなので、横着をしてtidbユーザが作られるようにします。

$ ssh-keygen -t rsa -f tidb -C "tidb"

# (GCPでパブリックキーを登録)

# (ホスト名でアクセスできるように設定)
$ cat .ssh/config
Host *-tidb-test
        User tidb
        Port 22
        IdentityFile /root/.ssh/tidb
        StrictHostKeyChecking no

これでcontrol-nodeから他のノードにsshでアクセスできるようになりました。

デプロイ準備 with TiUP

デプロイにはTiUPというPingCAP公式のツールを利用します。
TiUPはパッケージマネージャにとどまらないエコシステム管理ツールです。 インスタンスへの各種コンポーネントのデプロイだけでなく、サブコマンドを通したTiDB全体のコントロールができます。

TiUPインストール

ドキュメントに従って、以下のようにインストールします。

curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
source .bashrc

PingCAPが提供しているツールのすべてをサポートしているわけではありませんが、以下のようなツールがサブコマンドとして利用可能です。
tiup listコマンドを使うと、以下のようにサブコマンドとして利用できるTiUP付属のコンポーネントが表示されます。

$ tiup list
Available components:
Name            Owner      Description
----            -----      -----------
PCC             community  A tool used to capture plan changes among different versions of TiDB
bench           pingcap    Benchmark database with different workloads
br              pingcap    TiDB/TiKV cluster backup restore tool
cdc             pingcap    CDC is a change data capture tool for TiDB
chaosd          community  An easy-to-use Chaos Engineering tool used to inject failures to a physical node
client          pingcap    Client to connect playground
cluster         pingcap    Deploy a TiDB cluster for production
ctl             pingcap    TiDB controller suite
dm              pingcap    Data Migration Platform manager
dmctl           pingcap    dmctl component of Data Migration Platform
errdoc          pingcap    Document about TiDB errors
pd-recover      pingcap    PD Recover is a disaster recovery tool of PD, used to recover the PD cluster which cannot start or provide services normally
playground      pingcap    Bootstrap a local TiDB cluster for fun
tidb            pingcap    TiDB is an open source distributed HTAP database compatible with the MySQL protocol
tidb-lightning  pingcap    TiDB Lightning is a tool used for fast full import of large amounts of data into a TiDB cluster
tikv-br         pingcap    TiKV cluster backup restore tool
tiup            pingcap    TiUP is a command-line component management tool that can help to download and install TiDB platform components to the local system

デプロイ設定

上記でインストールしたTiUPを使ってTiDBクラスタをデプロイしていきます。 ドキュメントのDeployセクションを参考にOSレベルの設定が必要ですが、ここでは無視して進めます。 本番環境で利用するときはChecklistやSoftware and Hardware Recommendationを参考に必要な設定を行ってください。

今回はsimple-mini構成を参考にデプロイする構成をyamlで記述します。

wget https://raw.githubusercontent.com/pingcap/docs/master/config-templates/simple-mini.yaml

mv simple-mini.yaml topology.yaml
vim topology.yaml

topology.yaml を用意

$ cat topology.yaml
# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
global:
  user: "tidb"
  ssh_port: 22
  deploy_dir: "/tidb-deploy"
  data_dir: "/tidb-data"

pd_servers:
  - host: pd-01-tidb-test
  - host: pd-02-tidb-test
  - host: pd-03-tidb-test

tidb_servers:
  - host: tidb-01-tidb-test

tikv_servers:
  - host: tikv-01-tidb-test
  - host: tikv-02-tidb-test
  - host: tikv-03-tidb-test

monitoring_servers:
  - host: control-node-tidb-test

grafana_servers:
  - host: control-node-tidb-test

alertmanager_servers:
  - host: control-node-tidb-test

ここではコンポーネントをどのインスタンスに割り当てるかだけを記述しました。 コンポーネントやホストごとの設定はこのyamlファイルに記述する方式で初期設定が可能です。

デプロイ

用意したtopology.yamlでデプロイ

$ tiup cluster deploy tidb-test-01 v6.1.0 topology.yaml -i ~/.ssh/tidb -u tidb

ログがずらっと出ますが、成功すれば以下のようなメッセージが出ます。

Cluster `tidb-test-01` deployed successfully, you can start it with command: `tiup cluster start tidb-test-01 --init`

まだ起動していないので、cluster displayするとStatusがDownもしくはN/Aとなっています。

# 状況表示(display)
$ tiup cluster display tidb-test-01
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tom_bo_underbar/.tiup/components/cluster/v1.10.2/tiup-cluster display tidb-test-01
Cluster type:       tidb
Cluster name:       tidb-test-01
Cluster version:    v6.1.0
Deploy user:        tidb
SSH type:           builtin
Grafana URL:        http://control-node-tidb-test:3000
ID                           Role          Host                    Ports        OS/Arch       Status  Data Dir                      Deploy Dir
--                           ----          ----                    -----        -------       ------  --------                      ----------
control-node-tidb-test:9093  alertmanager  control-node-tidb-test  9093/9094    linux/x86_64  Down    /tidb-data/alertmanager-9093  /tidb-deploy/alertmanager-9093
control-node-tidb-test:3000  grafana       control-node-tidb-test  3000         linux/x86_64  Down    -                             /tidb-deploy/grafana-3000
pd-01-tidb-test:2379         pd            pd-01-tidb-test         2379/2380    linux/x86_64  Down    /tidb-data/pd-2379            /tidb-deploy/pd-2379
pd-02-tidb-test:2379         pd            pd-02-tidb-test         2379/2380    linux/x86_64  Down    /tidb-data/pd-2379            /tidb-deploy/pd-2379
pd-03-tidb-test:2379         pd            pd-03-tidb-test         2379/2380    linux/x86_64  Down    /tidb-data/pd-2379            /tidb-deploy/pd-2379
control-node-tidb-test:9090  prometheus    control-node-tidb-test  9090/12020   linux/x86_64  Down    /tidb-data/prometheus-9090    /tidb-deploy/prometheus-9090
tidb-01-tidb-test:4000       tidb          tidb-01-tidb-test       4000/10080   linux/x86_64  Down    -                             /tidb-deploy/tidb-4000
tikv-01-tidb-test:20160      tikv          tikv-01-tidb-test       20160/20180  linux/x86_64  N/A     /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
tikv-02-tidb-test:20160      tikv          tikv-02-tidb-test       20160/20180  linux/x86_64  N/A     /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
tikv-03-tidb-test:20160      tikv          tikv-03-tidb-test       20160/20180  linux/x86_64  N/A     /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
Total nodes: 10

スタート

デプロイしたサーバ群をスタート

# 全サーバ初回スタート (start)
tiup cluster start tidb-test-01 --init

この出力の中に以下のように初期パスワードが出てきます。 PDのダッシュボード、TiDBの初期rootユーザのパスワードがここで指定されたものになります。

The root password of TiDB database has been changed.
The new password is: '-@L_x3D97aCg0E+4c2'.
Copy and record it to somewhere safe, it is only displayed once, and will not be stored.
The generated password can NOT be get and shown again.

すべてのノードが正常に動作しているか、PDのダッシュボードURL、GrafanaのURLを確認します。

# 状況表示(display
$ tiup cluster display tidb-test-01
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tom_bo_underbar/.tiup/components/cluster/v1.10.2/tiup-cluster display tidb-test-01
Cluster type:       tidb
Cluster name:       tidb-test-01
Cluster version:    v6.1.0
Deploy user:        tidb
SSH type:           builtin
Dashboard URL:      http://pd-01-tidb-test:2379/dashboard
Grafana URL:        http://control-node-tidb-test:3000
ID                           Role          Host                    Ports        OS/Arch       Status  Data Dir                      Deploy Dir
--                           ----          ----                    -----        -------       ------  --------                      ----------
control-node-tidb-test:9093  alertmanager  control-node-tidb-test  9093/9094    linux/x86_64  Up      /tidb-data/alertmanager-9093  /tidb-deploy/alertmanager-9093
control-node-tidb-test:3000  grafana       control-node-tidb-test  3000         linux/x86_64  Up      -                             /tidb-deploy/grafana-3000
pd-01-tidb-test:2379         pd            pd-01-tidb-test         2379/2380    linux/x86_64  Up|UI   /tidb-data/pd-2379            /tidb-deploy/pd-2379
pd-02-tidb-test:2379         pd            pd-02-tidb-test         2379/2380    linux/x86_64  Up      /tidb-data/pd-2379            /tidb-deploy/pd-2379
pd-03-tidb-test:2379         pd            pd-03-tidb-test         2379/2380    linux/x86_64  Up|L    /tidb-data/pd-2379            /tidb-deploy/pd-2379
control-node-tidb-test:9090  prometheus    control-node-tidb-test  9090/12020   linux/x86_64  Up      /tidb-data/prometheus-9090    /tidb-deploy/prometheus-9090
tidb-01-tidb-test:4000       tidb          tidb-01-tidb-test       4000/10080   linux/x86_64  Up      -                             /tidb-deploy/tidb-4000
tikv-01-tidb-test:20160      tikv          tikv-01-tidb-test       20160/20180  linux/x86_64  Up      /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
tikv-02-tidb-test:20160      tikv          tikv-02-tidb-test       20160/20180  linux/x86_64  Up      /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
tikv-03-tidb-test:20160      tikv          tikv-03-tidb-test       20160/20180  linux/x86_64  Up      /tidb-data/tikv-20160         /tidb-deploy/tikv-20160
Total nodes: 10

Grafanaダッシュボード確認

ここまでの設定でexporterやGrafana Dashboardなどもインストールされます。

今回設定していないTiFlashやTiDB Binlog, TiCDCなどのコンポーネントダッシュボードも設定されます。(メトリックは当然は空)

20個以上もダッシュボードができるので、正直どこから見たらよいかわからないくらい情報があります。 例えばクラスタのOverviewは以下のようになっています。

  • overviewの折りたたまれた状態

  • Service PortとPD Overview

  • TiDBのOverview

  • TiKVのOverview

今回デプロイしたコンポーネントのGrafanaダッシュボードに様々なメトリクスが表示されていることが確認できました。 TiUPでdeployコマンドを打っただけで、ここまで設定してくれるのはすごいですね。

PDのダッシュボードについて

上記のGrafanaのダッシュボードとは別に、TiUPでTiDBサーバたちを起動したときにPDのダッシュボードも起動していますが、この画面をスクショするのを忘れました。 ドキュメントにあるようにここからも各コンポーネントの状況や、クエリごとの分析が可能です。

MySQL Clientインストール・接続確認

TiDBはMySQLプロトコル互換なので、MySQL Clientから接続してみます。

$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
$ dpkg -i mysql-apt-config_0.8.22-1_all.deb
$ apt install mysql-community-client
$ mysql --version
mysql  Ver 8.0.29 for Linux on x86_64 (MySQL Community Server - GPL)

接続確認

mysql -h tidb-01-tidb-test -P 4000 -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 407
Server version: 5.7.25-TiDB-v6.1.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.00 sec)

接続できることも確認できたので適当なユーザを作っておきます。 (rootのパスワード入力が面倒なので。)

CREATE USER 'tidb'@'%' IDENTIFIED BY 'tidb';
GRANT ALL ON *.* TO 'tidb'@'%';

バックアップ

バックアップデータ準備

初期構築でデフォルトで作成されるtestスキーマはデフォルトでbackupやTiDB Binlogで無視されるので、適当なスキーマを作成します。
ついでに何行かレコードも作っておきます。

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.00 sec)

mysql> create database sample;
Query OK, 0 rows affected (0.11 sec)

mysql> use sample
Database changed
mysql> create table t1(
    -> id int not null,
    -> primary key(id));
Query OK, 0 rows affected (0.11 sec)

mysql> insert into t1 (id) values (1), (2), (3);
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> select * from t1;
+----+
| id |
+----+
|  1 |
|  2 |
|  3 |
+----+
3 rows in set (0.01 sec)

Cloud Storage準備

buckettidb-test-tomboを作成しました。

bucket内に日付のディレクトリを作成しました。
このディレクトリ以下にバックアップします。

エンドポイント、ACCESS-KEY, SECRET-KEYはCloud StorageのSettings > INTEROPERABILITYタブから確認します。

br (backup)コマンド

brコマンドはbackup, recoveryを実行するためのツールです。 brはTiKVにアタッチしたNFSやS3互換のファイルストレージサービスにTiKVから直接データをバックアップします。

コマンド単体としてインストールすることもできますが、tiupコマンド経由で利用すると個別に設定する必要がなくて便利です。 tiupコマンドのサブコマンドとして指定すると、過去にインストールしていなければ自動でインストールしてくれます。

$ tiup br --help
tiup is checking updates for component br ...
A new version of br is available:
   The latest version:         v6.1.0
   Local installed version:
   Update current component:   tiup update br
   Update all components:      tiup update --all

The component `br` version  is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/br-v6.1.0-linux-amd64.tar.gz 47.18 MiB / 47.18 MiB 100.00% 82.95 MiB/s
Starting component `br`: /home/tom_bo_underbar/.tiup/components/br/v6.1.0/br --help
br is a TiDB/TiKV cluster backup restore tool.

このコマンドを利用してフルバックアップを取得します。

--pdオプションにPDサーバのうち1台を指定するとこれを起点にクラスタのサーバを把握し、TiKVからデータをバックアップしてくれます。 その他S3互換のストレージやコマンドのログ出力先となるファイルを指定して実行します。 この他の帯域制限やAutoTuningなどの機能はドキュメントを参照してください。

$ export AWS_ACCESS_KEY_ID=****
$ export AWS_SECRET_ACCESS_KEY=****

$ tiup br backup full \
    --pd "pd-01-tidb-test:2379" \
    --storage "s3://tidb-test-tombo/20220704" \
    --s3.endpoint "https://storage.googleapis.com" \
    --s3.region "us-east-1" \
    --send-credentials-to-tikv=true \
    --log-file backupfull.log

tiup is checking updates for component br ...
Starting component `br`: /home/tom_bo_underbar/.tiup/components/br/v6.1.0/br backup full --pd pd-01-tidb-test:2379 --storage s3://tidb-test-tombo/20220704 --s3.endpoint https://storage.googleapis.com --s3.region us-east-1 --send-credentials-to-tikv=true --log-file backupfull.log
Detail BR log in backupfull.log
Full Backup <----------------------------------------------------------------------------------------------------------------------------------------> 100.00%
Checksum <-------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2022/07/04 14:14:43.838 +00:00] [INFO] [collector.go:69] ["Full Backup success summary"] [total-ranges=18] [ranges-succeed=18] [ranges-failed=0] [backup-fast-checksum=6.038752ms] [backup-checksum=6.228185ms] [backup-total-ranges=67] [backup-total-regions=67] [total-take=1.817507632s] [BackupTS=434357949544005633] [total-kv=1062] [total-kv-size=78.14kB] [average-speed=42.99kB/s] [backup-data-size(after-compressed)=55.33kB] [Size=55327]

1スキーマ1テーブルを作成して3レコードしかINSERTしていませんが、--log-fileに指定したbackupfull.logには600行を超えるログが出ていることが確認できます。

最後に以下の出力があることを確認できればOKです(?)

[2022/07/04 14:14:43.839 +00:00] [INFO] [collector.go:70] ["Full Backup success summary"] [total-ranges=18] [ranges-succeed=18] [ranges-failed=0] [backup-fast-checksum=6.038752ms] [backup-checksum=6.228185ms] [backup-total-ranges=67] [backup-total-regions=67] [total-take=1.817507632s] [BackupTS=434357949544005633] [total-kv=1062] [total-kv-size=78.14kB] [average-speed=42.99kB/s] [backup-data-size(after-compressed)=55.33kB] [Size=55327]

Cloud Storageのディレクトリを確認するとファイルができています。

backup.lockというファイルが残っていますが、このファイルがあるディレクトリにはバックアップができないようになっているようです。

Error: backup lock file and sst file exist in s3://tidb-test-tombo/sampledir//backup.lock, there are some backup files in the path already, please specify a correct backup directory!: [BR:Common:ErrInvalidArgument]invalid argument

リカバリ

無料枠なので、もう一つリカバリ先のクラスタを建てる余裕はありません、一旦スキーマを消してリカバリします。

ちなみにBRコマンドによるバックアップではmysql, INFORMATION_SCHEMA, PERFORMANCE_SCHEMAはバックアップ対象外のため、dumplingなどのツールを利用して、自分でバックアップをする必要があります。 PITRでデータ欠損しないようにするためには工夫が必要になりますが、それは次回以降で書こうと思います。

データ削除

tom_bo_underbar@control-node-tidb-test:~$ mysql -h tidb-01-tidb-test -P 4000 -u tidb -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 415
Server version: 5.7.25-TiDB-v6.1.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> drop database sample;
Query OK, 0 rows affected (0.26 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA     |
| PERFORMANCE_SCHEMA |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.00 sec)

BR restore

backupと同様にtiup経由のbrコマンドを利用してリストアを実行します。 オプションはバックアップと同じなので説明は省略します。

tiup br restore full \
    --pd "pd-01-tidb-test:2379" \
    --storage "s3://tidb-test-tombo/20220704" \
    --s3.endpoint "https://storage.googleapis.com" \
    --s3.region "us-east-1" \
    --log-file restoretable.log
tiup is checking updates for component br ...
Starting component `br`: /home/tom_bo_underbar/.tiup/components/br/v6.1.0/br restore full --pd pd-01-tidb-test:2379 --storage s3://tidb-test-tombo/20220704 --s3.endpoint https://storage.googleapis.com --s3.region us-east-1 --log-file restoretable.log
Detail BR log in restoretable.log
Full Restore <-------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2022/07/04 14:37:20.842 +00:00] [INFO] [collector.go:69] ["Full Restore success summary"] [total-ranges=2] [ranges-succeed=2] [ranges-failed=0] [split-region=221.517µs] [restore-ranges=1] [total-take=1.940572473s] [Size=1549] [BackupTS=434358305207877634] [total-kv=3] [total-kv-size=75B] [average-speed=38.65B/s] [restore-data-size(after-compressed)=1.549kB]

データ確認

mysql> select * from sample.t1;
+----+
| id |
+----+
|  1 |
|  2 |
|  3 |
+----+
3 rows in set (0.01 sec)

削除したsample.t1がリストアにより復元できていることが確認できました。

このままPITRまでやってしまいたいところですが、PITRを実行するにはTiDB v6.1時点ではTiDB BinlogというPumpサーバとDrainerサーバからなるクラスタが追加で必要になります。

そのため、PITRについては次回以降に書こうと思います。

おわりに

以上、GCPの初回無料トライアル枠を利用してTiDBの最小構成を構築、バックアップ・リストアの検証する方法を紹介しました。
TiUPで簡単にgrafanaダッシュボードも含めた環境が構築できるので、さくっと用意できる爽快感があります。

TIUPのおかげで初期構築は簡単ですが、自信を持って運用できるところまで各コンポーネントを理解するのはかなり大変です。 今後TiDBの運用をしている方と相談できるととても心強いので、もし興味があればtwitter等で声をかけていただけると幸いです。

ちなみに7月7日のTiDB User Day 2022でパネルディスカッションに登壇させていただくことになりました。

pingcap.co.jp

髪が伸びて写真のような坊主ではなくなりましたが、当日は気軽に声をかけていただけると喜びます。