Which of these can be considered to monitor replication delay ? Redis_master_repl_offset, Redis_master_last_io_seconds_ago , Redis_slave_repl_offset
-
Please read the manual before asking questions. redis.io/commands/INFO. (last_io) and redis.io/topics/replication (offset).– JeroenFeb 16, 2016 at 13:12
-
How can i say according to the above mentioned parameters that there is a delay ?– karan sindwaniFeb 16, 2016 at 13:39
-
@Jeroen The given commands do not yield a replication-delay. What they do show is last-io-from-partner, which is not the same thing.– sysadmin1138 ♦Feb 16, 2016 at 13:42
-
You can monitor the repl_backlog_active (manual is in the config download.redis.io/redis-stable/redis.conf)– JeroenFeb 16, 2016 at 13:43
Add a comment
|
1 Answer
Given results from an INFO replication
command like this:
slave0:172.16.101.23,6380,online,424821
master_repl_offset:424827
You can tell that slave0
is behind master by 6. This is the difference between the master_repl_offset
and the offset value in the slave0
line, which is the last number in it. If you have multiple slaves, each will get their own line with their own offset value.
-
What does value indicate ? What can be the threshold of a warning value ? Feb 17, 2016 at 12:04
-
@karansindwani I believe the value there is
bytes
. I used small numbers here as an example, real ones would likely be very large. On our logstash redis instance, 1MB is a sign of pressure worthy of notice, but on an application-stack redis, even 20KB is considered slow. It depends, and only you can know what bad looks like.– sysadmin1138 ♦Feb 17, 2016 at 13:22 -
For me the output looks like this
slave0:ip=10.0.1.162,port=6379,state=online,offset=925994074541,lag=0
so I'm looking at offset?– radtekSep 28, 2017 at 23:40 -
1