You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/concepts/configuration.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ There are two approaches to configuring Tarantool:
11
11
* *Since version 3.0*: In the YAML format.
12
12
13
13
YAML configuration allows you to provide the full cluster topology and specify all configuration options.
14
-
You can use local configuration in a YAML file for each instance or store configuration data in one reliable place using :ref:`etcd<configuration_etcd_overview>`.
14
+
You can use local configuration in a YAML file for each instance or store configuration data in a reliable :ref:`centralized storage<configuration_etcd_overview>`.
15
15
16
16
* *In version 2.11 and earlier*: :ref:`In code <configuration_code>` using the ``box.cfg`` API.
17
17
@@ -335,7 +335,7 @@ Centralized configuration
335
335
:end-before: ee_note_centralized_config_end
336
336
337
337
338
-
Tarantool enables you to store configuration data in one reliable place, for example, a Tarantool or etcd-based configuration storage.
338
+
Tarantool enables you to store configuration data in one place using a Tarantool or etcd-based storage.
**Examples on GitHub**: `centralized_config <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/centralized_config/>`_
16
16
17
-
Tarantool enables you to store configuration data in one place using a Tarantool or etcd-based storage.
17
+
Tarantool enables you to store a cluster's configuration in one reliable place using a Tarantool or etcd-based storage:
18
+
19
+
- A Tarantool-based configuration storage is a replica set that stores a cluster's configuration in :ref:`synchronous <repl_sync>` spaces.
20
+
- `etcd <https://etcd.io/>`__ is a distributed key-value storage for any type of critical data used by distributed systems.
21
+
18
22
With a :ref:`local YAML configuration <configuration_file>`, you need to make sure that all cluster instances use identical configuration files:
19
23
24
+
|
25
+
20
26
.. image:: tarantool_config_local.png
21
27
:align:left
22
28
:width:500
23
29
:alt:Local configuration file
24
30
31
+
|
32
+
25
33
Using a centralized configuration storage, all instances get the actual configuration from one place:
26
34
35
+
|
36
+
27
37
.. image:: tarantool_config_centralized.png
28
38
:align:left
29
39
:width:500
30
40
:alt:Centralized configuration storage
31
41
42
+
|
43
+
32
44
This topic describes how to set up a configuration storage, publish a cluster configuration to this storage, and use this configuration for all cluster instances.
33
45
34
46
@@ -43,7 +55,6 @@ Setting up a configuration storage
43
55
Tarantool-based storage
44
56
~~~~~~~~~~~~~~~~~~~~~~~
45
57
46
-
A Tarantool-based storage is a replica set that stores configuration data in :ref:`synchronous <repl_sync>` spaces.
47
58
To make a replica set act as a configuration storage, use the built-in ``config.storage`` :ref:`role <configuration_reference_roles_options>`.
48
59
49
60
@@ -117,46 +128,6 @@ Learn more from the :ref:`Starting and stopping instances <admin-start_stop_inst
You can find the full example here: `config_storage <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/centralized_config/instances.enabled/config_storage>`_.
The :ref:`config module <config-module>` provides the API for interacting with a Tarantool-based configuration storage.
203
+
The example below shows how to read a configuration stored in the ``source.yaml`` file using the :ref:`fio module <fio-module>` API and put this configuration by the ``/myapp/config/all`` path:
Learn more from the :ref:`config_storage_api_reference` section.
212
+
213
+
.. NOTE::
214
+
215
+
The ``net.box module`` provides the ability to monitor configuration updates by watching path or prefix changes. Learn more in :ref:`conn:watch() <conn-watch>`.
Copy file name to clipboardExpand all lines: doc/reference/reference_lua/net_box.rst
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -574,7 +574,7 @@ Below is a list of all ``net.box`` functions.
574
574
In this case, the watcher remains registered.
575
575
It is okay to discard the result of ``watch`` function if the watcher will never be unregistered.
576
576
577
-
**Example:**
577
+
**Example 1:**
578
578
579
579
Server:
580
580
@@ -601,6 +601,18 @@ Below is a list of all ``net.box`` functions.
601
601
602
602
w:unregister()
603
603
604
+
**Example 2:**
605
+
606
+
The ``net.box module`` provides the ability to monitor :ref:`updates of a configuration <centralized_configuration_storage_publish_config_tt>` stored in a Tarantool-based configuration storage by watching path or prefix changes.
607
+
In the example below, :ref:`conn:watch() <conn-watch>` is used to monitor updates of a configuration stored by the ``/myapp/config/all`` path:
You can find the full example here: `config_storage <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/centralized_config/instances.enabled/config_storage>`_.
0 commit comments