Skip to content

Commit 06cdab2

Browse files
committed
Supervised failover: reference
1 parent 089a503 commit 06cdab2

File tree

1 file changed

+111
-3
lines changed

1 file changed

+111
-3
lines changed

doc/reference/configuration/configuration_reference.rst

Lines changed: 111 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ config.etcd.*
546546
:end-before: ee_note_centralized_config_end
547547

548548
This section describes options related to providing connection settings to a :ref:`centralized etcd-based storage <configuration_etcd>`.
549+
If :ref:`replication.failover <configuration_reference_replication_failover>` is set to ``supervised``, Tarantool also uses etcd to maintain the state of failover coordinators.
549550

550551
* :ref:`config.etcd.endpoints <config_etcd_endpoints>`
551552
* :ref:`config.etcd.prefix <config_etcd_prefix>`
@@ -1217,6 +1218,115 @@ The ``database`` section defines database-specific configuration parameters, suc
12171218
| Default: false
12181219
| Environment variable: TT_DATABASE_USE_MVCC_ENGINE
12191220
1221+
.. _configuration_reference_failover:
1222+
1223+
failover
1224+
--------
1225+
1226+
The ``failover`` section defines parameters related to a :ref:`supervised failover <repl_supervised_failover>`.
1227+
1228+
.. NOTE::
1229+
1230+
``failover`` can be defined in the global :ref:`scope <configuration_scopes>` only.
1231+
1232+
- :ref:`failover.call_timeout <configuration_reference_failover_call_timeout>`
1233+
- :ref:`failover.connect_timeout <configuration_reference_failover_connect_timeout>`
1234+
- :ref:`failover.lease_interval <configuration_reference_failover_lease_interval>`
1235+
- :ref:`failover.probe_interval <configuration_reference_failover_probe_interval>`
1236+
- :ref:`failover.renew_interval <configuration_reference_failover_renew_interval>`
1237+
- :ref:`failover.stateboard <configuration_reference_failover_stateboard>`
1238+
1239+
- :ref:`failover.stateboard.keepalive_interval <configuration_reference_failover_stateboard_keepalive_interval>`
1240+
- :ref:`failover.stateboard.renew_interval <configuration_reference_failover_stateboard_renew_interval>`
1241+
1242+
.. _configuration_reference_failover_call_timeout:
1243+
1244+
.. confval:: failover.call_timeout
1245+
1246+
A call timeout (in seconds) for monitoring and failover requests to an instance.
1247+
1248+
| Type: number
1249+
| Default: 1
1250+
| Environment variable: TT_FAILOVER_CALL_TIMEOUT
1251+
1252+
.. _configuration_reference_failover_connect_timeout:
1253+
1254+
.. confval:: failover.connect_timeout
1255+
1256+
A connection timeout (in seconds) for monitoring and failover requests to an instance.
1257+
1258+
| Type: number
1259+
| Default: 1
1260+
| Environment variable: TT_FAILOVER_CONNECT_TIMEOUT
1261+
1262+
.. _configuration_reference_failover_lease_interval:
1263+
1264+
.. confval:: failover.lease_interval
1265+
1266+
A time interval (in seconds) that specifies how long an instance should be a leader without renew requests from a coordinator.
1267+
When this interval expires, the leader switches to read-only mode.
1268+
This action is performed by the instance itself and works even if there is no connectivity between the instance and the coordinator.
1269+
1270+
| Type: number
1271+
| Default: 30
1272+
| Environment variable: TT_FAILOVER_LEASE_INTERVAL
1273+
1274+
.. _configuration_reference_failover_probe_interval:
1275+
1276+
.. confval:: failover.probe_interval
1277+
1278+
A time interval (in seconds) that specifies how often a monitoring service of the failover coordinator polls an instance for its status.
1279+
1280+
| Type: number
1281+
| Default: 10
1282+
| Environment variable: TT_FAILOVER_PROBE_INTERVAL
1283+
1284+
.. _configuration_reference_failover_renew_interval:
1285+
1286+
.. confval:: failover.renew_interval
1287+
1288+
A time interval (in seconds) that specifies how often a failover coordinator sends read-write deadline renewals.
1289+
1290+
| Type: number
1291+
| Default: 10
1292+
| Environment variable: TT_FAILOVER_RENEW_INTERVAL
1293+
1294+
1295+
.. _configuration_reference_failover_stateboard:
1296+
1297+
failover.stateboard.*
1298+
~~~~~~~~~~~~~~~~~~~~~
1299+
1300+
``failover.stateboard.*`` options define configuration parameters related to maintaining the state of failover coordinators in a remote etcd-based storage.
1301+
1302+
See also: :ref:`supervised_failover_overview_fault_tolerance`
1303+
1304+
.. _configuration_reference_failover_stateboard_keepalive_interval:
1305+
1306+
.. confval:: failover.stateboard.keepalive_interval
1307+
1308+
A time interval (in seconds) that specifies how long a transient state information is stored and how fast a lock is expired.
1309+
1310+
.. NOTE::
1311+
1312+
``failover.stateboard.keepalive_interval`` should be smaller than :ref:`failover.lease_interval <configuration_reference_failover_lease_interval>`.
1313+
Otherwise, switching of a coordinator causes a replica set leader to go to read-only mode for some time.
1314+
1315+
| Type: number
1316+
| Default: 10
1317+
| Environment variable: TT_FAILOVER_STATEBOARD_KEEPALIVE_INTERVAL
1318+
1319+
.. _configuration_reference_failover_stateboard_renew_interval:
1320+
1321+
.. confval:: failover.stateboard.renew_interval
1322+
1323+
A time interval (in seconds) that specifies how often a failover coordinator writes its state information to etcd.
1324+
This option also specifies how often an active coordinator reads new commands from etcd.
1325+
1326+
| Type: number
1327+
| Default: 2
1328+
| Environment variable: TT_FAILOVER_STATEBOARD_RENEW_INTERVAL
1329+
12201330
.. _configuration_reference_fiber:
12211331

12221332
fiber
@@ -2932,12 +3042,10 @@ The ``replication`` section defines configuration parameters related to :ref:`re
29323042

29333043
- ``supervised`` (`Enterprise Edition <https://www.tarantool.io/compare/>`_ only)
29343044

2935-
Leadership in a replica set is controlled using an external failover agent.
3045+
Leadership in a replica set is controlled using an :ref:`external failover coordinator <repl_supervised_failover>`.
29363046

29373047
In the ``supervised`` mode, :ref:`database.mode <configuration_reference_database_mode>` and :ref:`<replicaset_name>.leader <configuration_reference_replicasets_name_leader>` shouldn't be set explicitly.
29383048

2939-
.. TODO: https://github.com/tarantool/enterprise_doc/issues/253
2940-
29413049
See also: :ref:`Replication tutorials <how-to-replication>`.
29423050

29433051
.. NOTE::

0 commit comments

Comments
 (0)