|
1 | 1 | .. _replication-monitoring:
|
2 | 2 |
|
3 |
| -================================================================================ |
4 | 3 | Monitoring a replica set
|
5 |
| -================================================================================ |
| 4 | +======================== |
6 | 5 |
|
7 | 6 | To learn what instances belong in the replica set, and obtain statistics for all
|
8 | 7 | these instances, issue a :doc:`/reference/reference_lua/box_info/replication` request:
|
9 | 8 |
|
10 |
| -.. code-block:: tarantoolsession |
| 9 | +.. code-block:: tarantoolsession |
11 | 10 |
|
12 | 11 | tarantool> box.info.replication
|
13 | 12 | ---
|
@@ -43,36 +42,36 @@ these instances, issue a :doc:`/reference/reference_lua/box_info/replication` re
|
43 | 42 | This report is for a master-master replica set of three instances, each having
|
44 | 43 | its own instance id, UUID and log sequence number.
|
45 | 44 |
|
46 |
| -.. image:: mm-3m-mesh.svg |
| 45 | +.. image:: mm-3m-mesh.svg |
47 | 46 | :align: center
|
48 | 47 |
|
49 | 48 | The request was issued at master #1, and the reply includes statistics for the
|
50 | 49 | other two masters, given in regard to master #1.
|
51 | 50 |
|
52 | 51 | The primary indicators of replication health are:
|
53 | 52 |
|
54 |
| -.. _heartbeat: |
| 53 | +.. _heartbeat: |
55 | 54 |
|
56 |
| -* :ref:`idle <box_info_replication_upstream_idle>`, the time (in seconds) since |
57 |
| - the instance received the last event from a master. |
| 55 | +* :ref:`idle <box_info_replication_upstream_idle>`, the time (in seconds) since |
| 56 | + the instance received the last event from a master. |
58 | 57 |
|
59 |
| - A master sends heartbeat messages to a replica every second, and the master |
60 |
| - is programmed to disconnect if it does not see acknowledgments of the heartbeat messages |
61 |
| - within :ref:`replication_timeout <cfg_replication-replication_timeout>` * 4 |
62 |
| - seconds. |
| 58 | + If the master has no updates to send to the replicas, it sends heartbeat messages |
| 59 | + every :ref:`replication_timeout <cfg_replication-replication_timeout>` seconds. The master |
| 60 | + is programmed to disconnect if it does not see acknowledgments of the heartbeat messages |
| 61 | + within ``replication_timeout`` * 4 seconds. |
63 | 62 |
|
64 |
| - Therefore, in a healthy replication setup, ``idle`` should never exceed |
65 |
| - ``replication_timeout``: if it does, either the replication is lagging |
66 |
| - seriously behind, because the master is running ahead of the replica, or the |
67 |
| - network link between the instances is down. |
| 63 | + Therefore, in a healthy replication setup, ``idle`` should never exceed |
| 64 | + ``replication_timeout``: if it does, either the replication is lagging |
| 65 | + seriously behind, because the master is running ahead of the replica, or the |
| 66 | + network link between the instances is down. |
68 | 67 |
|
69 |
| -* :ref:`lag <box_info_replication_upstream_lag>`, the time difference between |
70 |
| - the local time at the instance, recorded when the event was received, and the |
71 |
| - local time at another master recorded when the event was written to the |
72 |
| - :ref:`write ahead log <internals-wal>` on that master. |
| 68 | +* :ref:`lag <box_info_replication_upstream_lag>`, the time difference between |
| 69 | + the local time at the instance, recorded when the event was received, and the |
| 70 | + local time at another master recorded when the event was written to the |
| 71 | + :ref:`write ahead log <internals-wal>` on that master. |
73 | 72 |
|
74 |
| - Since the ``lag`` calculation uses the operating system clocks from two different |
75 |
| - machines, do not be surprised if it’s negative: a time drift may lead to the |
76 |
| - remote master clock being consistently behind the local instance's clock. |
| 73 | + Since the ``lag`` calculation uses the operating system clocks from two different |
| 74 | + machines, do not be surprised if it’s negative: a time drift may lead to the |
| 75 | + remote master clock being consistently behind the local instance's clock. |
77 | 76 |
|
78 |
| - For multi-master configurations, ``lag`` is the maximal lag. |
| 77 | + For multi-master configurations, ``lag`` is the maximal lag. |
0 commit comments