How do i measure redis replication delay?
9,520
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.
Related videos on Youtube
Author by
karan sindwani
I am a data science enthusiast and will finish my grad till May 2016. I am a newbie with python and like solving problems. Currently working on text analytics
Updated on September 18, 2022Comments
-
karan sindwani over 1 year
Which of these can be considered to monitor replication delay ? Redis_master_repl_offset, Redis_master_last_io_seconds_ago , Redis_slave_repl_offset
-
karan sindwani over 8 yearsWhat does value indicate ? What can be the threshold of a warning value ?
-
Deb over 8 years@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. -
radtek over 6 yearsFor 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? -
Deb over 6 years@radtek Yes, offset.