DM-worker Configuration File

This document introduces the configuration of DM worker, including a configuration file template and a description of each configuration parameter in this file.

Configuration file template

The following is a configuration file template of the DM-worker:

  1. # Worker Configuration.
  2. name = "worker1"
  3. # Log configuration.
  4. log-level = "info"
  5. log-file = "dm-worker.log"
  6. # DM-worker listen address.
  7. worker-addr = ":8262"
  8. advertise-addr = "127.0.0.1:8262"
  9. join = "http://127.0.0.1:8261,http://127.0.0.1:8361,http://127.0.0.1:8461"
  10. keepalive-ttl = 60
  11. relay-keepalive-ttl = 1800 # New in DM v2.0.2.
  12. # relay-dir = "relay_log" # New in 5.4.0. When you use a relative path, check the deployment and start method of DM-worker to determine the full path.
  13. ssl-ca = "/path/to/ca.pem"
  14. ssl-cert = "/path/to/cert.pem"
  15. ssl-key = "/path/to/key.pem"
  16. cert-allowed-cn = ["dm"]

Configuration parameters

Global

ParameterDescription
nameThe name of the DM-worker.
log-levelSpecifies a log level from debug, info, warn, error, and fatal. The default log level is info.
log-fileSpecifies the log file directory. If this parameter is not specified, the logs are printed onto the standard output.
worker-addrSpecifies the address of DM-worker which provides services. You can omit the IP address and specify the port number only, such as “:8262”.
advertise-addrSpecifies the address that DM-worker advertises to the outside world.
joinCorresponds to one or more master-addrs in the DM-master configuration file.
keepalive-ttlThe keepalive time (in seconds) of a DM-worker node to the DM-master node if the upstream data source of the DM-worker node does not enable the relay log. The default value is 60s.
relay-keepalive-ttlThe keepalive time (in seconds) of a DM-worker node to the DM-master node if the upstream data source of the DM-worker node enables the relay log. The default value is 1800s. This parameter is added since DM v2.0.2.
relay-dirWhen relay log is enabled in the bound upstream data source, DM-worker stores the relay log in this directory. This parameter is new in v5.4.0 and takes precedence over the configuration of the upstream data source.
ssl-caThe path of the file that contains list of trusted SSL CAs for DM-worker to connect with other components.
ssl-certThe path of the file that contains X509 certificate in PEM format for DM-worker to connect with other components.
ssl-keyThe path of the file that contains X509 key in PEM format for DM-worker to connect with other components.
cert-allowed-cnCommon Name list.