Redis › Redis Performance Tuning & Benchmarking

How do you use the redis-cli --latency option to measure the round trip time between your client and a Redis server?

Intermediate

Answer

You run redis-cli with the --latency flag, which continuously sends simple PING commands to the server and reports the minimum, maximum, and average response times, giving you a straightforward way to check basic network and server responsiveness before diving into more complex performance investigations.
redis-cli --latency -h your_redis_server
Real-world example A team investigating whether a performance issue is related to network latency or actual Redis processing time runs redis-cli with the latency flag, quickly ruling out basic network connectivity as the source of their problem.

Common follow-ups: What is considered a healthy latency range for a well configured Redis instance?;How does this simple latency test differ from the more detailed LATENCY command family?