Configuration | Tarantool
Документация на русском языке
поддерживается сообществом


Enterprise Edition

Tarantool Cluster Manager is a part of the Enterprise Edition.

This topic describes how to configure Tarantool Cluster Manager. For the complete list of TCM configuration parameters, see the TCM configuration reference.

Tarantool Cluster Manager configuration is a set of parameters that define various aspects of TCM functioning. Parameters are grouped by the particular aspect that they affect. There are the following groups:

  • HTTP
  • logging
  • configuration storage
  • security
  • add-ons
  • limits
  • TCM running mode

Parameter groups can be nested. For example, in the http group there are tls and websession-cookie groups, which define TLS encryption and cookie settings.

Parameter names are the full paths from the top-level group to the specific parameter. For example:

  • is the host parameter that is defined directly in the http group.
  • http.tls.enabled is the enabled parameter that is defined in the tls nested group within http.

There are three ways to pass TCM configuration parameters:

  • a YAML file
  • environment variables
  • command-line options of the TCM executable

TCM configuration can be stored in a YAML file. Its structure must reflect the configuration parameters hierarchy.

The example below shows a fragment of a TCM configuration file:

# a fragment of a YAML configuration file
cluster: # top-level group
    on-air-limit: 4096
    connection-rate-limit: 512
    tarantool-timeout: 10s
    tarantool-ping-timeout: 5s
http: # top-level group
    basic-auth: # nested group
        enabled: false
    network: tcp
    port: 8080
    request-size: 1572864
    websocket: # nested group
        read-buffer-size: 16384
        write-buffer-size: 16384
        keepalive-ping-interval: 20s
        handshake-timeout: 10s
        init-timeout: 15s

To start TCM with a YAML configuration, pass the location of the configuration file in the -c command-line option:

tcm -c=config.yml

TCM can take values of its configuration parameters from environment variables. The variable names start with TCM_. Then goes the full path to the parameter, converted to upper case. All delimiters are replaced with underscores (_). Examples:

  • TCM_HTTP_HOST is a variable for the parameter.
  • TCM_HTTP_WEBSESSION_COOKIE_NAME is a variable for the parameter.

The example below shows how to start TCM with configuration parameters passed in environment variables:

export TCM_HTTP_PORT=8888

The TCM executable has -- command-line options for each configuration parameter. Their names reflect the full path to the parameter, with all delimiters replaced by hyphens (-). Examples:

  • --http-host is an option for
  • --http-websession-cookie-name is an option for

The example below shows how to start TCM with configuration parameters passed in command-line options:

./tcm --storage.etcd.embed.enabled --addon.enabled --http.port=8888

TCM configuration options are applied from multiple sources with the following precedence, from highest to lowest:

  1. tcm executable arguments.
  2. TCM_* environment variables.
  3. Configuration from a YAML file.

If the same option is defined in two or more locations, the option with the highest precedence is applied. For options that aren’t defined in any location, the default values are used.

You can combine different ways of TCM configuration for efficient management of multiple TCM installations:

  • A single YAML file for all installations can contain the common configuration parts. For example, a single configuration storage that is used for all installations, or TLS settings.
  • Environment variables that set specific parameters for each server, such as local directories and paths.
  • Command-line options for parameters that must be unique for different TCM instances running on a single server. For example, http.port.

TCM configuration parameters have the Go language types. Note that this is different from the Tarantool configuration parameters, which have Lua types.

Most options have the Go’s basic types: int and other numeric types, bool, string.

        enabled: false # bool
    network: tcp # string
    host: # string
    port: 8080 # int
    request-size: 1572864 # int64

Parameters that can take multiple values are arrays. In YAML, they are passed as YAML arrays: each item on a new line, starting with a dash.

provider: etcd
    endpoints: # array
        - # item 1
        - # item 2


In environment variables and command line options, such arrays are passed as semicolon-separated strings of items.

Parameters that set timeouts, TTLs, and other duration values, have the Go’s time.Duration type. Their values can be passed in time-formatted strings such as 4h30m25s.

    tarantool-timeout: 10s # duration
    tarantool-ping-timeout: 5s # duration

Finally, there are parameters whose values are constants defined in Go packages. For example, http.websession-cookie.same-site values are constants from the Go’s http.SameSite type. To find out the exact values available for such parameters, refer to the Go packages documentation.

        same-site: SameSiteStrictMode

You can create a YAML configuration template for TCM with all parameters and their default values using the generate-config option of the tcm executable.

To write a default TCM configuration to the tcm.example.yml file, run:

tcm generate-config > tcm.example.yml.
Нашли ответ на свой вопрос?
Обратная связь