Traffic Dump Plugin


Traffic Dump captures session traffic and writes to a replay file tests/tools/traffic-replay/replay_schema.json for each captured session. It then can be used to replay traffic for testing purpose.

Plugin Configuration

  • Traffic Dump is a global plugin and is configured via plugin.config.
    --logdir <path_to_dump>

    (required, default:empty/unused) - specifies the directory for writing all dump files. If path is relative, it is relative to the Traffic Server directory. The plugin will use first three characters of client ip to create subdirs in an attempt to spread dumps evenly and avoid too many files in a single directory.

    --sample <N>

    (optional, default:1000) - specifies the sampling ratio N. Traffic Dump will capture every one out of N sessions. This ratio can also be changed via traffic_ctl without restarting ATS.

  • traffic_ctl command.

    traffic_ctl plugin msg traffic_dump.sample N - changes the sampling ratio N as mentioned above.

Replay Format

This format contains traffic data including: * Each session and transactions in the session. * Timestamps. * The four headers (ua request, proxy request, origin server response, proxy response). * The protocol stack for the user agent. * The transaction count for the outbound session. * The content block sizes. * See schema here: tests/tools/traffic-replay/replay_schema.json