Configuration reference
This topic describes all configuration parameters provided by Tarantool.
Most of the configuration options described in this reference can be applied to a specific instance, replica set, group, or to all instances globally. To do so, you need to define the required option at the specified level.
Using Tarantool as an application server, you can run your own Lua
applications. In the app section, you can load the application and
provide an application configuration in the app.cfg section.
A configuration of the application loaded using app.file or
app.module.
Example
In the example below, the application is loaded from the myapp.lua
file placed next to the YAML configuration file:
app:file: 'myapp.lua'cfg:greeting: 'Hello'
Example on GitHub: application
Type: map
Default: nil
Environment variable: TT_APP_CFG
A path to a Lua file to load an application from.
Type: string
Default: nil
Environment variable: TT_APP_FILE
A Lua module to load an application from.
Example
The app section can be placed in any
configuration scope. As an example use case, you
can provide different applications for storages and routers in a sharded
cluster:
groups:storages:app:module: storage# ...routers:app:module: router# ...
Type: string
Default: nil
Environment variable: TT_APP_MODULE
The audit_log section defines configuration parameters related to
audit logging.
- audit_log.extract_key
- audit_log.file
- audit_log.filter
- audit_log.format
- audit_log.nonblock
- audit_log.pipe
- audit_log.spaces
- audit_log.to
- audit_log.syslog.*
If set to true, the audit subsystem extracts and prints only the
primary key instead of full tuples in DML events (space_insert,
space_replace, space_delete). Otherwise, full tuples are logged. The
option may be useful in case tuples are big.
Type: boolean
Default: false
Environment variable: TT_AUDIT_LOG_EXTRACT_KEY
Specify a file for the audit log destination. You can set the file
type using the audit_log.to option.
If you write logs to a file, Tarantool reopens the audit log at
SIGHUP.
Type: string
Default: 'var/log/{{ instance_name }}/audit.log'
Environment variable: TT_AUDIT_LOG_FILE
Enable logging for a specified subset of audit events. This option accepts the following values:
- Event names (for example,
password_change). For details, see Audit log events. - Event groups (for example,
audit). For details, see Event groups.
The option contains either one value from Possible values section (see
below) or a combination of them.
To enable custom audit log events, specify the
custom value in this option.
Example
filter: [ user_create,data_operations,ddl,custom ]format: jsonspaces: [ bands ]extract_key: truegroups:group001:replicasets:replicaset001:instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'
Type: array
Possible values: 'all', 'audit', 'auth', 'priv', 'ddl',
'dml', 'data_operations', 'compatibility', 'audit_enable',
'auth_ok', 'auth_fail', 'disconnect', 'user_create',
'user_drop', 'role_create', 'role_drop', 'user_disable',
'user_enable', 'user_grant_rights', 'role_grant_rights',
'role_revoke_rights', 'password_change', 'access_denied',
'eval', 'call', 'space_select', 'space_create',
'space_alter', 'space_drop', 'space_insert', 'space_replace',
'space_delete', 'custom'
Default: 'nil'
Environment variable: TT_AUDIT_LOG_FILTER
Specify a format that is used for the audit log.
Example
If you set the option to plain,
audit_log:to: fileformat: plain
the output in the file might look as follows:
2024-01-17T00:12:27.155+03004b5a2624-28e5-4b08-83c7-035a0c5a1db9INFO remote:unix/:(socket)session_type:consolemodule:tarantooluser:admintype:space_createtag:description:Create space Bands
Type: string
Possible values: 'json', 'csv', 'plain'
Default: 'json'
Environment variable: TT_AUDIT_LOG_FORMAT
Specify the logging behavior if the system is not ready to write. If set
to true, Tarantool does not block during logging if the system is
non-writable and writes a message instead. Using this value may improve
logging performance at the cost of losing some log messages.
Type: boolean
Default: false
Environment variable: TT_AUDIT_LOG_NONBLOCK
Specify a pipe for the audit log destination. You can set the pipe
type using the audit_log.to option.
If log is a program, its pid is stored in the audit.pid field. You
need to send it a signal to rotate logs.
Example
This starts the cronolog program
when the server starts and sends all audit_log messages to cronolog
standard input (stdin).
audit_log:to: pipepipe: 'cronolog audit_tarantool.log'
Type: string
Default: box.NULL
Environment variable: TT_AUDIT_LOG_PIPE
The array of space names for which data operation events
(space_select, space_insert, space_replace, space_delete) should
be logged. The array accepts string values. If set to
box.NULL, the data operation events are logged for all
spaces.
Example
In the example, only the events of bands and singers spaces are
logged:
audit_log:spaces: [bands, singers]
Type: array
Default: box.NULL
Environment variable: TT_AUDIT_LOG_SPACES
Enable audit logging and define the log location. This option accepts the following values:
devnull: disable audit logging.file: write audit logs to a file (see audit_log.file).pipe: start a program and write audit logs to it (see audit_log.pipe).syslog: write audit logs to a system logger (see audit_log.syslog.*).
By default, audit logging is disabled.
Example
The basic audit log configuration might look as follows:
audit_log:to: filefile: 'audit_tarantool.log'filter: [ user_create,data_operations,ddl,custom ]format: jsonspaces: [ bands ]extract_key: true
Type: string
Possible values: 'devnull', 'file', 'pipe', 'syslog'
Default: 'devnull'
Environment variable: TT_AUDIT_LOG_TO
Specify a system logger keyword that tells syslogd where to send the message. You can enable logging to a system logger using the audit_log.to option.
See also: syslog configuration example
Type: string
Possible values: auth, authpriv, cron, daemon, ftp, kern, lpr, mail, news, security,
syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7
Default: 'local7'
Environment variable: TT_AUDIT_LOG_SYSLOG_FACILITY
Specify an application name to show in logs. You can enable logging to a system logger using the audit_log.to option.
See also: syslog configuration example
Type: string
Default: 'tarantool'
Environment variable: TT_AUDIT_LOG_SYSLOG_IDENTITY
Set a location for the syslog server. It can be a Unix socket path
starting with unix: or an ipv4 port number. You can enable logging
to a system logger using the
audit_log.to option.
Example
/code_snippets/snippets/config/instances.enabled/audit_log_syslog/config.yaml
- audit_log.syslog.server – a syslog server location.
- audit_log.syslog.facility – a system logger keyword that tells syslogd where to send the message. The default value is
local7. - audit_log.syslog.identity – an application name to show in logs. The default value is
tarantool.
These options are interpreted as a message for the syslogd program, which runs in the background of any Unix-like platform.
An example of a Tarantool audit log entry in the syslog:
09:32:52 tarantool_audit: {"time": "2024-02-08T09:32:52.190+0300", "uuid": "94454e46-9a0e-493a-bb9f-d59e44a43581", "severity": "INFO", "remote": "unix/:(socket)", "session_type": "console", "module": "tarantool", "user": "admin", "type": "space_create", "tag": "", "description": "Create space bands"}
Type: string
Default: box.NULL
Environment variable: TT_AUDIT_LOG_SYSLOG_SERVER
The compat section defines values of the compat
module options.
- compat.binary_data_decoding
- compat.box_cfg_replication_sync_timeout
- compat.box_error_serialize_verbose
- compat.box_error_unpack_type_and_code
- compat.box_info_cluster_meaning
- compat.box_session_push_deprecation
- compat.box_space_execute_priv
- compat.box_space_max
- compat.box_tuple_extension
- compat.box_tuple_new_vararg
- compat.c_func_iproto_multireturn
- compat.fiber_channel_close_mode
- compat.fiber_slice_default
- compat.json_escape_forward_slash
- compat.sql_priv
- compat.sql_seq_scan_default
- compat.yaml_pretty_multiline
Define how to store binary data fields in Lua after decoding:
new: as varbinary objectsold: as plain strings
See also: compat-option-binary-decoding
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BINARY_DATA_DECODING
Set a default replication sync timeout:
new: 0old: 300 seconds
See also: compat-option-replication-timeout
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_CFG_REPLICATION_SYNC_TIMEOUT
Since: 3.1.0
Set the verbosity of error objects serialization:
new: serialize the error message together with other potentially useful fieldsold: serialize only the error message
Type: string
Possible values: 'new', 'old'
Default: 'old'
Environment variable: TT_COMPAT_BOX_ERROR_SERIALIZE_VERBOSE
Since: 3.1.0
Whether to show error fields in box.error.unpack():
new: do not showbase_typeandcustom_typefields; do not show thecodefield if it is 0. Note thatbase_typeis still accessible for an error object.old: show all fields
Type: string
Possible values: 'new', 'old'
Default: 'old'
Environment variable: TT_COMPAT_BOX_ERROR_UNPACK_TYPE_AND_CODE
Define the behavior of box.info.cluster:
new: show the entire clusterold:: show the current replica set
See also: compat-option-box-info-cluster
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_INFO_CLUSTER_MEANING
Whether to raise errors on attempts to call the deprecated function
box.session.push:
new: raise an errorold: do not raise an error
See also: compat-option-session-push-deprecation
Type: string
Possible values: 'new', 'old'
Default: 'old'
Environment variable: TT_COMPAT_BOX_SESSION_PUSH_DEPRECATION
Whether the execute privilege can be granted on spaces:
new: an error is raisedold: the privilege can be granted with no actual effect
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_SPACE_EXECUTE_PRIV
Set the maximum space identifier (box.schema.SPACE_MAX):
new: 2147483646old: 2147483647
The limit was decremented because the old max value is used as an error
indicator in the box C API.
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_SPACE_MAX
Controls IPROTO_FEATURE_CALL_RET_TUPLE_EXTENSION and
IPROTO_FEATURE_CALL_ARG_TUPLE_EXTENSION feature bits that define tuple
encoding in iproto call and eval requests.
new: tuples with formats are encoded asMP_TUPLEold: tuples with formats are encoded asMP_ARRAY
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_TUPLE_EXTENSION
Controls how box.tuple.new interprets an argument list:
new: as a value with a tuple formatold: as an array of tuple fields
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_BOX_TUPLE_NEW_VARARG
Controls wrapping of multiple results of a stored C function when returning them via iproto:
new: return without wrapping (consistently with a local call viabox.func)old: wrap results into a MessagePack array
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_C_FUNC_IPROTO_MULTIRETURN
Define the behavior of fiber channels after closing:
new: mark the channel read-onlyold: destroy the channel object
See also: compat-option-fiber-channel
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_FIBER_CHANNEL_CLOSE_MODE
Define the maximum fiber execution time without a yield:
new:{warn = 0.5, err = 1.0}old: infinity (no warnings or errors raised).
See also: compat-option-fiber-slice
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_FIBER_SLICE_DEFAULT
Whether to escape the forward slash symbol '/' using a backslash in a
json.encode() result:
new: do not escape the forward slashold: escape the forward slash
See also: compat-option-json-slash
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_JSON_ESCAPE_FORWARD_SLASH
Whether to enable access checks for SQL requests over iproto:
new: check the user's access permissionsold: allow any user to execute SQL over iproto
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_SQL_PRIV
Controls the default value of the sql_seq_scan session setting:
new: falseold: true
See also: compat-option-sql-scan
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_SQL_SEQ_SCAN_DEFAULT
Whether to encode in block scalar style all multiline strings or ones
containing the \n\n substring:
new: all multiline stringsold: only strings containing the\n\nsubstring
See also: compat-option-lyaml
Type: string
Possible values: 'new', 'old'
Default: 'new'
Environment variable: TT_COMPAT_YAML_PRETTY_MULTILINE
The conditional section defines the configuration parts that apply to
instances that meet certain conditions.
Specify a conditional section of the configuration. The configuration
options defined inside a conditional.if section apply only to
instances on which the specified condition is true.
Conditions can include one variable – tarantool_version: a
three-number Tarantool version running on the instance, for example,
3.1.0. It compares to version literal values that include three
numbers separated by periods (x.y.z).
The following operators are available in conditions:
- comparison:
>,<,>=,<=,==,!= - logical operators
||(OR) and&&(AND) - parentheses
()
Example:
In this example, different configuration parts apply to instances running Tarantool versions above and below 3.1.0:
- On versions less than 3.1.0, the
upgradedlabel is set tofalse. - On versions 3.1.0 or newer, the
upgradedlabel is set totrue. Additionally, newcompatoptions are defined. These options were introduced in version 3.1.0, so on older versions they would cause an error.
conditional:- if: tarantool_version < 3.1.0labels:upgraded: 'false'- if: tarantool_version >= 3.1.0labels:upgraded: 'true'compat:box_error_serialize_verbose: 'new'box_error_unpack_type_and_code: 'new'
See also: configuration_conditional
The config section defines various parameters related to centralized
configuration.
Specify how the configuration is reloaded. This option accepts the following values:
auto: configuration is reloaded automatically when it is changed.manual: configuration should be reloaded manually. In this case, you can reload the configuration in the application code using config:reload().
See also: Reloading configuration
Type: string
Possible values: 'auto', 'manual'
Default: 'auto'
Environment variable: TT_CONFIG_RELOAD
This section describes options related to loading configuration settings from external storage such as external files or environment variables.
Specify how to load settings from external storage. For example, this option can be used to load passwords from safe storage. You can find examples in the configuration_credentials_loading_secrets section.
Type: map
Default: nil
Environment variable: TT_CONFIG_CONTEXT
The name of an entity that identifies a configuration value to load.
The name of an environment variable to load a configuration value from.
To load a configuration value from an environment variable, set
config.context.env.
Example
In this example, passwords are loaded from the DBADMIN_PASSWORD and
SAMPLEUSER_PASSWORD environment variables:
config:context:dbadmin_password:from: envenv: DBADMIN_PASSWORDsampleuser_password:from: envenv: SAMPLEUSER_PASSWORD
See also: [configuration_credentials_loading_secrets](../../platform/connections_and_auth/credentials#configuration_credentials_loading_secrets {params[]}
)
(Optional) Whether to strip whitespace characters and newlines from the end of data.
This section describes options related to providing connection settings
to a centralized etcd-based storage. If
replication.failover is set to supervised, Tarantool also uses etcd to maintain the state of failover coordinators.
- config.etcd.endpoints
- config.etcd.prefix
- config.etcd.username
- config.etcd.password
- config.etcd.ssl.ca_file
- config.etcd.ssl.ca_path
- config.etcd.ssl.ssl_cert
- config.etcd.ssl.ssl_key
- config.etcd.ssl.verify_host
- config.etcd.ssl.verify_peer
- config.etcd.http.request.timeout
- config.etcd.http.request.unix_socket
- config.etcd.watchers.reconnect_max_attempts
- config.etcd.watchers.reconnect_timeout
The list of endpoints used to access an etcd server.
See also: etcd_local_configuration
Type: array
Default: nil
Environment variable: TT_CONFIG_ETCD_ENDPOINTS
A key prefix used to search a configuration on an etcd server. Tarantool
searches keys by the following path: <prefix>/config/*. Note that
<prefix> should start with a slash (/).
See also: etcd_local_configuration
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_PREFIX
A username used for authentication.
See also: etcd_local_configuration
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_USERNAME
A password used for authentication.
See also: etcd_local_configuration
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_PASSWORD
A path to a trusted certificate authorities (CA) file.
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_CA_FILE
A path to a directory holding certificates to verify the peer with.
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_CA_PATH
Since: 3.2.0
A path to an SSL certificate file.
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_SSL_CERT
A path to a private SSL key file.
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_SSL_KEY
Enable verification of the certificate's name (CN) against the specified host.
Type: boolean
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_HOST
Enable verification of the peer's SSL certificate.
Type: boolean
Default: nil
Environment variable: TT_CONFIG_ETCD_SSL_VERIFY_PEER
A time period required to process an HTTP request to an etcd server: from sending a request to receiving a response.
See also: etcd_local_configuration
Type: number
Default: nil
Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_TIMEOUT
A Unix domain socket used to connect to an etcd server.
Type: string
Default: nil
Environment variable: TT_CONFIG_ETCD_HTTP_REQUEST_UNIX_SOCKET
Since: 3.1.0
The maximum number of attempts to reconnect to an etcd server in case of connection failure.
Type: integer
Default: nil
Environment variable: TT_CONFIG_ETCD_WATCHERS_RECONNECT_MAX_ATTEMPTS
Since: 3.1.0
The timeout (in seconds) between attempts to reconnect to an etcd server in case of connection failure.
Type: number
Default: nil
Environment variable: TT_CONFIG_ETCD_WATCHERS_RECONNECT_TIMEOUT
This section describes options related to providing connection settings to a centralized Tarantool-based storage.
- config.storage.endpoints
- config.storage.prefix
- config.storage.reconnect_after
- config.storage.timeout
An array of endpoints used to access a configuration storage. Each endpoint can include the following fields:
uri: a URI of the configuration storage's instance.login: a username used to connect to the instance.password: a password used for authentication.params: SSL parameters required for encrypted connections ((uri.params.* )).
See also: centralized_configuration_storage_connect_tarantool
Type: array
Default: nil
Environment variable: TT_CONFIG_STORAGE_ENDPOINTS
A key prefix used to search a configuration in a centralized
configuration storage. Tarantool searches keys by the following path:
<prefix>/config/*. Note that <prefix> should start with a slash
(/).
See also: centralized_configuration_storage_connect_tarantool
Type: string
Default: nil
Environment variable: TT_CONFIG_STORAGE_PREFIX
A number of seconds to wait before reconnecting to a configuration storage.
Type: number
Default: 3
Environment variable: TT_CONFIG_STORAGE_RECONNECT_AFTER
The interval (in seconds) to perform the status check of a configuration storage.
See also: centralized_configuration_storage_connect_tarantool
Type: number
Default: 3
Environment variable: TT_CONFIG_STORAGE_TIMEOUT
Configure the administrative console. A client to the console is
tt connect.
Whether to listen on the Unix socket provided in the console.socket option.
If the option is set to false, the administrative console is disabled.
Type: boolean
Default: true
Environment variable: TT_CONSOLE_ENABLED
The Unix socket for the administrative console.
Mind the following nuances:
- Only a Unix domain socket is allowed. A TCP socket can't be configured this way.
console.socketis a file path, without anyunix:orunix/:prefixes.- If the file path is a relative path, it is interpreted relative to process.work_dir.
Type: string
Default: 'var/run/{{ instance_name }}/tarantool.control'
Environment variable: TT_CONSOLE_SOCKET
The credentials section allows you to create users and grant them the
specified privileges. Learn more in
configuration_credentials.
- credentials.roles.*
- credentials.users.*
- (user_or_role_name.privileges.* )
An array of roles that can be granted to users or other roles.
Example
In the example below, the writers_space_reader role gets privileges to
select data in the writers space:
roles:writers_space_reader:privileges:- permissions: [ read ]spaces: [ writers ]
See also: configuration_credentials_managing_users_roles
Type: map
Default: nil
Environment variable: TT_CREDENTIALS_ROLES
An array of roles granted to this role.
An array of privileges granted to this role.
See <user_or_role_name>.privileges.*.
An array of users.
Example
In this example, sampleuser gets the following privileges:
- Privileges granted to the
writers_space_readerrole. - Privileges to select and modify data in the
booksspace.
sampleuser:password: '123456'roles: [ writers_space_reader ]privileges:- permissions: [ read, write ]spaces: [ books ]
See also: configuration_credentials_managing_users_roles
Type: map
Default: nil
Environment variable: TT_CREDENTIALS_USERS
A user's password.
Example
In the example below, a password for the dbadmin user is set:
credentials:users:dbadmin:password: 'T0p_Secret_P@$$w0rd'
See also: configuration_credentials_loading_secrets
An array of roles granted to this user.
An array of privileges granted to this user.
See <user_or_role_name>.privileges.*.
Privileges that can be granted to a user or role using the following options:
Permissions assigned to this user or a user with this role.
Example
In this example, sampleuser gets privileges to select and modify data
in the books space:
sampleuser:password: '123456'roles: [ writers_space_reader ]privileges:- permissions: [ read, write ]spaces: [ books ]
See also: configuration_credentials_managing_users_roles
Spaces to which this user or a user with this role gets the specified permissions.
Example
In this example, sampleuser gets privileges to select and modify data
in the books space:
sampleuser:password: '123456'roles: [ writers_space_reader ]privileges:- permissions: [ read, write ]spaces: [ books ]
See also: configuration_credentials_managing_users_roles
Functions to which this user or a user with this role gets the specified permissions.
Sequences to which this user or a user with this role gets the specified permissions.
Whether this user or a user with this role can execute arbitrary Lua code.
A list of global user-defined Lua functions that this user or a user
with this role can call. To allow calling a specific function, specify
its name as the value. To allow calling all global Lua functions except
built-in ones functions, specify the all value.
This option should be configured together with the execute
permission.
Since version 3.3.0,
the lua_call option allows granting users privileges to call specified
lua function on the instance in runtime (thus it doesn't require an
ability to write to the database).
Example to grant custom functions to the 'alice' user:
credentials:users:alice:privileges:- permissions: [execute]lua_call: [my_func, my_func2]
Whether this user or a user with this role can execute an arbitrary SQL expression.
The database section defines database-specific configuration
parameters, such as an instance's read-write mode or transaction
isolation level.
- database.hot_standby
- database.instance_uuid
- database.mode
- database.replicaset_uuid
- database.txn_isolation
- database.txn_timeout
- database.use_mvcc_engine
Whether to start the server in the hot standby mode. This mode can be used to provide failover without replication.
Suppose there are two cluster applications. Each cluster has one instance with the same configuration:
groups:group001:replicasets:replicaset001:instances:instance001:database:hot_standby: truewal:dir: /tmp/walssnapshot:dir: /tmp/snapshotsiproto:listen:- uri: '127.0.0.1:3301'
In particular, both instances use the same directory for storing write-ahead logs and snapshots.
When you start both cluster applications on the same machine, the instance from the first one will be the primary instance and the second will be the standby instance. In the logs of the second cluster instance, you should see a notification:
main/104/interactive I> Entering hot standby mode
This means that the standby instance is ready to take over if the primary instance goes down. The standby instance initializes and tries to take a lock on a directory for storing write-ahead logs but fails because the primary instance has made a lock on this directory.
If the primary instance goes down for any reason, the lock is released. In this case, the standby instance succeeds in taking the lock and becomes the primary instance.
database.hot_standby has no effect:
- If wal.mode is set to
none. - If
wal.dir_rescan_delay
is set to a large value on macOS or FreeBSD. On these platforms, the
hot standby mode is designed so that the loop repeats every
wal.dir_rescan_delayseconds. - For spaces created with engine set to
vinyl.
Examples on GitHub: hot_standby_1, hot_standby_2
Type: boolean
Default: false
Environment variable: TT_DATABASE_HOT_STANDBY
An instance UUID.
By default, instance UUIDs are generated automatically.
database.instance_uuid can be used to specify an instance identifier
manually.
UUIDs should follow these rules:
- The values must be true unique identifiers, not shared by other instances or replica sets within the common infrastructure.
- The values must be used consistently, not changed after the initial setup. The initial values are stored in snapshot files and are checked whenever the system is restarted.
- The values must comply with RFC 4122. The nil UUID is not allowed.
See also: database.replicaset_uuid
Type: string
Default: box.NULL
Environment variable: TT_DATABASE_INSTANCE_UUID
An instance's operating mode. This option is in effect if replication.failover is set to off.
The following modes are available:
rw: an instance is in read-write mode.ro: an instance is in read-only mode.
If not specified explicitly, the default value depends on the number of
instances in a replica set. For a single instance, the rw mode is
used, while for multiple instances, the ro mode is used.
Example
You can set the database.mode option to rw on all instances in a
replica set to make a master-master configuration.
In this case, replication.failover should be set to off.
replication:failover: off
groups:group001:replicasets:replicaset001:instances:instance001:database:mode: rwiproto:listen:- uri: '127.0.0.1:3301'instance002:database:mode: rwiproto:listen:- uri: '127.0.0.1:3302'
credentials:users:replicator:password: 'topsecret'roles: [replication]
iproto:advertise:peer:login: replicator
instance001:database:mode: rwiproto:listen:- uri: '127.0.0.1:3301'instance002:database:mode: rwiproto:listen:- uri: '127.0.0.1:3302'
Type: string
Default: box.NULL (the actual default value depends on the
number of instances in a replica set)
Environment variable: TT_DATABASE_MODE
By default, replica set UUIDs are generated automatically.
database.replicaset_uuid can be used to specify a replica set
identifier manually.
See also: database.instance_uuid
Type: string
Default: box.NULL
Environment variable: TT_DATABASE_REPLICASET_UUID
A transaction isolation level.
Type: string
Default: best-effort
Possible values: best-effort`, `read-committed`, `read-confirmed
Environment variable: TT_DATABASE_TXN_ISOLATION
A timeout (in seconds) after which the transaction is rolled back.
See also: box.begin()
Type: number
Default: 3153600000 (\~100 years)
Environment variable: TT_DATABASE_TXN_TIMEOUT
Whether the transactional manager is enabled.
Type: boolean
Default: false
Environment variable: TT_DATABASE_USE_MVCC_ENGINE
The failover section defines parameters related to a
supervised failover.
- failover.log.to
- failover.log.file
- failover.call_timeout
- failover.connect_timeout
- failover.lease_interval
- failover.probe_interval
- failover.renew_interval
- failover.stateboard.*
Since: 3.3.0
Define a location Tarantool sends failover logs to. This option accepts the following values:
stderr: write logs to the standard error stream.file: write logs to a file (see failover.log.file).
Type: string
Default: 'stderr'
Environment variable: TT_FAILOVER_LOG_TO
Since: 3.3.0
Specify a file for failover logs destination. To write logs to a file,
set failover.log.to to
file. Otherwise, failover.log.file is ignored.
Example
The example below shows how to write failover logs to a file placed in the specified directory:
failover:log:to: filefile: var/log/failover.log
Type: string
Default: nil
Environment variable: TT_FAILOVER_LOG_FILE
Since: 3.1.0
A call timeout (in seconds) for monitoring and failover requests to an instance.
Type: number
Default: 1
Environment variable: TT_FAILOVER_CALL_TIMEOUT
Since: 3.1.0
A connection timeout (in seconds) for monitoring and failover requests to an instance.
Type: number
Default: 1
Environment variable: TT_FAILOVER_CONNECT_TIMEOUT
Since: 3.1.0
A time interval (in seconds) that specifies how long an instance should be a leader without renew requests from a coordinator. When this interval expires, the leader switches to read-only mode. This action is performed by the instance itself and works even if there is no connectivity between the instance and the coordinator.
Type: number
Default: 30
Environment variable: TT_FAILOVER_LEASE_INTERVAL
Since: 3.1.0
A time interval (in seconds) that specifies how often a monitoring service of the failover coordinator polls an instance for its status.
Type: number
Default: 10
Environment variable: TT_FAILOVER_PROBE_INTERVAL
Since: 3.1.0
A time interval (in seconds) that specifies how often a failover coordinator sends read-write deadline renewals.
Type: number
Default: 10
Environment variable: TT_FAILOVER_RENEW_INTERVAL
failover.stateboard.* options define configuration parameters related
to maintaining the state of failover coordinators in a remote etcd-based
storage.
See also: supervised_failover_overview_fault_tolerance
Since: 3.1.0
A time interval (in seconds) that specifies how long a transient state information is stored and how quickly a lock expires.
Type: number
Default: 10
Environment variable: TT_FAILOVER_STATEBOARD_KEEPALIVE_INTERVAL
Since: 3.1.0
A time interval (in seconds) that specifies how often a failover coordinator writes its state information to etcd. This option also determines the frequency at which an active coordinator reads new commands from etcd.
Type: number
Default: 2
Environment variable: TT_FAILOVER_STATEBOARD_RENEW_INTERVAL
The feedback section describes configuration parameters for sending
information about a running Tarantool instance to the specified feedback
server.
- feedback.crashinfo
- feedback.enabled
- feedback.host
- feedback.interval
- feedback.metrics_collect_interval
- feedback.metrics_limit
- feedback.send_metrics
Whether to send crash information in the case of an instance failure. This information includes:
- General information from the
unameoutput. - Build information.
- The crash reason.
- The stack trace.
To turn off sending crash information, set this option to false.
Type: boolean
Default: true
Environment variable: TT_FEEDBACK_CRASHINFO
Whether to send information about a running instance to the feedback
server. To turn off sending feedback, set this option to false.
Type: boolean
Default: true
Environment variable: TT_FEEDBACK_ENABLED
The address to which information is sent.
Type: string
Default: <https://feedback.tarantool.io>
Environment variable: TT_FEEDBACK_HOST
The interval (in seconds) of sending information.
Type: number
Default: 3600
Environment variable: TT_FEEDBACK_INTERVAL
The interval (in seconds) for collecting metrics.
Type: number
Default: 60
Environment variable: TT_FEEDBACK_METRICS_COLLECT_INTERVAL
The maximum size of memory (in bytes) used to store metrics before sending them to the feedback server. If the size of collected metrics exceeds this value, earlier metrics are dropped.
Type: integer
Default: 1024 * 1024 (1048576)
Environment variable: TT_FEEDBACK_METRICS_LIMIT
Whether to send metrics to the feedback server. Note that all collected metrics are dropped after sending them to the feedback server.
Type: boolean
Default: true
Environment variable: TT_FEEDBACK_SEND_METRICS
The fiber section describes options related to configuring
fibers, yields, and cooperative multitasking.
- fiber.io_collect_interval
- fiber.too_long_threshold
- fiber.worker_pool_threads
- fiber.slice.*
- fiber.top.*
The time period (in seconds) a fiber sleeps between iterations of the event loop.
fiber.io_collect_interval can be used to reduce CPU load in
deployments where the number of client connections is large, but
requests are not so frequent (for example, each connection issues just a
handful of requests per second).
Type: number
Default: box.NULL
Environment variable: TT_FIBER_IO_COLLECT_INTERVAL
If processing a request takes longer than the given period (in seconds), the fiber warns about it in the log.
fiber.too_long_threshold has effect only if
log.level is greater than or equal
to 4 (warn).
Type: number
Default: 0.5
Environment variable: TT_FIBER_TOO_LONG_THRESHOLD
The maximum number of threads to use during execution of certain internal processes (for example, socket.getaddrinfo() and coio_call()).
Type: number
Default: 4
Environment variable: TT_FIBER_WORKER_POOL_THREADS
This section describes options related to configuring time periods for fiber slices. See fiber.set_max_slice for details and examples.
Set a time period (in seconds) that specifies the warning slice.
Type: number
Default: 0.5
Environment variable: TT_FIBER_SLICE_WARN
Set a time period (in seconds) that specifies the error slice.
Type: number
Default: 1
Environment variable: TT_FIBER_SLICE_ERR
This section describes options related to configuring the
fiber.top() function, normally used for debug purposes.
fiber.top() shows all alive fibers and their CPU consumption.
Enable or disable the fiber.top() function.
Enabling fiber.top() slows down fiber switching by about 15%, so it is
disabled by default.
Type: boolean
Default: false
Environment variable: TT_FIBER_TOP_ENABLED
The flightrec section describes options related to the
flight recorder configuration.
- flightrec.enabled
- flightrec.logs_size
- flightrec.logs_max_msg_size
- flightrec.logs_log_level
- flightrec.metrics_period
- flightrec.metrics_interval
- flightrec.requests_size
- flightrec.requests_max_req_size
- flightrec.requests_max_res_size
Enable the flight recorder.
Type: boolean
Default: false
Environment variable: TT_FLIGHTREC_ENABLED
Specify the size (in bytes) of the log storage. You can set this option
to 0 to disable the log storage.
Type: integer
Default: 10485760
Environment variable: TT_FLIGHTREC_LOGS_SIZE
Specify the maximum size (in bytes) of the log message. The log message is truncated if its size exceeds this limit.
Type: integer
Default: 4096
Maximum: 16384
Environment variable: TT_FLIGHTREC_LOGS_MAX_MSG_SIZE
Specify the level of detail the log has. The default value is 6
(VERBOSE). You can learn more about log levels from the
log_level option description. Note that the
flightrec.logs_log_level value might differ from log_level.
Type: integer
Default: 6
Environment variable: TT_FLIGHTREC_LOGS_LOG_LEVEL
Specify the time period (in seconds) that defines how long metrics are stored from the moment of dump. So, this value defines how much historical metrics data is collected up to the moment of crash. The frequency of metric dumps is defined by flightrec.metrics_interval.
Type: integer
Default: 180
Environment variable: TT_FLIGHTREC_METRICS_PERIOD
Specify the time interval (in seconds) that defines the frequency of dumping metrics. This value shouldn't exceed flightrec.metrics_period.
Type: number
Default: 1.0
Minimum: 0.001
Environment variable: TT_FLIGHTREC_METRICS_INTERVAL
Specify the size (in bytes) of storage for the request and response
data. You can set this parameter to 0 to disable a storage of requests
and responses.
Type: integer
Default: 10485760
Environment variable: TT_FLIGHTREC_REQUESTS_SIZE
Specify the maximum size (in bytes) of a request entry. A request entry is truncated if this size is exceeded.
Type: integer
Default: 16384
Environment variable: TT_FLIGHTREC_REQUESTS_MAX_REQ_SIZE
Specify the maximum size (in bytes) of a response entry. A response entry is truncated if this size is exceeded.
Type: integer
Default: 16384
Environment variable: TT_FLIGHTREC_REQUESTS_MAX_RES_SIZE
The iproto section is used to configure parameters related to
communicating to and between cluster instances.
- iproto.listen
- iproto.net_msg_max
- iproto.readahead
- iproto.threads
- iproto.advertise.*
- (uri.params.* )
An array of URIs used to listen for incoming requests. If required, you can enable SSL for specific URIs by providing additional parameters ((uri.params.* )).
Note that a URI value can't contain parameters, a login, or a password.
Example
In the example below, iproto.listen is set explicitly for each
instance in a cluster:
groups:group001:replicasets:replicaset001:instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'instance002:iproto:listen:- uri: '127.0.0.1:3302'instance003:iproto:listen:- uri: '127.0.0.1:3303'
See also: Connections
Type: array
Default: nil
Environment variable: TT_IPROTO_LISTEN
To handle messages, Tarantool allocates fibers. To prevent fiber overhead from affecting the whole system, Tarantool restricts how many messages the fibers handle, so that some pending requests are blocked.
- On powerful systems, increase
net_msg_max, and the scheduler starts processing pending requests immediately. - On weaker systems, decrease
net_msg_max, and the overhead may decrease. However, this may take some time because the scheduler must wait until already-running requests finish.
When net_msg_max is reached, Tarantool suspends processing of incoming
packages until it has processed earlier messages. This is not a direct
restriction of the number of fibers that handle network messages, rather
it is a system-wide restriction of channel bandwidth. This in turn
restricts the number of incoming network messages that the
transaction processor thread handles, and therefore
indirectly affects the fibers that handle network messages.
Type: integer
Default: 768
Environment variable: TT_IPROTO_NET_MSG_MAX
The size of the read-ahead buffer associated with a client connection. The larger the buffer, the more memory an active connection consumes, and the more requests can be read from the operating system buffer in a single system call.
The recommendation is to make sure that the buffer can contain at least a few dozen requests. Therefore, if a typical tuple in a request is large, e.g. a few kilobytes or even megabytes, the read-ahead buffer size should be increased. If batched request processing is not used, it's prudent to leave this setting at its default.
Type: integer
Default: 16320
Environment variable: TT_IPROTO_READAHEAD
The number of network threads. There can be unusual
workloads where the network thread is 100% loaded and the transaction
processor thread is not, so the network thread is a bottleneck. In that
case, set iproto_threads to 2 or more. The operating system kernel
determines which connection goes to which thread.
Type: integer
Default: 1
Environment variable: TT_IPROTO_THREADS
A URI used to advertise the current instance to clients.
The iproto.advertise.client option accepts a URI in the following
formats:
- An address:
host:port. - A Unix domain socket:
unix/:.
Note that this option doesn't allow to set a username and password. If a remote client needs this information, it should be delivered outside of the cluster configuration.
Type: string
Default: [box.NULL](../reference_lua/box/box_null#box-null)
Environment variable: TT_IPROTO_ADVERTISE_CLIENT
Settings used to advertise the current instance to other cluster members. The format of these settings is described in iproto.advertise..
Example
In the example below, the following configuration options are specified:
- In the credentials section, the
replicatoruser with thereplicationrole is created. iproto.advertise.peerspecifies that other instances should connect to an address defined in iproto.listen using thereplicatoruser.
credentials:users:replicator:password: 'topsecret'roles: [replication]iproto:advertise:peer:login: replicatorreplication:failover: electiongroups:group001:replicasets:replicaset001:instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'instance002:iproto:listen:- uri: '127.0.0.1:3302'instance003:iproto:listen:- uri: '127.0.0.1:3303'
Type: map
Environment variable: see [iproto.advertise.](peer_or_sharding/.* )
Settings used to advertise the current instance to a router and rebalancer. The format of these settings is described in iproto.advertise..
Example
In the example below, the following configuration options are specified:
- In the credentials section, the
replicatorandstorageusers are created. iproto.advertise.peerspecifies that other instances should connect to an address defined in iproto.listen with thereplicatoruser.iproto.advertise.shardingspecifies that a router should connect to storages using an address defined in iproto.listen with thestorageuser.
credentials:users:replicator:password: 'topsecret'roles: [replication]storage:password: 'secret'roles: [sharding]iproto:advertise:peer:login: replicatorsharding:login: storage
Type: map
Environment variable: see [iproto.advertise.](peer_or_sharding/.* )
(Optional) A URI used to advertise the current instance. By default, the URI defined in iproto.listen is used to advertise the current instance.
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_URI,
TT_IPROTO_ADVERTISE_SHARDING_URI
(Optional) A username used to connect to the current instance. If a
username is not set, the guest user is used.
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_LOGIN,
TT_IPROTO_ADVERTISE_SHARDING_LOGIN
(Optional) A password for the specified user. If a login is specified
but a password is missing, it is taken from the user's
credentials.
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PASSWORD, TT_IPROTO_ADVERTISE_SHARDING_PASSWORD
(Optional) URI parameters required for connecting to the current instance.
URI parameters that can be used in the iproto.listen. and iproto.advertise. options.
.params.transport .params.ssl_ca_file .params.ssl_cert_file .params.ssl_ciphers .params.ssl_key_file .params.ssl_password .params.ssl_password_file
Allows you to enable traffic encryption for client-server communications over binary connections. In a Tarantool cluster, one instance might act as the server that accepts connections from other instances and the client that connects to other instances.
<uri>.params.transport accepts one of the following values:
plain(default): turn off traffic encryption.ssl: encrypt traffic by using the TLS 1.2 protocol (Enterprise Edition only).
Example
The example below demonstrates how to enable traffic encryption by using a self-signed server certificate. The following parameters are specified for each instance:
ssl_cert_file: a path to an SSL certificate file.ssl_key_file: a path to a private SSL key file.
replicaset001:
Example on Github: ssl_without_ca
Type: string
Default: 'plain'
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_TRANSPORT, TT_IPROTO_ADVERTISE_SHARDING_PARAMS_TRANSPORT
(Optional) A path to a trusted certificate authorities (CA) file. If not set, the peer won't be checked for authenticity.
Both a server and a client can use the ssl_ca_file parameter:
- If it's on the server side, the server verifies the client.
- If it's on the client side, the client verifies the server.
- If both sides have the CA files, the server and the client verify each other.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_CA_FILE,TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_CA_FILE
A path to an SSL certificate file:
- For a server, it's mandatory.
- For a client, it's mandatory if the ssl_ca_file parameter is set for a server; otherwise, optional.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_CERT_FILE, TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_CERT_FILE
(Optional) A colon-separated (:) list of SSL cipher suites the
connection can use. Note that the list is not validated: if a cipher
suite is unknown, Tarantool ignores it, doesn't establish the
connection, and writes to the log that no shared cipher was found.
The supported cipher suites are:
- ECDHE-ECDSA-AES256-GCM-SHA384
- ECDHE-RSA-AES256-GCM-SHA384
- DHE-RSA-AES256-GCM-SHA384
- ECDHE-ECDSA-CHACHA20-POLY1305
- ECDHE-RSA-CHACHA20-POLY1305
- DHE-RSA-CHACHA20-POLY1305
- ECDHE-ECDSA-AES128-GCM-SHA256
- ECDHE-RSA-AES128-GCM-SHA256
- DHE-RSA-AES128-GCM-SHA256
- ECDHE-ECDSA-AES256-SHA384
- ECDHE-RSA-AES256-SHA384
- DHE-RSA-AES256-SHA256
- ECDHE-ECDSA-AES128-SHA256
- ECDHE-RSA-AES128-SHA256
- DHE-RSA-AES128-SHA256
- ECDHE-ECDSA-AES256-SHA
- ECDHE-RSA-AES256-SHA
- DHE-RSA-AES256-SHA
- ECDHE-ECDSA-AES128-SHA
- ECDHE-RSA-AES128-SHA
- DHE-RSA-AES128-SHA
- AES256-GCM-SHA384
- AES128-GCM-SHA256
- AES256-SHA256
- AES128-SHA256
- AES256-SHA
- AES128-SHA
- GOST2012-GOST8912-GOST8912
- GOST2001-GOST89-GOST89
For detailed information on SSL ciphers and their syntax, refer to OpenSSL documentation.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_CIPHERS, TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_CIPHERS`
A path to a private SSL key file:
- For a server, it's mandatory.
- For a client, it's mandatory if the ssl_ca_file parameter is set for a server; otherwise, optional.
If the private key is encrypted, provide a password for it in the
ssl_password or ssl_password_file parameter.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_KEY_FILE,TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_KEY_FILE
(Optional) A password for an encrypted private SSL key provided using
ssl_key_file. Alternatively, the password can be provided in
ssl_password_file.
Tarantool applies the ssl_password and ssl_password_file parameters
in the following order:
- If
ssl_passwordis provided, Tarantool tries to decrypt the private key with it. - If
ssl_passwordis incorrect or isn't provided, Tarantool tries all passwords fromssl_password_fileone by one in the order they are written. - If
ssl_passwordand all passwords fromssl_password_fileare incorrect, or none of them is provided, Tarantool treats the private key as unencrypted.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_PASSWORD, TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_PASSWORD
(Optional) A text file with one or more passwords for encrypted private
SSL keys provided using ssl_key_file (each on a separate line).
Alternatively, the password can be provided in ssl_password.
See also: (uri.params.transport )
Type: string
Default: nil
Environment variable: TT_IPROTO_ADVERTISE_PEER_PARAMS_SSL_PASSWORD_FILE, TT_IPROTO_ADVERTISE_SHARDING_PARAMS_SSL_PASSWORD_FILE
The groups section provides the ability to define the
full topology of a Tarantool cluster.
A group name.
The following rules are applied to group names:
- The maximum number of symbols is 63.
- Should start with a letter.
- Can contain lowercase letters (a-z).
- Can contain digits (0-9).
- Can contain the following characters:
-,_.
Replica sets that belong to this group. See replicasets.
Any configuration parameter that can be defined in the group scope. For example, iproto and database configuration parameters defined at the group level are applied to all instances in this group.
- replicasets.<replicaset_name>
- replicasets.<replicaset_name>.leader
- replicasets.<replicaset_name>.bootstrap_leader
- replicasets.<replicaset_name>.instances
- replicasets.<replicaset_name>.<config_parameter>
A replica set name.
Note that the rules applied to a replica set name are the same as for groups. Learn more in groups.<group_name>.
A replica set leader. This option can be used to set a replica set
leader when manual
replication.failover is
used.
To perform controlled failover,
<replicaset_name>.leader can be temporarily removed or set to null.
Example
replication:failover: manualgroups:group001:replicasets:replicaset001:leader: instance001instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'instance002:iproto:listen:- uri: '127.0.0.1:3302'instance003:iproto:listen:- uri: '127.0.0.1:3303'
A bootstrap leader for a replica set. To specify a bootstrap leader
manually, you need to set
replication.bootstrap_strategy
to config.
Example
groups:group001:replicasets:replicaset001:replication:bootstrap_strategy: configbootstrap_leader: instance001instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'instance002:iproto:listen:- uri: '127.0.0.1:3302'instance003:iproto:listen:- uri: '127.0.0.1:3303'
Instances that belong to this replica set. See instances.
Any configuration parameter that can be defined in the replica set scope. For example, iproto and database configuration parameters defined at the replica set level are applied to all instances in this replica set.
An instance name.
Note that the rules applied to an instance name are the same as for groups. Learn more in groups.<group_name>.
Any configuration parameter that can be defined in the instance scope. For example, iproto and database configuration parameters defined at the instance level are applied to this instance only.
isolated mode –––
Since version 3.3.0, a
new isolated option is added to instance configuration.
The option takes boolean values, by default it is set to false.
isolated: true moves the instance it has been applied at to the
isolated mode.
The isolated mode allows the user to temporarily isolate an instance and perform maintenance activities on it.
In the isolated mode:
- The instance is moved to the read-only state
- iproto stops listening for new connections
- iproto drops all the current connections
- The instance is disconnected from all the replication upstreams
- Other replicaset members exclude the isolated instance from the replication upstreams
Example
The example below shows how to isolate an instance:
/code_snippets/snippets/config/instances.enabled/isolated_mode/config.yaml
The labels section allows adding custom attributes to the
configuration. Attributes must be key: value pairs with string keys
and values.
A value of the label with the specified name.
Example
The example below shows how to define labels on the replica set and instance levels:
labels:dc: 'east'production: 'false'
See also: configuration_labels
The log section defines configuration parameters related to logging.
To handle logging in your application, use the log module.
Define a location Tarantool sends logs to. This option accepts the following values:
stderr: write logs to the standard error stream.file: write logs to a file (see log.file).pipe: start a program and write logs to its standard input (see log.pipe).syslog: write logs to a system logger (see log.syslog.*).
Type: string
Default: 'stderr'
Environment variable: TT_LOG_TO
Specify a file for logs destination. To write logs to a file, you need
to set log.to to file. Otherwise,
log.file is ignored.
Example
The example below shows how to write logs to a file placed in the specified directory:
log:to: filefile: var/log/{{ instance_name }}/instance.log
Example on GitHub: log_file
Type: string
Default: 'var/log/{{ instance_name }}/tarantool.log'
Environment variable: TT_LOG_FILE
Specify a format that is used for a log entry. The following formats are supported:
-
plain: a log entry is formatted as plain text. Example:2024-04-09 11:00:10.369 [12089] main/104/interactive I> log level 5 (INFO) -
json: a log entry is formatted as JSON and includes additional fields. Example:{"time": "2024-04-09T11:00:57.174+0300","level": "INFO","message": "log level 5 (INFO)","pid": 12160,"cord_name": "main","fiber_id": 104,"fiber_name": "interactive","file": "src/main.cc","line": 498}
Type: string
Default: 'plain'
Environment variable: TT_LOG_FORMAT
Specify the level of detail logs have. There are the following levels:
- 0 –
fatal - 1 –
syserror - 2 –
error - 3 –
crit - 4 –
warn - 5 –
info - 6 –
verbose - 7 –
debug
By setting log.level, you can enable logging of all events with
severities above or equal to the given level.
Example
The example below shows how to log all events with severities above or
equal to the VERBOSE level.
log:level: 'verbose'
Example on GitHub: log_level
Type: number, string
Default: 5
Environment variable: TT_LOG_LEVEL
Configure the specified log levels (log.level) for different modules.
You can specify a logging level for the following module types:
- Modules (files) that use the default logger. Example: Set log levels for files that use the default logger.
- Modules that use custom loggers created using the log.new() function. Example: Set log levels for modules that use custom loggers.
- The
tarantoolmodule that enables you to configure the logging level for Tarantool core messages. Specifically, it configures the logging level for messages logged from non-Lua code, including C modules. Example: Set a log level for C modules.
Example 1: Set log levels for files that use the default logger
Suppose you have two identical modules placed by the following paths:
test/module1.lua and test/module2.lua. These modules use the default
logger and look as follows:
return {say_hello = function()local log = require('log')log.info('Info message from module1')end}
To configure logging levels, you need to provide module names corresponding to paths to these modules:
log:modules:test.module1: 'verbose'test.module2: 'error'app:file: 'app.lua'
To load these modules in your application (app.lua), you need to add
the corresponding require directives:
Given that module1 has the verbose logging level and module2 has
the error level, calling module1.say_hello() shows a message but
module2.say_hello() is swallowed:
Example on GitHub: log_existing_modules
Example 2: Set log levels for modules that use custom loggers
This example shows how to set the verbose level for module1 and the
error level for module2:
log:modules:module1: 'verbose'module2: 'error'app:file: 'app.lua'
To create custom loggers in your application (app.lua), call the
log.new() function:
Given that module1 has the verbose logging level and module2 has
the error level, calling module1_log.info() shows a message but
module2_log.info() is swallowed:
Example on GitHub: log_new_modules
Example 3: Set a log level for C modules
This example shows how to set the info level for the tarantool
module:
log:modules:tarantool: 'info'app:file: 'app.lua'
The specified level affects messages logged from C modules:
ffi = require('ffi')-- Prints 'info' messages --ffi.C._say(ffi.C.S_INFO, nil, 0, nil, 'Info message from C module')--[[[6024] main/103/interactive I> Info message from C module---...--]]-- Swallows 'debug' messages --ffi.C._say(ffi.C.S_DEBUG, nil, 0, nil, 'Debug message from C module')--[[---...--]]
The example above uses the LuaJIT ffi
library to call C functions provided by
the say module.
Example on GitHub: log_existing_c_modules
Type: map
Default: [box.NULL](../reference_lua/box/box_null#box-null)
Environment variable: TT_LOG_MODULES
Specify the logging behavior if the system is not ready to write. If set
to true, Tarantool does not block during logging if the system is
non-writable and writes a message instead. Using this value may improve
logging performance at the cost of losing some log messages.
Type: boolean
Default: false
Environment variable: TT_LOG_NONBLOCK
Start a program and write logs to its standard input (stdin). To send
logs to a program's standard input, you need to set
log.to to pipe.
Example
In the example below, Tarantool writes logs to the standard input of
cronolog:
log:to: pipepipe: 'cronolog tarantool.log'
Example on GitHub: log_pipe
Type: string
Default: [box.NULL](../reference_lua/box/box_null#box-null)
Environment variable: TT_LOG_PIPE
Specify the syslog facility to be used when syslog is enabled. To write
logs to syslog, you need to set log.to
to syslog.
Type: string
Possible values: 'auth', 'authpriv', 'cron', 'daemon',
'ftp', 'kern', 'lpr', 'mail', 'news', 'security',
'syslog', 'user', 'uucp', 'local0', 'local1', 'local2',
'local3', 'local4', 'local5', 'local6', 'local7'
Default: 'local7'
Environment variable: TT_LOG_SYSLOG_FACILITY
Specify an application name used to identify Tarantool messages in
syslog logs. To write logs to syslog, you need to set
log.to to syslog.
Type: string
Default: 'tarantool'
Environment variable: TT_LOG_SYSLOG_IDENTITY
Set a location of a syslog server. This option accepts one of the following values:
- An IPv4 address. Example:
127.0.0.1:514. - A Unix socket path starting with
unix:. Examples:unix:/dev/logon Linux orunix:/var/run/syslogon macOS.
To write logs to syslog, you need to set
log.to to syslog.
Example
In the example below, Tarantool writes logs to a syslog server that
listens for logging messages on the 127.0.0.1:514 address:
log:to: syslogsyslog:server: '127.0.0.1:514'
Example on GitHub: log_syslog
Type: string
Default: box.NULL
Environment variable: TT_LOG_SYSLOG_SERVER
The lua section outlines the configuration parameters related to the
Lua environment within Tarantool.
Specifies the maximum memory amount available to Lua scripts, measured in bytes.
When the specified value exceeds the current memory usage, the new limit takes effect immediately without a restart. However, when the specified value is lower than the current memory usage, a restart of the instance is required for the change to take effect.
Example to set the Lua memory limit to 4 GB:
lua:memory: 4294967296
Type: integer
Default: 2147483648 (2GB)
Environment variable: TT_LUA_MEMORY
The memtx section is used to configure parameters related to the
memtx engine.
- memtx.allocator
- memtx.max_tuple_size
- memtx.memory
- memtx.min_tuple_size
- memtx.slab_alloc_factor
- memtx.slab_alloc_granularity
- memtx.sort_threads
Specify the allocator that manages memory for memtx tuples. Possible
values:
system– the memory is allocated as needed, checking that the quota is not exceeded. THe allocator is based on themallocfunction.small– a slab allocator. The allocator repeatedly uses a memory block to allocate objects of the same type. Note that this allocator is prone to unresolvable fragmentation on specific workloads, so you can switch tosystemin such cases.
Type: string
Default: 'small'
Environment variable: TT_MEMTX_ALLOCATOR
Size of the largest allocation unit for the memtx storage engine in bytes. It can be increased if it is necessary to store large tuples.
Type: integer
Default: 1048576
Environment variable: TT_MEMTX_MAX_TUPLE_SIZE
The amount of memory in bytes that Tarantool allocates to store tuples.
When the limit is reached, INSERT and
UPDATE requests fail with the
ER_MEMORY_ISSUE error. The server
does not go beyond the memtx.memory limit to allocate tuples, but
there is additional memory used to store indexes and connection
information.
Example
In the example below, the memory size is set to 1 GB (1073741824 bytes).
memtx:memory: 1073741824
Type: integer
Default: 268435456
Environment variable: TT_MEMTX_MEMORY
Size of the smallest allocation unit in bytes. It can be decreased if most of the tuples are very small.
Type: integer
Default: 16
Possible values: between 8 and 1048280 inclusive
Environment variable: TT_MEMTX_MIN_TUPLE_SIZE
The multiplier for computing the sizes of memory chunks that tuples are stored in. A lower value may result in less wasted memory depending on the total amount of memory available and the distribution of item sizes.
See also: memtx.slab_alloc_granularity
Type: number
Default: 1.05
Possible values: between 1 and 2 inclusive
Environment variable: TT_MEMTX_SLAB_ALLOC_FACTOR
Specify the granularity in bytes of memory allocation in the
small allocator. The
memtx.slab_alloc_granularity value should meet the following
conditions:
- The value is a power of two.
- The value is greater than or equal to 4.
Below are few recommendations on how to adjust the
memtx.slab_alloc_granularity option:
- If the tuples in space are small and have about the same size, set the option to 4 bytes to save memory.
- If the tuples are different-sized, increase the option value to
allocate tuples from the same
mempool(memory pool).
See also: memtx.slab_alloc_factor
Type: integer
Default: 8
Environment variable: TT_MEMTX_SLAB_ALLOC_GRANULARITY
The number of threads from the thread pool used
to sort keys of secondary indexes on loading a memtx database. The
minimum value is 1, the maximum value is 256. The default is to use all
available cores.
Type: integer
Default: box.NULL
Environment variable: TT_MEMTX_SORT_THREADS
The metrics section defines configuration parameters for
metrics.
An array containing the metrics to turn off. The array can contain the
same values as the exclude configuration parameter passed to
metrics.cfg().
Example
metrics:include: [ all ]exclude: [ vinyl ]labels:alias: '{{ instance_name }}'
Type: array
Default: ````
Environment variable: TT_METRICS_EXCLUDE
An array containing the metrics to turn on. The array can contain the
same values as the include configuration parameter passed to
metrics.cfg().
Type: array
Default: [ all ]
Environment variable: TT_METRICS_INCLUDE
Global labels to be added to every observation.
Type: map
Default: { alias = names.instance_name }
Environment variable: TT_METRICS_LABELS
The process section defines configuration parameters of the Tarantool
process in the system.
- process.background
- process.coredump
- process.title
- process.pid_file
- process.strip_core
- process.username
- process.work_dir
Run the server as a daemon process.
If this option is set to true, Tarantool log location defined by the
log.to option should be set to file,
pipe, or syslog -- anything other than stderr, the default,
because a daemon process is detached from a terminal and it can't write
to the terminal's stderr.
Type: boolean
Default: false
Environment variable: TT_PROCESS_BACKGROUND
Create coredump files.
Usually, an administrator needs to call ulimit -c unlimited (or set
corresponding options in systemd's unit file) before running a
Tarantool process to get core dumps. If process.coredump is enabled,
Tarantool sets the corresponding resource limit by itself and the
administrator doesn't need to call ulimit -c unlimited (see man 3
setrlimit).
This option also sets the state of the dumpable attribute, which is
enabled by default, but may be dropped in some circumstances (according
to man 2 prctl,
see PR_SET_DUMPABLE).
Type: boolean
Default: false
Environment variable: TT_PROCESS_COREDUMP
Add the given string to the server's process title (it is shown in the
COMMAND column for the Linux commands ps -ef and top -c).
For example, if you set the option to myservice - {{ instance_name }}:
process:title: myservice - {{ instance_name }}
ps -ef might show the Tarantool server
process like this:
$ ps -ef | grep tarantool503 68100 68098 0 10:33 pts/2 00:00.10 tarantool <running>: myservice instance1
Type: string
Default: 'tarantool - {{ instance_name }}'
Environment variable: TT_PROCESS_TITLE
Store the process id in this file.
This option may contain a relative file path. In this case, it is interpreted as relative to process.work_dir.
Type: string
Default: 'var/run/{{ instance_name }}/tarantool.pid'
Environment variable: TT_PROCESS_PID_FILE
Whether coredump files should not include memory allocated for tuples
-- this memory can be large if Tarantool runs under heavy load. Setting
to true means "do not include".
Type: boolean
Default: true
Environment variable: TT_PROCESS_STRIP_CORE
The name of the system user to switch to after start.
Type: string
Default: box.NULL
Environment variable: TT_PROCESS_USERNAME
A directory where Tarantool working files will be stored (database
files, logs, a PID file, a console Unix socket, and other files if an
application generates them in the current directory). The server
instance switches to process.work_dir with
chdir(2) after start.
If set as a relative file path, it is relative to the current working directory, from where Tarantool is started. If not specified, defaults to the current working directory.
Other directory and file parameters, if set as relative paths, are
interpreted as relative to process.work_dir, for example, directories
for storing snapshots and write-ahead logs.
Type: string
Default: box.NULL
Environment variable: TT_PROCESS_WORK_DIR
The replication section defines configuration parameters related to
replication.
- replication.anon
- replication.autoexpel
- replication.anon
- replication.bootstrap_strategy
- replication.connect_timeout
- replication.election_mode
- replication.election_timeout
- replication.election_fencing_mode
- replication.failover
- replication.peers
- replication.skip_conflict
- replication.sync_lag
- replication.sync_timeout
- replication.synchro_queue_max_size
- replication.synchro_quorum
- replication.synchro_timeout
- replication.threads
- replication.timeout
Whether to make the current instance act as an anonymous replica. Anonymous replicas are read-only and can be used, for example, for backups.
To make the specified instance act as an anonymous replica, set
replication.anon to true:
instance003:replication:anon: true
You can find the full example on GitHub: anonymous_replica.
Anonymous replicas are not displayed in the box.info.replication section. You can check their status using box.info.replication_anon().
While anonymous replicas are read-only, you can write data to
replication-local and temporary spaces
(created with is_local = true and
temporary = true, respectively). Given that changes to
replication-local spaces are allowed, an anonymous replica might
increase the 0 component of the vclock
value.
Here are the limitations of having anonymous replicas in a replica set:
- A replica set must contain at least one non-anonymous instance.
- An anonymous replica can't be configured as a writable instance by
setting database.mode to
rwor making it a leader using (replicaset_name.leader ). - If
replication.failover
is set to
election, an anonymous replica can have replication.election_mode set tooffonly. - If
replication.failover
is set to
supervised, an external failover coordinator doesn't consider anonymous replicas when selecting a bootstrap or replica set leader.
Type: boolean
Default: false
Environment variable: TT_REPLICATION_ANON
Since: 3.3.0
The replication.autoexpel option designed for managing dynamic
clusters using YAML-based configurations. It enables the automatic
expulsion of instances that are removed from the YAML configuration.
Only instances with names that match the specified prefix are considered for expulsion; all others are excluded. Additionally, instances without a persistent name are ignored.
If an instance is in read-write mode and has the latest database schema, it initiates the expulsion of instances that:
- Match the specified prefix
- Absent from the updated YAML configuration
The expulsion process follows the standard procedure, involving the
removal of the instance from the _cluster system space.
The autoexpel logic is activated during specific events:
- Startup. When the cluster starts,
autoexpelchecks and removes instances not matching the updated configuration. - Reconfiguration. When the YAML configuration is reloaded,
autoexpelcompares the current state to the updated configuration and performs necessary expulsions. box.statuswatcher event. Changes detected by thebox.statuswatcher also trigger theautoexpelmechanism.
autoexpel does not take any actions on newly joined instances unless
one of the triggering events occurs. This means that an instance meeting
the autoexpel criterion can still join the cluster, but it may be
removed later during reconfiguration or on subsequent triggering events.
Configuration fields
by(string, default:nil): specifies theautoexpelcriterion. Currently, onlyprefixis supported and must be explicitly set.enabled(boolean, default:false): enables or disables theautoexpellogic.prefix(string, default:nil): defines the pattern for instance names that are considered part of the cluster.
replication.autoexpel_by.* ~~~~~~~~~~~~~
replication.autoexpel_by purpose is to define the criterion used for
determining which instances in a cluster are subject to the
autoexpel process.
The by field helps differentiate between:
- Instances that are part of the cluster and should adhere to the YAML configuration.
- Instances or tools (e.g., CDC tools) that use the replication channel but are not part of the cluster configuration.
The default value of by is nil, meaning no autoexpel criterion is
applied unless explicitly set.
Currently, the only supported value for by is prefix. The prefix
value instructs the system to identify instances based on their names,
matching them against a prefix pattern defined in the configuration.
If the autoexpel feature is enabled (enabled: true), the by
field must be explicitly set to prefix.
The absence of this field or an unsupported value will result in configuration errors.
replication:autoexpel:enabled: trueby: prefixprefix: '{{ replicaset_name }}'
Type: string
Default: nil
Environment variable: TT_REPLICATION_AUTOEXPEL_BY
replication.autoexpel_enabled.* ~~~~~~~~~~~~~
The replication.autoexpel_enabled field is a boolean configuration
option that determines whether the autoexpel logic is active for the
cluster. This feature is designed to automatically manage dynamic
cluster configurations by removing instances that are no longer
present in the YAML configuration.
Enabling autoexpel logic
To enable autoexpel, you should set enabled to true in the
replication.autoexpel section of your YAML configuration:
replication:autoexpel:enabled: trueby: prefixprefix: '{{ replicaset_name }}'
To disable autoexpel, set enabled to false.
Dependencies
If enabled is set to true, the following fields are required:
by: specifies the criterion forautoexpel(e.g.,prefix).prefix: defines the pattern used to match instance names for expulsion.
Failure to configure these fields when enabled is true will result in a configuration error.
Type: boolean
Default: false
Environment variable: TT_REPLICATION_AUTOEXPEL_ENABLED
replication.autoexpel_prefix.* ~~~~~~~~~~~~~
The prefix field filters instances for expulsion by differentiating
cluster instances (from the YAML configuration) from external services
(e.g., CDC tools). Only instances matching the prefix are considered.
A consistent naming pattern ensures the _cluster system space
automatically aligns with the YAML configuration.
If the prefix field is not set (nil), the autoexpel logic cannot
identify instances for expulsion, and the feature will not function.
This field is mandatory when replication.autoexpel_enabled is
set to true.
How it works:
- The prefix filters instance names (e.g.,
{{ replicaset_name }}for replicaset-specific names ori-for names starting withi-). - Instances matching the prefix and removed from the YAML configuration are expelled.
- Unnamed instances or those not matching the prefix are ignored.
Dynamic prefix based on replicaset name:
replication:autoexpel:enabled: trueby: prefixprefix: '{{ replicaset_name }}'
In this setup:
- Instances are grouped by replicaset names (e.g.,
r-001-i-001forreplicaset r-001). - The prefix ensures that only instances with names matching the replicaset name are auto expelled when removed from the configuration.
Static prefix for matching patterns:
replication:autoexpel:enabled: trueby: prefixprefix: 'i-'
In this setup:
- All instances with names starting with
i-(e.g.,i-001,i-002) are considered for expulsion. - This is useful when instances follow a uniform naming convention.
Type: string
Default: nil
Environment variable: TT_REPLICATION_AUTOEXPEL_PREFIX
autoexpel full example ~~~~~~~~~~~~~
- Create a
config.yamlfile with the following content:
credentials:users:guest:roles: [super]replication:failover: manualautoexpel:enabled: trueby: prefixprefix: '{{ replicaset_name }}'iproto:listen:- uri: 'unix/:./var/run/{{ instance_name }}.iproto'groups:g-001:replicasets:r-001:leader: r-001-i-001instances:r-001-i-001: {}r-001-i-002: {}r-001-i-003: {}
This configuration: - Sets up authentication with a guest user
assigned the super role. - Enables the autoexpel option to
automatically expel instances not present in the YAML file. - Defines
instance names based on a prefix pattern: {{ replicaset_name }}. -
Lists three instances: r-001-i-001, r-001-i-002, and
r-001-i-003.
- Open terminal window and start three instances using the following commands:
tarantool –name r-001-i-001 –config config.yaml -i
tarantool –name r-001-i-002 –config config.yaml -i
tarantool –name r-001-i-003 –config config.yaml -i
- Edit
config.yamland remove the following entry forr-001-i-003:
r-001-i-003: {}
The updated config.yaml should look like this:
groups:g-001:replicasets:r-001:leader: r-001-i-001instances:r-001-i-001: {}r-001-i-002: {}
Save the file.
- For the leader instance (
r-001-i-001), check the_clusterspace:
-
auto: a node doesn't boot if half or more of the other nodes in a replica set are not connected. For example, if a replica set contains 2 or 3 nodes, a node requires 2 connected instances. In the case of 4 or 5 nodes, at least 3 connected instances are required. Moreover, a bootstrap leader fails to boot unless every connected node has chosen it as a bootstrap leader. -
config: use the specified node to bootstrap a replica set. To specify the bootstrap leader, use the (replicaset_name.bootstrap_leader ) option. -
supervised: a bootstrap leader isn't chosen automatically but should be appointed using box.ctl.make_bootstrap_leader() on the desired node. The bootstrap leader management is the user's responsibility unless replication.failover is set tosupervised. In this case, the failover coordinator manages the bootstrap leader. -
native(since 3.4.0): the bootstrap leader is managed in the YAML configuration layer in sync with read-only/read-write mode management. From the user's perspective, this strategy is similar toauto: Tarantool or the failover coordinator handles bootstrapping automatically. Internally,nativeis based onsupervised, which helps avoid limitations ofauto, such as requiring a joining replica to connect to all instances registered in the_clustersystem space.When initializing a replica set,
nativeuses box.ctl.make_bootstrap_leader({graceful . After bootstrap, when an instance switches to read-write mode,nativeuses box.ctl.make_bootstrap_leader() to keep the bootstrap leader record pointing to the current read-write instance. The instance chosen to initialize a replica set depends on replication.failover:off: the first read-write instance in lexicographic order.manual: the instance configured as the replica set leader.election: the first non-anonymous candidate in lexicographic order.supervised: the failover coordinator chooses the bootstrap leader.
-
legacy(deprecated since 2.11.0): a node requires the replication_connect_quorum number of other nodes to be connected. This option is added to keep the compatibility with the current versions of Cartridge and might be removed in the future.
Type: string
Default: auto
Environment variable: TT_REPLICATION_BOOTSTRAP_STRATEGY
A timeout (in seconds) a replica waits when trying to connect to a master in a cluster. See orphan status for details.
This parameter is different from replication.timeout, which a master uses to disconnect a replica when the master receives no acknowledgments of heartbeat messages.
Type: number
Default: 30
Environment variable: TT_REPLICATION_CONNECT_TIMEOUT
A role of a replica set node in the leader election process.
The possible values are:
off: a node doesn't participate in the election activities.voter: a node can participate in the election process but can't be a leader.candidate: a node should be able to become a leader.manual: allow to control which instance is the leader explicitly instead of relying on automated leader election. By default, the instance acts like a voter -- it is read-only and may vote for other candidate instances. Once box.ctl.promote() is called, the instance becomes a candidate and starts a new election round. If the instance wins the elections, it becomes a leader but won't participate in any new elections.
Type: string
Default: [box.NULL](../reference_lua/box/box_null#box-null) (the actual default value depends on
replication.failover)
Environment variable: TT_REPLICATION_ELECTION_MODE
Specifies the timeout (in seconds) between election rounds in the leader election process if the previous round ended up with a split vote.
It is quite big, and for most of the cases, it can be lowered to 300-400 ms.
To avoid the split vote repeat, the timeout is randomized on each node during every new election, from 100% to 110% of the original timeout value. For example, if the timeout is 300 ms and there are 3 nodes started the election simultaneously in the same term, they can set their election timeouts to 300, 310, and 320 respectively, or to 305, 302, and 324, and so on. In that way, the votes will never be split because the election on different nodes won't be restarted simultaneously.
Type: number
Default: 5
Environment variable: TT_REPLICATION_ELECTION_TIMEOUT
Specifies the leader fencing mode that
affects the leader election process. When the parameter is set to soft
or strict, the leader resigns its leadership if it has less than
replication.synchro_quorum
of alive connections to the cluster nodes. The resigning leader receives
the status of a follower in the current election term and becomes
read-only.
- In
softmode, a connection is considered dead if there are no responses for 4 * replication.timeout seconds both on the current leader and the followers. - In
strictmode, a connection is considered dead if there are no responses for 2 * replication.timeout seconds on the current leader and 4 * replication.timeout seconds on the followers. This improves the chances that there is only one leader at any time.
Fencing applies to the instances that have the
replication.election_mode
set to candidate or manual. To turn off leader fencing, set
election_fencing_mode to off.
Type: string
Default: soft
Possible values: off`, `soft`, `strict
Environment variable: TT_REPLICATION_ELECTION_FENCING_MODE
A failover mode used to take over a master role when the current master instance fails. The following modes are available:
-
offLeadership in a replica set is controlled using the database.mode option. In this case, you can set the
database.modeoption torwon all instances in a replica set to make a master-master configuration.The default
database.modeis determined as follows:rwif there is one instance in a replica set;roif there are several instances. -
manualLeadership in a replica set is controlled using the (replicaset_name.leader ) option. In this case, a master-master configuration is forbidden.
In the
manualmode, the database.mode option cannot be set explicitly. The leader is configured in the read-write mode, all the other instances are read-only. -
electionAutomated leader election is used to control leadership in a replica set.
In the
electionmode, database.mode and (replicaset_name.leader ) shouldn't be set explicitly. -
supervised(Enterprise Edition only)Leadership in a replica set is controlled using an external failover coordinator.
In the
supervisedmode, database.mode and (replicaset_name.leader ) shouldn't be set explicitly.
See also: Replication tutorials
Example
In the example below, the following configuration options are specified:
- In the credentials section, the
replicatoruser with thereplicationrole is created. - iproto.advertise.peer
specifies that other instances should connect to an address defined in
iproto.listen using the
replicatoruser. replication.failoverspecifies that a master instance should be set manually.- (replicaset_name.leader ) sets
instance001as a replica set leader.
credentials:users:replicator:password: 'topsecret'roles: [replication]iproto:advertise:peer:login: replicatorreplication:failover: manualgroups:group001:replicasets:replicaset001:leader: instance001instances:instance001:iproto:listen:- uri: '127.0.0.1:3301'instance002:iproto:listen:- uri: '127.0.0.1:3302'instance003:iproto:listen:- uri: '127.0.0.1:3303'
Type: string
Default: off
Environment variable: TT_REPLICATION_FAILOVER
URIs of instances that constitute a replica set. These URIs are used by an instance to connect to another instance as a replica.
Alternatively, you can use iproto.advertise.peer to specify a URI used to advertise the current instance to other cluster members.
Example
In the example below, the following configuration options are specified:
- In the credentials section, the
replicatoruser with thereplicationrole is created. replication.peersspecifies URIs of replica set instances.
credentials:users:replicator:password: 'topsecret'roles: [replication]replication:peers:- replicator:topsecret@127.0.0.1:3301- replicator:topsecret@127.0.0.1:3302- replicator:topsecret@127.0.0.1:3303
Type: array
Default: [box.NULL](../reference_lua/box/box_null#box-null)
Environment variable: TT_REPLICATION_PEERS
By default, if a replica adds a unique key that another replica has
added, replication stops with the
ER_TUPLE_FOUND error. If replication.skip_conflict is
set to true, such errors are ignored.
Type: boolean
Default: false
Environment variable: TT_REPLICATION_SKIP_CONFLICT
The maximum delay (in seconds) between the time when data is written to
the master and the time when it is written to a replica. If
replication.sync_lag is set to nil or 365 * 100 * 86400
(TIMEOUT_INFINITY), a replica is always considered to be "synced".
Type: number
Default: 10
Environment variable: TT_REPLICATION_SYNC_LAG
The timeout (in seconds) that a node waits when trying to sync with
other nodes in a replica set after connecting or during a
configuration update. This could
fail indefinitely if
replication.sync_lag is
smaller than network latency, or if the replica cannot keep pace with
master updates. If replication.sync_timeout expires, the replica
enters orphan status.
Type: number
Default: 0
Environment variable: TT_REPLICATION_SYNC_TIMEOUT
Since: 3.3.0
The maximum size of the synchronous transaction queue on a master node, in bytes. The size limit isn't strict, i.e. if there's at least one free byte, the whole write request fits and no blocking is involved. This parameter ensures that the queue does not grow indefinitely, potentially impacting performance and resource usage, and applies only to the master node.
The 0 value disables the limit.
If the synchronous queue reaches the configured size limit, new
transactions attempting to enter the queue are discarded. In such cases,
the system returns an error to the user:
The synchronous transaction queue is full.
This size limitation does not apply during the recovery process. Transactions processed during recovery are unaffected by the queue size limit.
Use the following command to view the current size of the synchronous queue:
box.info.synchro.queue.size
tarantool> box.info.synchro---- queue:owner: 1size: 60busy: falselen: 1term: 2quorum: 2...
Set the synchronous queue size limit in the configuration file:
replication:synchro_queue_max_size: 33554432 # Limit set to 32 MB
Type: integer
Default: 16777216 (16 MB)
Environment variable: TT_REPLICATION_SYNCHRO_QUEUE_MAX_SIZE
A number of replicas that should confirm the receipt of a synchronous transaction before it can finish its commit.
This option supports dynamic evaluation of the quorum number. For
example, the default value is N / 2 + 1 where N is the current
number of replicas registered in a cluster. Once any replicas are added
or removed, the expression is re-evaluated automatically.
Note that the default value (at least 50% of the cluster size + 1)
guarantees data reliability. Using a value less than the canonical one
might lead to unexpected results, including a
split-brain.
replication.synchro_quorum is not used on replicas. If the master
fails, the pending synchronous transactions will be kept waiting on the
replicas until a new master is elected.
Type: string, number
Default: N / 2 + 1
Environment variable: TT_REPLICATION_SYNCHRO_QUORUM
For synchronous replication only. Specify how many seconds to wait for a synchronous transaction quorum replication until it is declared failed and is rolled back.
It is not used on replicas, so if the master fails, the pending synchronous transactions will be kept waiting on the replicas until a new master is elected.
Type: number
Default: 5
Environment variable: TT_REPLICATION_SYNCHRO_TIMEOUT
The number of threads spawned to decode the incoming replication data.
In most cases, one thread is enough for all incoming data. Possible values range from 1 to 1000. If there are multiple replication threads, connections to serve are distributed evenly between the threads.
Type: integer
Default: 1
Environment variable: TT_REPLICATION_THREADS
A time interval (in seconds) used by a master to send heartbeat requests to a replica when there are no updates to send to this replica. For each request, a replica should return a heartbeat acknowledgment.
If a master or replica gets no heartbeat message for
4 * replication.timeout seconds, a connection is dropped and a replica
tries to reconnect to the master.
See also: Monitoring a replica set
Type: number
Default: 1
Environment variable: TT_REPLICATION_TIMEOUT
This section describes configuration parameters related to application roles.
Specify the roles of an instance. To specify a role's configuration, use the roles_cfg option.
See also: configuration_application_roles
Type: array
Default: nil
Environment variable: TT_ROLES
Specify a role's configuration. This option accepts a role name as the key and a role's configuration as the value. To specify the roles of an instance, use the roles option.
See also: configuration_application_roles
Type: map
Default: nil
Environment variable: TT_ROLES_CFG
The security section defines configuration parameters related to
various security settings.
- security.auth_delay
- security.auth_retries
- security.auth_type
- security.disable_guest
- security.password_enforce_digits
- security.password_enforce_lowercase
- security.password_enforce_specialchars
- security.password_enforce_uppercase
- security.password_history_length
- security.password_lifetime_days
- security.password_min_length
- security.secure_erasing
Specify a period of time (in seconds) that a specific user should wait for the next attempt after failed authentication.
The
security.auth_retries
option lets a client try to authenticate the specified number of times
before security.auth_delay is enforced.
In the configuration below, Tarantool lets a client try to authenticate
with the same username three times. At the fourth attempt, the
authentication delay configured with security.auth_delay is enforced.
This means that a client should wait 10 seconds after the first failed
attempt.
security:auth_delay: 10auth_retries: 2
Type: number
Default: 0
Environment variable: TT_SECURITY_AUTH_DELAY
Specify the maximum number of authentication retries allowed before
security.auth_delay is
enforced. The default value is 0, which means security.auth_delay is
enforced after the first failed authentication attempt.
The retry counter is reset after security.auth_delay seconds since the
first failed attempt. For example, if a client tries to authenticate
fewer than security.auth_retries times within security.auth_delay
seconds, no authentication delay is enforced. The retry counter is also
reset after any successful authentication attempt.
Type: integer
Default: 0
Environment variable: TT_SECURITY_AUTH_RETRIES
Specify a protocol used to authenticate users. The possible values are:
chap-sha1: use the CHAP protocol withSHA-1hashing applied to passwords.pap-sha256: use PAP authentication with theSHA256hashing algorithm.
Note that CHAP stores password hashes in the _user space unsalted. If
an attacker gains access to the database, they may crack a password, for
example, using a rainbow
table. For PAP, a password
is salted with a user-unique salt before saving it in the database,
which keeps the database protected from cracking using a rainbow table.
To enable PAP, specify the security.auth_type option as follows:
security:auth_type: 'pap-sha256'
Type: string
Default: 'chap-sha1'
Environment variable: TT_SECURITY_AUTH_TYPE
If true, turn off access over remote connections from unauthenticated or guest users. This option affects connections between cluster members and net.box connections.
Type: boolean
Default: false
Environment variable: TT_SECURITY_DISABLE_GUEST
If true, a password should contain digits (0-9).
Type: boolean
Default: false
Environment variable: TT_SECURITY_PASSWORD_ENFORCE_DIGITS
If true, a password should contain lowercase letters (a-z).
Type: boolean
Default: false
Environment variable: TT_SECURITY_PASSWORD_ENFORCE_LOWERCASE
If true, a password should contain at least one special character
(such as &|?!@$).
Type: boolean
Default: false
Environment variable: TT_SECURITY_PASSWORD_ENFORCE_SPECIALCHARS
If true, a password should contain uppercase letters (A-Z).
Type: boolean
Default: false
Environment variable: TT_SECURITY_PASSWORD_ENFORCE_UPPERCASE
Specify the number of unique new user passwords before an old password can be reused.
Type: integer
Default: 0
Environment variable: TT_SECURITY_PASSWORD_HISTORY_LENGTH
Specify the maximum period of time (in days) a user can use the same password. When this period ends, a user gets the "Password expired" error on a login attempt. To restore access for such users, use box.schema.user.passwd.
Type: integer
Default: 0
Environment variable: TT_SECURITY_PASSWORD_LIFETIME_DAYS
Specify the minimum number of characters for a password.
Type: integer
Default: 0
Environment variable: TT_SECURITY_PASSWORD_MIN_LENGTH
If true, forces Tarantool to overwrite a data file a few times
before deletion to render recovery of a deleted file impossible. The
option applies to both .xlog and .snap files as well as Vinyl data
files.
Type: boolean
Default: false
Environment variable: TT_SECURITY_SECURE_ERASING
The sharding section defines configuration parameters related to
sharding.
- sharding.bucket_count
- sharding.discovery_mode
- sharding.failover_ping_timeout
- sharding.lock
- sharding.rebalancer_disbalance_threshold
- sharding.rebalancer_max_receiving
- sharding.rebalancer_max_sending
- sharding.rebalancer_mode
- sharding.roles
- sharding.sched_move_quota
- sharding.sched_ref_quota
- sharding.shard_index
- sharding.sync_timeout
- sharding.weight
- sharding.zone
The total number of buckets in a cluster. Learn more in vshard_config_bucket_count.
Example
sharding:bucket_count: 1000
Type: integer
Default: 3000
Environment variable: TT_SHARDING_BUCKET_COUNT
A mode of the background discovery fiber used by the router to find buckets. Learn more in vshard.router.discovery_set().
Type: string
Default: 'on'
Possible values: 'on', 'off', 'once'
Environment variable: TT_SHARDING_DISCOVERY_MODE
The timeout (in seconds) after which a node is considered unavailable if there are no responses during this period. The failover fiber is used to detect if a node is down.
Type: number
Default: 5
Environment variable: TT_SHARDING_FAILOVER_PING_TIMEOUT
Whether a replica set is locked. A locked replica set cannot receive new buckets nor migrate its own buckets.
Type: boolean
Default: nil
Environment variable: TT_SHARDING_LOCK
The maximum bucket disbalance threshold (in percent). The disbalance is calculated for each replica set using the following formula:
|etalon_bucket_count - real_bucket_count| / etalon_bucket_count * 100
Type: number
Default: 1
Environment variable: TT_SHARDING_REBALANCER_DISBALANCE_THRESHOLD
The maximum number of buckets that can be received in parallel by a single replica set. This number must be limited because the rebalancer sends a large number of buckets from the existing replica sets to the newly added one. This produces a heavy load on the new replica set.
Example
Suppose, rebalancer_max_receiving is equal to 100 and bucket_count
is equal to 1000. There are 3 replica sets with 333, 333, and 334
buckets on each respectively. When a new replica set is added, each
replica set's etalon_bucket_count becomes equal to 250. Rather than
receiving all 250 buckets at once, the new replica set receives 100,
100, and 50 buckets sequentially.
Type: integer
Default: 100
Environment variable: TT_SHARDING_REBALANCER_MAX_RECEIVING
The degree of parallelism for parallel rebalancing.
Type: integer
Default: 1
Maximum: 15
Environment variable: TT_SHARDING_REBALANCER_MAX_SENDING
Since: 3.1.0
Configure how a rebalancer is selected:
auto(default): if there are no replica sets with therebalancersharding role (sharding.roles), a replica set with the rebalancer is selected automatically among all replica sets.manual: one of the replica sets should have therebalancersharding role. The rebalancer is in this replica set.off: rebalancing is turned off regardless of whether a replica set with therebalancersharding role exists or not.
Type: string
Default: 'auto'
Environment variable: TT_SHARDING_REBALANCER_MODE
Roles of a replica set in regard to sharding. A replica set can have the following roles:
router: a replica set acts as a router.storage: a replica set acts as a storage.rebalancer: a replica set acts as a rebalancer.
The rebalancer role is optional. If it is not specified, a rebalancer
is selected automatically from the master instances of replica sets.
There can be at most one replica set with the rebalancer role.
Additionally, this replica set should have a storage role.
Example
replicasets:storage-a:sharding:roles: [storage, rebalancer]
See also: vshard_config_sharding_roles
Type: array
Default: nil
Environment variable: TT_SHARDING_ROLES
A scheduler's bucket move quota used by the rebalancer.
sched_move_quota defines how many bucket moves can be done in a row if
there are pending storage refs. Then, bucket moves are blocked and a
router continues making map-reduce requests.
See also: sharding.sched_ref_quota
Type: number
Default: 1
Environment variable: TT_SHARDING_SCHED_MOVE_QUOTA
A scheduler's storage ref quota used by a router's map-reduce API. For example, the vshard.router.map_callrw() function implements consistent map-reduce over the entire cluster.
sched_ref_quota defines how many storage refs, therefore map-reduce
requests, can be executed on the storage in a row if there are pending
bucket moves. Then, storage refs are blocked and the rebalancer
continues bucket moves.
See also: sharding.sched_move_quota
Type: number
Default: 300
Environment variable: TT_SHARDING_SCHED_REF_QUOTA
The name or ID of a TREE index over the bucket id. Spaces without this index do not participate in a sharded Tarantool cluster and can be used as regular spaces if needed. It is necessary to specify the first part of the index, other parts are optional.
See also: vshard-define-spaces
Type: string
Default: 'bucket_id'
Environment variable: TT_SHARDING_SHARD_INDEX
The timeout to wait for synchronization of the old master with replicas before demotion. Used when switching a master or when manually calling the sync() function.
Type: number
Default: 1
Environment variable: TT_SHARDING_SYNC_TIMEOUT
Since: 3.1.0
The relative amount of data that a replica set can store. Learn more at vshard-replica-set-weights.
Type: number
Default: 1
Environment variable: TT_SHARDING_WEIGHT
A zone that can be set for routers and replicas. This allows sending read-only requests not only to a master instance but to any available replica that is the nearest to the router.
Type: integer
Default: nil
Environment variable: TT_SHARDING_ZONE
The snapshot section defines configuration parameters related to the
snapshot files. To learn more about the
snapshots' configuration, check the
Persistence page.
A directory where memtx stores snapshot (.snap) files. A relative path
in this option is interpreted as relative to process.work_dir.
By default, snapshots and WAL files are stored in the same directory.
However, you can set different values for the snapshot.dir and
wal.dir options to store them on
different physical disks for performance matters.
Type: string
Default: 'var/lib/{{ instance_name }}'
Environment variable: TT_SNAPSHOT_DIR
Reduce the throttling effect of
box.snapshot() on INSERT/UPDATE/DELETE performance by setting a limit on
how many megabytes per second it can write to disk. The same can be
achieved by splitting wal.dir and
snapshot.dir locations and
moving snapshots to a separate disk. The limit also affects what
box.stat.vinyl().regulator
may show for the write rate of dumps to .run and .index files.
Type: number
Default: box.NULL
Environment variable: TT_SNAPSHOT_SNAP_IO_RATE_LIMIT
The maximum number of snapshots that are stored in the
snapshot.dir directory. If the
number of snapshots after creating a new one exceeds this value, the
Tarantool garbage collector
deletes old snapshots. If snapshot.count is set to zero, the garbage
collector does not delete old snapshots.
Example
In the example, the checkpoint daemon creates a snapshot every two hours until it has created three snapshots. After creating a new snapshot (the fourth one), the oldest snapshot and any associated write-ahead-log files are deleted.
snapshot:by:interval: 7200count: 3
Type: integer
Default: 2
Environment variable: TT_SNAPSHOT_COUNT
The interval in seconds between actions by the
checkpoint daemon. If the
option is set to a value greater than zero, and there is activity that
causes change to a database, then the checkpoint daemon calls
box.snapshot() every snapshot.by.interval seconds, creating a new
snapshot file each time. If the option is set to zero, the checkpoint
daemon is disabled.
Example
In the example, the checkpoint daemon creates a new database snapshot every two hours, if there is activity.
by:interval: 7200
Type: number
Default: 3600
Environment variable: TT_SNAPSHOT_BY_INTERVAL
The threshold for the total size in bytes for all WAL files created since the last snapshot taken. Once the configured threshold is exceeded, the WAL thread notifies the checkpoint daemon that it must make a new snapshot and delete old WAL files.
Type: integer
Default: 10\^18
Environment variable: TT_SNAPSHOT_BY_WAL_SIZE
The sql section defines configuration parameters related to
SQL.
The maximum cache size (in bytes) for all SQL prepared statements. To see the actual cache size, use box.info.sql().cache.size.
Type: integer
Default: 5242880
Environment variable: TT_SQL_CACHE_SIZE
The vinyl section defines configuration parameters related to the
vinyl storage engine.
- vinyl.bloom_fpr
- vinyl.cache
- vinyl.defer_deletes
- vinyl.dir
- vinyl.max_tuple_size
- vinyl.memory
- vinyl.page_size
- vinyl.range_size
- vinyl.read_threads
- vinyl.run_count_per_level
- vinyl.run_size_ratio
- vinyl.timeout
- vinyl.write_threads
A bloom filter's false positive rate – the suitable probability of
the bloom filter to give a
wrong result. The vinyl.bloom_fpr setting is a default value for the
bloom_fpr option passed to
space_object:create_index().
Type: number
Default: 0.05
Environment variable: TT_VINYL_BLOOM_FPR
The cache size for the vinyl storage engine. The cache can be resized dynamically.
Type: integer
Default: 128 * 1024 * 1024
Environment variable: TT_VINYL_CACHE
Enable the deferred DELETE optimization in vinyl. It was disabled by default since Tarantool version 2.10 to avoid possible performance degradation of secondary index reads.
Type: boolean
Default: false
Environment variable: TT_VINYL_DEFER_DELETES
A directory where vinyl files or subdirectories will be stored.
This option may contain a relative file path. In this case, it is interpreted as relative to process.work_dir.
Type: string
Default: 'var/lib/{{ instance_name }}'
Environment variable: TT_VINYL_DIR
The size of the largest allocation unit, for the vinyl storage engine. It can be increased if it is necessary to store large tuples.
Type: integer
Default: 1024 * 1024
Environment variable: TT_VINYL_MAX_TUPLE_SIZE
The maximum number of in-memory bytes that vinyl uses.
Type: integer
Default: 128 * 1024 * 1024
Environment variable: TT_VINYL_MEMORY
The page size. A page is a read/write unit for vinyl disk operations.
The vinyl.page_size setting is a default value for the
page_size option passed to
space_object:create_index().
Type: integer
Default: 8 * 1024
Environment variable: TT_VINYL_PAGE_SIZE
The default maximum range size for a vinyl index, in bytes. The maximum range size affects the decision of whether to split a range.
If vinyl.range_size is specified (but the value is not null or 0),
then it is used as the default value for the
range_size option passed to
space_object:create_index().
If vinyl.range_size is not specified (or is explicitly set to null
or 0), and range_size is not specified when the index is created, then
Tarantool sets a value later depending on performance considerations. To
see the actual value, use
index_object:stat().range_size.
Type: integer
Default: box.NULL (means that an effective default is determined in
runtime)
Environment variable: TT_VINYL_RANGE_SIZE
The maximum number of read threads that vinyl can use for concurrent operations, such as I/O and compression.
Type: integer
Default: 1
Environment variable: TT_VINYL_READ_THREADS
The maximum number of runs per level in the vinyl LSM tree. If this
number is exceeded, a new level is created. The
vinyl.run_count_per_level setting is a default value for the
run_count_per_level option passed to
space_object:create_index().
Type: integer
Default: 2
Environment variable: TT_VINYL_RUN_COUNT_PER_LEVEL
The ratio between the sizes of different levels in the LSM tree. The
vinyl.run_size_ratio setting is a default value for the
run_size_ratio option passed to
space_object:create_index().
Type: number
Default: 3.5
Environment variable: TT_VINYL_RUN_SIZE_RATIO
The vinyl storage engine has a scheduler that performs compaction. When
vinyl is low on available memory, the compaction scheduler may be unable
to keep up with incoming update requests. In that situation, queries may
time out after vinyl.timeout seconds. This should rarely occur, since
normally vinyl throttles inserts when it is running low on compaction
bandwidth. Compaction can also be initiated manually with
index_object:compact().
Type: integer
Default: 60
Environment variable: TT_VINYL_TIMEOUT
The maximum number of write threads that vinyl can use for some concurrent operations, such as I/O and compression.
Type: integer
Default: 4
Environment variable: TT_VINYL_WRITE_THREADS
The wal section defines configuration parameters related to
write-ahead log. To learn more about the WAL
configuration, check the Persistence
page.
- wal.cleanup_delay
- wal.dir
- wal.dir_rescan_delay
- wal.max_size
- wal.mode
- wal.queue_max_size
- wal.retention_period
- wal.ext.*
The delay in seconds used to prevent the
Tarantool garbage collector
from immediately removing write-ahead log files after a
node restart. This delay eliminates possible erroneous situations when
the master deletes WALs needed by replicas after
restart. As a consequence, replicas sync with the master faster after
its restart and don't need to download all the data again. Once all the
nodes in the replica set are up and running, a scheduled garbage
collection is started again even if wal.cleanup_delay has not expired.
See also: wal.retention_period
Type: number
Default: 14400
Environment variable: TT_WAL_CLEANUP_DELAY
A directory where write-ahead log (.xlog) files are stored. A relative
path in this option is interpreted as relative to process.work_dir.
By default, WAL files and snapshots are stored in the same directory.
However, you can set different values for the wal.dir and
snapshot.dir options to store
them on different physical disks for performance matters.
Type: string
Default: 'var/lib/{{ instance_name }}'
Environment variable: TT_WAL_DIR
The time interval in seconds between periodic scans of the write-ahead-log file directory, when checking for changes to write-ahead-log files for the sake of replication or hot standby.
Type: number
Default: 2
Environment variable: TT_WAL_DIR_RESCAN_DELAY
The maximum number of bytes in a single write-ahead log file. When a
request would cause an .xlog file to become larger than
wal.max_size, Tarantool creates a new WAL file.
Type: integer
Default: 268435456
Environment variable: TT_WAL_MAX_SIZE
Specify fiber-WAL-disk synchronization mode as:
none: write-ahead log is not maintained. A node withwal.modeset tononecan't be a replication master.write: fibers wait for their data to be written to the write-ahead log (nofsync(2)).fsync: fibers wait for their data,fsync(2)follows eachwrite(2).
Type: string
Default: 'write'
Environment variable: TT_WAL_MODE
The size of the queue in bytes used by a replica to submit new transactions to a write-ahead log (WAL). This option helps limit the rate at which a replica submits transactions to the WAL.
Limiting the queue size might be useful when a replica is trying to sync with a master and reads new transactions faster than writing them to the WAL.
Type: integer
Default: 16777216
Environment variable: TT_WAL_QUEUE_MAX_SIZE
Since: 3.1.0 (Enterprise Edition only)
The delay in seconds used to prevent the
Tarantool garbage collector
from removing a write-ahead log file after it has been
closed. If a node is restarted, wal.retention_period counts down from
the last modification time of the write-ahead log file.
The garbage collector doesn't track write-ahead logs that are to be relayed to anonymous replicas, such as:
- Anonymous replicas added as a part of a cluster configuration (see replication.anon).
- CDC (Change Data Capture) that retrieves data using anonymous replication.
In case of a replica or CDC downtime, the required write-ahead logs can
be removed. As a result, such a replica needs to be rebootstrapped. You
can use wal.retention_period to prevent such issues.
Note that wal.cleanup_delay
option also sets the delay used to prevent the Tarantool garbage
collector from removing write-ahead logs. The difference is that the
garbage collector doesn't take into account wal.cleanup_delay if all
the nodes in the replica set are up and running, which may lead to the
removal of the required write-ahead logs.
Type: number
Default: 0
Environment variable: TT_WAL_RETENTION_PERIOD
This section describes options related to WAL extensions.
Enable storing a new tuple for each CRUD operation performed. The option is in effect for all spaces. To adjust the option for specific spaces, use the wal.ext.spaces option.
Type: boolean
Default: false
Environment variable: TT_WAL_EXT_NEW
Enable storing an old tuple for each CRUD operation performed. The option is in effect for all spaces. To adjust the option for specific spaces, use the wal.ext.spaces option.
Type: boolean
Default: false
Environment variable: TT_WAL_EXT_OLD
Enable or disable storing an old and new tuple in the WAL record for a given space explicitly. The configuration for specific spaces has priority over the configuration in the wal.ext.new and wal.ext.old options.
The option is a key-value pair:
- The key is a space name (string).
- The value is a table that includes two optional boolean options:
oldandnew. The format and the default value of these options are described inwal.ext.oldandwal.ext.new.
Example
In the example, only new tuples are added to the log for the bands
space.
ext:new: trueold: truespaces:bands:old: false
Type: map
Default: nil
Environment variable: TT_WAL_EXT_SPACES