Redis › Redis CLI & Basic Commands
How would you use redis-cli's built-in monitoring and debugging features to troubleshoot a live performance issue on a production Redis instance?
AdvancedAnswer
You could use the MONITOR command to see a live stream of every command being processed by the server, though carefully since it adds overhead and should be used briefly, the SLOWLOG command to review commands that have taken longer than a configured threshold to execute, and the LATENCY tool to identify specific sources of delay within Redis's internal operations.
redis-cli slowlog get 10
redis-cli latency history commandReal-world example A team investigating intermittent slow responses uses SLOWLOG to identify a specific command pattern that was consistently taking much longer than expected, quickly pinpointing the root cause of their performance issue.