How to do it...

The first action is to do the baseline latency measurement:

  1. Before you put the Redis service online, run an intrinsic-latency test on the host where the Redis Server is running:
$ bin/redis-cli --intrinsic-latency 60
Max latency so far: 1 microseconds.
Max latency so far: 8 microseconds.
Max latency so far: 21 microseconds.
Max latency so far: 29 microseconds.
Max latency so far: 38 microseconds.
Max latency so far: 39 microseconds.
Max latency so far: 40 microseconds.
Max latency so far: 44 microseconds.
Max latency so far: 56 microseconds.
    
1867256801 total runs (avg latency: 0.0321 microseconds / 32.13 nanoseconds per run).
Worst run took 1743x longer than the average latency.  
  1. Another form of latency you should measure ...

Get Redis 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.