I have a system of multiple machines, each running a redis server which contains unique objects. A remote client can access each of these servers and read the objects.
I’m wondering to how to measure the latency of a remote read? Can I use Jedis to do it?
2
Answers
One of the tool you usually get when you install Redis, is redis-benchmark.
Running a very simple test e.g.
redis-benchmark -n 100000
will get you a very detailed report on the latency.Here is a snippet of such a report:
Since I’m interested in the latency of each and every read, I have found SLOWLOG to be useful:
https://redis.io/commands/slowlog
It contains the timestamp and the time it took to process the command.