Skip to content
/ ticdc Public
forked from pingcap/ticdc

TiGate pulls change logs out of TiDB and pushes to kinds of systems.

Notifications You must be signed in to change notification settings

wk989898/ticdc

 
 

Repository files navigation

TiCDC

TiCDC pulls change logs from TiDB clusters and pushes them to downstream systems, such as MySQL, TiDB, Kafka, Pulsar, and Object Storages (e.g., S3). Beginning from v9.0, we use this repository to build TiCDC instead of the old repository tiflow. The new TiCDC in this repository has undergone a complete architectural redesign while retaining the same user interface. The architectural upgrade primarily aims to address certain drawbacks of TiCDC and propel it forward.

  • Better scalability. E.g. support over 1 million tables.
  • More efficiency. Use less machine resource to support large volume.
  • Better maintainability. E.g. simpler and human readable code, clear code module, and open to extensions.
  • Cloud native architecture. We want to design a new architecture from the ground to support the cloud.

Quick Start

Find the latest tag

Go to pingcap/ticdc/tags to find the latest tag, e.g. v9.0.0-alpha

Download the patch binary

Patch to the existing TiCDC nodes

Examples:

# Scale out some old version TiCDC nodes, if you don't already have some
tiup cluster scale-out test_cluster scale-out.yml

#scale-out.yml
#cdc_servers:
#  - host: 172.31.10.1

# Patch the new arch TiCDC to the cluster
tiup cluster patch --overwrite test_cluster cdc-v9.0.0-alpha-nightly-linux-amd64.tar.gz -R cdc

# Enable the new architectural TiCDC by setting the "newarch" parameter
tiup cluster edit-config test_cluster
#cdc_servers:
# ...
# config:
#    newarch: true

tiup cluster reload test_cluster -R cdc

Import the new dashboard to grafana to monitor your workloads

Download ticdc_new_arch.json, and use the import button.

How to compile TiCDC from source code

Prerequests

TiCDC can be built on the following operating systems:

  • Linux
  • MacOS

Install GoLang 1.23.2

# Linux
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz

# MacOS
curl -O https://go.dev/dl/go1.23.2.darwin-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.2.darwin-amd64.tar.gz


export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

Download the source code and compile

  1. Download the code
git clone [email protected]:pingcap/ticdc.git
cd ticdc
  1. Build TiCDC
make cdc

# Generate the patchable tar file
cd bin
tar -czf newarch_cdc.tar.gz cdc

About

TiGate pulls change logs out of TiDB and pushes to kinds of systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 82.9%
  • Shell 14.8%
  • Python 1.2%
  • Other 1.1%