How to Enable TiDB Binlog?

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

Original topic: 如何开启tidb binlog?

| username: TiDBer_5GvAkLi0

【TiDB Usage Environment】Test Environment
【TiDB Version】v5.4.1
【Encountered Issues】1: Do I need to install both Pump and Drainer components to enable TiDB binlog? 2: If Pump and Drainer components are required, on which nodes should they be installed? Do I need to purchase at least 2 servers to deploy Pump and Drainer separately? Since it is a test environment, can I deploy Pump and Drainer on the tidb-server?
3: I need to synchronize TiDB data to big data doris. Should I enable binlog and deploy Pump and Drainer, or is it better to deploy TiCDC?

| username: ddhe9527 | Original post link

To enable binlog, you must first scale out the Pump component in the TiDB cluster; otherwise, it cannot be enabled. If you are only testing the functionality, you can deploy Pump and Drainer together on the TiDB-Server. TiDB-Binlog and TiCDC have overlapping functionalities, and the official recommendation is to use TiCDC.

| username: TiDBer_5GvAkLi0 | Original post link

Thank you very much for your guidance! Does it mean that instead of using binlog, it would be better to use TiCDC to synchronize TiDB data downstream? Since it’s a test environment and I don’t want to buy a server, should TiCDC be deployed on the TiDB server or on TiKV? It won’t have any impact on the cluster, right?

| username: ddhe9527 | Original post link

Well, it is now more recommended to use TiCDC for asynchronous replication. If you have to deploy in a mixed environment for testing purposes, and you have to choose between TiDB and TiKV, it is still advisable to place TiCDC and TiDB together as it has a smaller impact. After all, if the tidb-server is slow, it only affects itself, but if the tikv-server is slow, it could potentially slow down the entire TiKV cluster.

| username: TiDBer_5GvAkLi0 | Original post link

Sure! Thank you very much for your guidance.

| username: 箱子NvN | Original post link

1: Do I need to install both Pump and Drainer components to enable TiDB binlog?
Yes.
2: If I need to install Pump and Drainer, on which nodes should they be installed? Do I need to purchase at least 2 servers to deploy Pump and Drainer separately? Since it’s a test environment, can I deploy Pump and Drainer on the TiDB server?
Both options are possible. For example, if you only have one machine, you can install PD, TiDB, TiKV, Pump, and Drainer all together, but you need to ensure the performance is sufficient.
3: I need to synchronize TiDB data to big data Doris. Should I enable binlog and deploy Pump and Drainer, or is it better to deploy TiCDC?
The official recommendation is TiCDC because the new version of binlog has some performance limitations.

| username: TiDBer_5GvAkLi0 | Original post link

Thank you for the explanation! Thanks!

| username: system | Original post link

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