Skip to content

Update description of replication lag/idle #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
locker opened this issue Dec 11, 2017 · 1 comment
Closed

Update description of replication lag/idle #355

locker opened this issue Dec 11, 2017 · 1 comment
Assignees

Comments

@locker
Copy link
Member

locker commented Dec 11, 2017

Since commit tarantool/tarantool@10e11e9 replication lag and idle statistics are updated even if the master is idle. This is done by sending "heartbeat" messages every box.cfg.replication_timeout seconds (see tarantool/tarantool#2976). Please update the documentation accordingly.

A proposal by @kostja:

The primary indicators of replication health are idle and lag parameters:
idle is the time since this replica received the last event from a master.
lag is the time difference between the local time at the replica, recorded when the event was received, and the local time at the master recorded when the event was written to the write ahead log on the master. Since lag calculation uses operating system clock from two different machines, don’t be surprised if it’s negative: a time drift may lead to the master clock being consistently behind the replica clock.

Idle is the primary indicator of replication health. A replica sends heartbeat messages to the master every second, and the master is programmed to reconnect automatically if it doesn’t see heartbeat messages more often than replication_reconnect_interval seconds. Therefore, in a healthy replication setup, idle should never exceed replication_reconnect_interval: if it does, either your replication is lagging seriously behind, because the master is running ahead of the replica, or the network link between the instances is down.

@lenkis
Copy link
Contributor

lenkis commented Dec 11, 2017

closed with commit 3854753

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants