TiCDC Server Configurations
This document describes the CLI and configuration file parameters used in TiCDC.
cdc server CLI parameters
The following are descriptions of options available in a
cdc server command:
addr: The listening address of TiCDC, the HTTP API address, and the Prometheus address of the TiCDC service. The default value is
advertise-addr: The advertised address via which clients access TiCDC. If unspecified, the value is the same as that of
pd: A comma-separated list of PD endpoints.
config: The address of the configuration file that TiCDC uses (optional). This option is supported since TiCDC v5.0.0. This option can be used in the TiCDC deployment since TiUP v1.4.0. For detailed configuration description, see TiCDC Changefeed Configurations
data-dir: Specifies the directory that TiCDC uses when it needs to use disks to store files. The sort engine used by TiCDC and redo logs use this directory to store temporary files. It is recommended to ensure that the free disk space for this directory is greater than or equal to 500 GiB. If you are using TiUP, you can configure
cdc_serverssection, or directly use the default
gc-ttl: The TTL (Time To Live) of the service level
GC safepointin PD set by TiCDC, and the duration that the replication task can suspend, in seconds. The default value is
86400, which means 24 hours. Note: Suspending of the TiCDC replication task affects the progress of TiCDC GC safepoint, which means that it affects the progress of upstream TiDB GC, as detailed in Complete Behavior of TiCDC GC safepoint.
log-file: The path to which logs are output when the TiCDC process is running. If this parameter is not specified, logs are written to the standard output (stdout).
log-level: The log level when the TiCDC process is running. The default value is
ca: Specifies the path of the CA certificate file in PEM format for TLS connection (optional).
cert: Specifies the path of the certificate file in PEM format for TLS connection (optional).
cert-allowed-cn: Specifies the path of the common name in PEM format for TLS connection (optional).
key: Specifies the path of the private key file in PEM format for TLS connection (optional).
tz: Time zone used by the TiCDC service. TiCDC uses this time zone when it internally converts time data types such as
TIMESTAMPor when it replicates data to the downstream. The default is the local time zone in which the process runs. If you specify
tzat the time, the internal TiCDC processes use the time zone specified by
tz, and the sink uses the time zone specified by
time-zonefor replicating data to the downstream.
cluster-id: (optional) The ID of the TiCDC cluster. The default value is
cluster-idis the unique identifier of a TiCDC cluster. TiCDC nodes with the same
cluster-idbelong to the same cluster. The length of a
cluster-idis 128 characters at most.
cluster-idmust follow the pattern of
^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$and cannot be one of the following:
cdc server configuration file parameters
The following are configurations in the configuration file of
addr = "127.0.0.1:8300" advertise-addr = "" log-file = "" log-level = "info" data-dir = "" gc-ttl = 86400 # 24 h tz = "System" cluster-id = "default" [security] ca-path = "" cert-path = "" key-path = "" capture-session-ttl = 10 # 10s owner-flush-interval = 50000000 # 50 ms processor-flush-interval = 50000000 # 50 ms per-table-memory-quota = 10485760 # 10 MiB [log] error-output = "stderr" [log.file] max-size = 300 # 300 MiB max-days = 0 max-backups = 0 [sorter] num-concurrent-worker = 4 chunk-size-limit = 999 max-memory-percentage = 30 max-memory-consumption = 17179869184 num-workerpool-goroutine = 16 sort-dir = "/tmp/sorter" # [kv-client] # worker-concurrent = 8 # worker-pool-size = 0 # region-scan-limit = 40 # region-retry-duration = 60000000000
Was this page helpful?