master_last_io_seconds_ago variable

325 views
Skip to first unread message

thanjo valerio

unread,
Sep 21, 2011, 6:49:36 PM9/21/11
to Redis DB
Hi,

Can someone explain how this variable works:
master_last_io_seconds_ago.

Salvatore Sanfilippo

unread,
Sep 22, 2011, 3:49:46 AM9/22/11
to redi...@googlegroups.com

Hi,

this field reports the number of seconds elapsed since a Redis slave
instance received some data from the master (including a ping). It is
useful to understand if the master and slave instances are chatting in
the right way.
Note that even if there are no writes in the master this field should
always report a small number of seconds since the master actively
pings the slave in order to make sure the link is ok.

Since Redis 2.4 there is another related field that is
"master_link_down_since_seconds".
This reports the number of seconds since the slave is not connected to
the master.

This field is interesting to create failover systems where a slave is
promoted to master if there are link problems: probably the system may
avoid promoting a slave that is disconnected from the master since
hours.

Cheers,
Salvatore

>
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

--
Salvatore 'antirez' Sanfilippo
open source developer - VMware

http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

thanjo valerio

unread,
Sep 22, 2011, 4:08:31 AM9/22/11
to Redis DB
Thanks Salvatore. Is frequent value is ranging from 3-10. is it a good
indication or I have something to worry about?

On Sep 22, 3:49 pm, Salvatore Sanfilippo <anti...@gmail.com> wrote:
> > For more options, visit this group athttp://groups.google.com/group/redis-db?hl=en.

Salvatore Sanfilippo

unread,
Sep 22, 2011, 4:18:49 AM9/22/11
to redi...@googlegroups.com
On Thu, Sep 22, 2011 at 10:08 AM, thanjo valerio <jtva...@gmail.com> wrote:
> Thanks Salvatore. Is frequent value is ranging from 3-10. is it a good
> indication or I have something to worry about?

That's perfect, master pings Redis slaves every 10 seconds.
If there is a problem the master recognizes it and disconnects the
instance, so don't have to worry about that, it is automatic and
you'll surely notice that the master is disconnected from the slave.

If you had more write traffic on master that value would be near to 0
almost always.

Cheers,
Salvatore

> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

Reply all
Reply to author
Forward
0 new messages