EN: |+| [Music] |+| In this unit, we will be talking about the overall architecture of TiDB.
JA: |+|[音楽]|+| このユニットでは、TiDBの全体像について話します。

EN: |+| The core components of TiDB database, in short TiDB, is composed of three server clusters.
JA: |+|TiDBデータベースの主要コンポーネントであるTiDBは、3つのサーバークラスタから構成されています。

EN: |+| All of which communicate with each other to form a database cluster.
JA: |+|お互いに通信し、データベースクラスタを形成するすべてのものです。

EN: The components include |+| TiDB server cluster TiKV server cluster and the placement driver or PD cluster.
JA: コンポーネントには |+| TiDB サーバークラスタ、TiKV サーバークラスタ、Placement Driver（またはPDクラスタ）が含まれます。

EN: |+| All three sub-clusters are decoupled with each other.
JA: |+|すべての3つのサブクラスタは互いに切り離されています。

EN: The number of TiDB servers does not have |+| to be equal to the number of TiKV servers and does not have to be equal to the number of PD servers.
JA: TiDBサーバーの数は、TiKVサーバーの数と同じでなくてもよく、またPDサーバーの数と同じでなくてもよいです。 |+|

EN: |+| For example, you can have two TiDB servers, three PD servers, and six TiKV servers.
JA: |+|例えば、2つのTiDBサーバー、3つのPDサーバー、および6つのTiKVサーバーを持つことができます。

EN: The |+| first server cluster I would like to discuss about is TiDB server cluster.
JA: 最初に話し合いたいサーバークラスタは、TiDBサーバークラスタです。 |+|

EN: Do not be confused between |+| TiDB and TiDB server cluster.
JA: TiDBサーバークラスタ |+|

EN: The TiDB server cluster is a component, a sub-cluster of TiDB.
JA: TiDBサーバークラスタはTiDBのコンポーネントであり、サブクラスタです。

EN: |+| The TiDB sub-cluster which represents SQL layer exposes the connection endpoint of MySQL protocol.
JA: |+| TiDB サブクラスタは SQL レイヤーを表し、MySQLプロトコルの接続エンドポイントを公開します。

EN: |+| TiDB server instance was in the cluster that are responsible for accepting connections from the |+| database clients.
JA: |+|TiDBサーバーインスタンスは、データベースクライアントからの接続を受け入れる責任があるクラスタにありました。 |+|

EN: The TiDB server cluster is stateless, and in practice multiple |+| instances of TiDB server can be launched.
JA: TiDBサーバークラスタは状態を持たず、実際には複数のTiDBサーバーインスタンスを起動できます。 |+|

EN: And an unified DNS name can be provided through a |+| load balancing component such as LVS, HAProxy or F5 BIG-IP.
JA: そして、LVS、HAProxy、またはF5 BIG-IPなどの負荷分散コンポーネントを介して統一されたDNS名が提供される可能性があります。 |+|

EN: If you are in the public cloud, |+| the Elastic Load Balancing service provided by the cloud service providers also works.
JA: もし、あなたがパブリッククラウド上にいる場合、クラウドサービスプロバイダーが提供する Elastic Load Balancing サービスも機能します。 |+|

EN: Thus, client |+| connections can be evenly distributed across multiple TiDB server instances without explicit |+| efforts in your application.
JA: クライアントコネクションは、アプリケーションでの明示的な努力なしに、複数のTiDBサーバーインスタンスに均等に分散される可能性があります。 |+| |+|

EN: The TiDB servers do not actually store the table data, it only parses |+| SQL statements and forwards a data request to the storage layer which is TiKV cluster.
JA: TiDBサーバーは実際にはテーブルデータを保存せず、SQL文を解析して、 TiKVクラスタにデータ要求を転送します。 |+|

EN: |+| The second sub-cluster I would like to discuss about is PD or placement driver server cluster.
JA: |+|二番目に議論したいサブクラスタは、PDまたは配置ドライバサーバークラスタです。

EN: |+| It is the metadata management module for the entire TiDB which stores the real-time data |+| distribution of each TiKV node and the overall topology configuration of TiDB.
JA: |+|TiDB全体のメタデータ管理モジュールであり、各TiKVノードのリアルタイムデータ|+|配信とTiDB全体のトポロジー設定を格納します。

EN: |+| It generates the transaction ID for distributed transactions which is based on the TSO or |+| timestamp Oracle.
JA: |+|分散トランザクションのトランザクションIDを生成します。これはTSOまたはOracleの時刻スタンプに基づいています。 |+|

EN: TSO is a timestamp to guarantee that two changes happen within |+| a database in a temporal sequential order even though the database is a distributed database.
JA: TSOは、分散データベースであっても、二つの変更が時間的に順序づけられた順序で発生することを保証するタイムスタンプです。 |+|

EN: |+| PD not only stores metadata, it also issues data scheduling commands to specific TiKV nodes based |+| on data distribution that is reported in real-time by TiKV nodes.
JA: |+|PDはメタデータを保存するだけでなく、TiKVノードに報告されるデータ分布に基づいて特定のTiKVノードにデータスケジューリングコマンドを発行します。 |+|

EN: PD is considered to be the brain of |+| the entire cluster.
JA: PDは、|+|全体のクラスタの脳と見なされています。

EN: As the cluster is backed by Raft algorithm, PD needs to be deployed |+| to an odd number nodes.
JA: クラスタがRaftアルゴリズムでバックアップされているため、PDは奇数のノードに配置する必要があります。 |+|

