How to View Various Modules in the TiDB Server

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb server中的各个模块如何查看

| username: yytest

In the 101 course, the structure diagram of the TiDB server includes many components. How can these correspond to the host? Is it through configuration files or processes?

| username: 随缘天空 | Original post link

It seems that you still don’t quite understand the components of TiDB. The commonly used components of TiDB are TiDB, TiKV, PD, etc. Your screenshot is equivalent to the structure diagram of the TiDB component, corresponding to the tidb_servers configuration in the configuration file.

| username: 有猫万事足 | Original post link

This module is a software design module. Indeed, they are all within a single TiDB process.

| username: TiDBer_JUi6UvZm | Original post link

These are all code modules.

| username: TiDBer_JUi6UvZm | Original post link

The internal processes, just need to roughly know what they do.

| username: hey-hoho | Original post link

The items in the diagram mostly reflect the packages in the source code structure and the design philosophy of the components. They are not individual processes; they are all contained within the tidb-server process.

| username: zhanggame1 | Original post link

Just take a quick look to get an understanding, no need to delve deeply. To really understand it, you need to look at the source code.

| username: YuchongXU | Original post link

Refer to the source code.

| username: 呢莫不爱吃鱼 | Original post link

The video tutorial covers it. Knowing the general process and principles should be enough.

| username: zhaokede | Original post link

Go download the source code and take a look.

| username: shigp_TIDBER | Original post link

My understanding is that as long as you know what it does, it’s enough. Some modules are reflected in system configuration and cluster configuration.

| username: Jellybean | Original post link

TiDB is a distributed database with three core components: the computing layer node TiDB, the storage layer node TiKV, and the management and scheduling layer node PD.

The TiDB server mentioned by the original poster is an instance of the computing layer node component, corresponding to a TiDB server process on the host machine. The TiDB server structure diagram you posted is a design diagram of the source code functional modules of the computing node, and in physical deployment, it belongs to the same TiDB server process.

Of course, different functions may have system parameters or variables provided for users to adjust and modify, so that users can achieve the best user experience.

| username: 洪七表哥 | Original post link

This belongs to software architecture.

| username: zhang_2023 | Original post link

This normally can’t be configured, right?

| username: mono | Original post link

You can understand that the TiDB server is a process. These in the diagram are the internal functional modules of the TiDB server, the ones doing the work. The foreman and the construction workers.

| username: TiDBer_QYr0vohO | Original post link

You can only look at the source code.

| username: xiaoqiao | Original post link

It’s not easy to directly correspond.

| username: QH琉璃 | Original post link

Then you need to study it carefully.

| username: yytest | Original post link

Thank you, everyone. I am currently preparing for the exam on May 7th and studying by watching videos.

| username: TiDBer_H5NdJb5Q | Original post link

Are there any courses available for in-depth study of source code analysis?