TiDB single drainer architecture is creating a single point of failure

We’re trying to create Master-Master replication between two TiDB clusters. Each cluster has 3 PD server, 4 KV servers and 2 TiDB server. TiDB is running with binlog enabled. On TiDB servers we have also installed pump. Now we came to installing drainer and we’re seeing the following issues:

  • If we deploy multiple drainers on same TiDB servers configured to sync data to remote TiDB cluster - we’re getting duplicated entries in remote TiDB. Each drainer is sending inserts separately, so for each inserted record on source cluster we get 2 records on destination cluster
  • If we deploy single drainer on separate server allocated specifically for it, we’re creating single point of failure. If something happens to this server - data won’t be synced. Additionally, we couldn’t find any infromation about design of pump cluster. As we know, pump is saving all transactions for gc days, and minimum what is possible to set is 1 day.
  • If we have 2 TiDB servers and each of them is running pump - does each pump saves same full data? Or is it sharded? Does it have replicas if it’s sharded? If we lose one of TiDB servers (with pump running on it) - do we lose part of pump data?

@freeernest do you asking for how to deploy a TiDB cluster, or trying to do bugfix/customization on the general deployment logic?

Be aware of that this is not a support forum. Questions or requests for support using TiDB should be redirected to the user forum .