How to Set Up a Cluster with Two TiDB Nodes?

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

Original topic: 一个集群两个TIDB节点方案如何搭建?

| username: Steve阿辉

[TiDB Usage Environment] Production Environment
[TiDB Version] 6.1.2
[Encountered Problem: Phenomenon and Impact]

I have thought of a new technique. Currently, to isolate the customer’s business from our internal business, we install a TiDB on one PD for internal services. The configuration is relatively low, but it is sufficient for internal services. We also install an elastic network card on the PD node and then install TiDB. This not only achieves business isolation and traffic diversion, preventing internal service interruption due to another TiDB failure, but also allows for quick node addition and internal service migration if the TiDB on the PD is insufficient in performance. This setup is completely isolated from backend development business and is very convenient.

I am wondering if anyone in the group has adopted the method of installing two TiDBs in one cluster for business isolation. I couldn’t find information on the official website. Does anyone have experience in this area? I hope you can provide some answers.

| username: ohammer | Original post link

Take a look at this: Placement Rules in SQL | PingCAP 文档中心

| username: 数据小黑 | Original post link

There has been such consideration, and to some extent, it has some effect, but the effect is limited. The specific effectiveness depends on the business. The problem with this solution is that TiKV does not implement isolation. As more and more operators are pushed down to TiKV, this isolation scheme may cause TiKV’s IO and memory to become resource bottlenecks, leading to more contention. If considering a thorough isolation scheme, you can use the placement-rules-in-sql mentioned above.

| username: Steve阿辉 | Original post link

Currently, TiKV is not the bottleneck, but the instability of external services in some cases can cause TiDB to crash. This is the problem we encountered, so we want to add TiDB nodes for isolation.

| username: 裤衩儿飞上天 | Original post link

Is it an OOM (Out of Memory) issue?

| username: 会飞的土拨鼠 | Original post link

Typically, there are 3 TiDB nodes.

| username: Running | Original post link

This usage is somewhat similar to traditional master-slave or dual-active solutions. In a stable TiKV scenario, you can directly add a TiDB node.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.