Is TiCDC a raft learner? Can it achieve the same P99 latency of under 100 milliseconds for data synchronization as TiFlash?

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

Original topic: TiCDC是不是raft learner?能不能和TiFlash的数据同步一样达到百毫秒P99延迟的效果?

| username: MischaZhang

【TiDB Usage Environment】Production + Test Environment + POC
【TiDB Version】5.4.0
【Encountered Problem】
I found that the lag of TiCDC is generally at the second level, with the fastest being around 900ms; however, according to PingCAP’s article, TiFlash has very low data synchronization latency.
“1. With high-pressure writes and simultaneous queries, by sampling 5000 TiFlash Region replicas: during reads, the average time for consistency check + catch-up + write is 27.31 milliseconds, the 95th percentile is 73 milliseconds, and the 99th percentile is 609 milliseconds. For analytical queries, this latency stability is acceptable.”

I think TiCDC is an etcd learner, and it should have the potential to achieve the same data synchronization latency as TiFlash, which synchronizes data through raft learner. So, what’s the difference? Is it just the data sorting in CDC?

Does TiCDC periodically pull TiKV’s change log? Where in the code is this batch written? I want to modify the interval to make the program pull more frequently.

| username: ddhe9527 | Original post link

It’s not a Raft learner; it’s achieved by consuming the TiKV’s KV change log for data synchronization.

| username: alfred | Original post link

Unlike Raft learner, it’s similar to MySQL’s asynchronous replication.

| username: MischaZhang | Original post link

Is TiCDC periodically pulling the change log from TiKV? Where in the code is this batch written? I want to shorten the interval to make the program pull more frequently.

| username: ddhe9527 | Original post link

You can try increasing the worker-count and decreasing the max-txn-row to see the effect.

| username: MischaZhang | Original post link

Finally: TiKV nodes have configurations that can change the push frequency.

| username: system | Original post link

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