EN: It is usually recommended to deploy three nodes at least.
JA: 通常、少なくとも3つのノードを展開することが推奨されています。

EN: |+| As long as the majority nodes are alive your cluster is open for reads and write operations.
JA: |+|ほとんどのノードが稼働している限り、クラスタは読み書き操作に対してオープンであり続けます。

EN: |+| The last sub-cluster, the TiKV cluster, is responsible for storing table data.
JA: |+|最後のサブクラスタである TiKV クラスタは、テーブルデータの保存に責任を負っています。

EN: |+| From an external view, TiKV is a distributed transactional key-value NoSQL database.
JA: |+|  外から見ると、TiKVは分散トランザクションキーバリューNoSQLデータベースです。

EN: |+| TiKV also uses Raft algorithm for replication to ensure data consistency and disaster recovery.
JA: |+|TiKVもデータの整合性と災害回復を保証するために、Raftアルゴリズムを使用してレプリケーションを行います。

EN: |+| The load balancing of the data placement among different TiKV nodes is scheduled by PD, |+| the brain of the cluster.
JA: |+|TiKVノード間でのデータ配置の負荷分散は、クラスタの中枢であるPDによってスケジュールされています。 |+|

EN: I'm going to show you a single example similar to the steps |+| shown on the slides so that you can have a basic understanding of how TiKV stores data.
JA: スライドに表示された手順に似た、単一の例を示すので、TiKVがデータを格納する方法を基本的に理解できるようにします。|+|これが元の英語の文章に含まれている場合、それらを翻訳された結果に戻す必要があります。

EN: |+| I'm going to use the TiUP command line tool to launch a Playground sandbox on my local machine.
JA: |+| TiUPコマンドラインツールを使って、ローカルマシンでPlaygroundサンドボックスを起動するつもりです。

EN: |+| Once the TiDB is up and running, I will use the Raw KV API to do simple put/get operations |+| to show you that TiKV is a key-value store.
JA: |+|TiDBが稼働したら、RAW KV APIを使用して単純なput/get操作を行い、TiKVがキーバリュー型のストアであることを示します。 |+|

EN: The script itself is pretty intuitive, it calls TiUP |+| to spin up a whole TiDB system tagged with the name classroom.
JA: スクリプト自体は非常に直感的であり、「TiUP」を呼び出して、「classroom」という名前のタグ付きでTiDBシステム全体を展開します。 |+|

EN: We deployed three TiDB instances, |+| three PD instances and three TiKV instances and one TiFlash instance.
JA: 展開したのは、TiDBインスタンス3つ、PDインスタンス3つ、TiKVインスタンス3つとTiFlashインスタンス1つです。 |+|

EN: Let's set aside the TiFlash |+| instance for now.
JA: TiFlash インスタンスは今は置いておくことにします。 |+|

EN: We'll cover TiFlash later in this course.
JA: このコースでは後でTiFlashについて説明します。

EN: And, no worries if you don't have |+| TiUP right now.
JA: そして、TiUP|+| は現在手元になくても心配はいりません。

EN: You will have TiUP installed after lab 1 at the end of this course.
JA: このコースの終わりまでにラボ1が終了すると、あなたはTiUPがインストールされているはずです。

EN: So, let's do it.
JA: だから、やってみましょう。

EN: |+| You can see that PD is up, then TiKV and TiDB are getting up.
JA: |+|PDがアップしているのが見えます。それに続いてTiKVとTiDBが上がっています。

EN: In a real |+| world production environment, you can spin up these servers on different nodes.
JA: 現実の世界の本番環境では、これらのサーバーを異なるノードにスピンアップすることができます。 |+|

EN: Please note |+| that the Playground is just a sandbox for testing purposes only.
JA: プレイグラウンドは、テストのための砂場にすぎないことに注意します。 |+|

EN: Okay, it's all ready by now.
JA: 大丈夫です。今すべて準備ができました。

EN: |+| You can see that we use a Raw client to build a connection.
JA: |+| RAWクライアントを使用して接続を構築することが分かります。

EN: The |+| endpoints we are using are from PD.
JA: 私たちが使用しているエンドポイントはPDからです。 |+|

EN: We simply put and get a new key-value pair.
JA: 単に新しいキーバリューのペアを配置して、取得するだけです。

EN: |+| And then, let's try to get a value from a non-existing key.
JA: |+|次に、存在しないキーから値を取得しようとしてみましょう。

EN: Let's see what happens.
JA: それでは何が起こるか見てみましょう。

EN: |+| That is what we expected, right?
JA: |+|それが私たちが期待していたことでしょうか。

EN: We can actually put key-value pairs into TiKV.
JA: 私たちは実際にTiKVにキーと値のペアを入れることができます。

EN: |+| And, we can get value from key 1, but not from non-existing key, key 0.
JA: |+|そして、私たちはキー1から値を取得できますが、存在しないキー、キー0からは値を取得できません。

EN: |+| So, this is the first time and the last time we use Raw KV interface for this course.
JA: |+| だから、これはこのコースでRAW KVインターフェースを使用する最初で最後の機会です。

EN: After that, |+| throughout this course the only language you will use to communicate with TiDB will be SQL.
JA: 以降、このコース全体で、TiDBとのコミュニケーションに使用する唯一の言語がSQLであることを考えてください。 |+|