NOTE

1.8 Analyzing Redis with Wireshark

Capture a local Redis command with Wireshark and inspect its RESP request and response.

Redis / CacheCreated Updated 1 min readhistorical

This is a historical learning note and may contain outdated or incomplete understanding.

  1. Select the localhost interface.
  2. Filter for port 6379.
  3. Send a command with redis-cli.
incr example
  1. Follow the stream.
  2. Analyze the packet.
.*2 # Redis commands are sent as arrays; here this means the command has two arguments
$4 # The first argument is a string with length 4
incr # Content of the first argument
$7 # The second argument is a string with length 7
example # Content of the second argument
:2 # Return value from redis-server: 2

Discussion

Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub