To logging missed key data.

532 views
Skip to first unread message

Jinoos

unread,
May 12, 2014, 3:26:55 AM5/12/14
to redi...@googlegroups.com
Hi every redis users,

I'm finding a good way to see exact missed key data.

Actually, I'm building LRU cache cluster, and use Redis for cache storage. After then, I want to moniter Keys which are missed from DB.

I can see "
keyspace_misses" in result of INFO command, But it doesn't mean which key is. Please share a better idea for this.


Thanks
Jinoos

Josiah Carlson

unread,
May 12, 2014, 2:37:49 PM5/12/14
to redi...@googlegroups.com
Redis does not log information about key misses aside from the count. If you want additional functionality, you will need to either build it into your client, or you will need to modify Redis to offer the feature.

 - Josiah





--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Marc Gravell

unread,
May 12, 2014, 4:00:33 PM5/12/14
to redi...@googlegroups.com
Or write a Lua script that does a "get, and do something on a miss" - personally I'd suggest an appropriate "something" might be to publish an event, similar to the keyspace notification events.

Marc
--
Regards,

Marc

Jinoos Lee

unread,
May 12, 2014, 10:30:53 PM5/12/14
to redi...@googlegroups.com
Thanks Josiah and Marc for your response,


> Redis does not log information about key misses aside from the count. If you want additional functionality, you will need to either build it into your client, or you will need to modify Redis to offer the feature.

The system what I'm trying to build will serve to many of clients, and they may use general client library most of the time. So, It may not easy to put custom function each of the lilbraries unfortunatelly.


> Or write a Lua script that does a "get, and do something on a miss" - personally I'd suggest an appropriate "something" might be to publish an event, similar to the keyspace notification events.

I'm digging the "keyspace notification event", but the notification event seems not contain missing command. Would you please provide any example paper or instruction to me if passible? Sorry I'm not much familiar with Lua script, too. :(

Thanks
Jinoos

Jinoos Lee

unread,
May 14, 2014, 11:05:51 PM5/14/14
to redi...@googlegroups.com
Hi Josiah and Marc,

I have tried to implement logging miss keys base on redis-2.8.9 version.

  - https://github.com/jinoos/redis-2.8.9-misskeylog


It's pretty working well, and simply check by nc unix command as below.

  ]$ nc -U /tmp/redis.misskeylog.sock

In my case, this feature ls very useful to monitor what keys are missing in DB now.

Would you please check the concept and feature? Although the codes much ugly. I hope, Redis code contains this kind of feature, then I can avoid pay effort for patching every release myself. :D.


Thanks
Jinoos


fcig...@imallbrands.com

unread,
Apr 16, 2018, 1:52:40 AM4/16/18
to Redis DB
Hi Jinoosm
I've ported your change on version 4.0 in case anyone still need this change.


There is also a Docker automated build of version 4.0 on alpine here: https://hub.docker.com/r/lidio601/redis/
Reply all
Reply to author
Forward
0 new messages