Save and replay from files
Job: record production HTTP to disk, then replay it later without touching prod again.
sudo gor --input-raw :8080 --output-file requests.gor
gor --input-file requests.gor --output-http="http://staging.example.com" Replay preserves original gaps between requests unless you apply a percent limiter on --input-file (that speeds up or slows down instead of dropping).
Chunks and append
Default: each flush goes to a new indexed path. --output-file-append appends into one file per name.
# 20140608_0.log, 20140608_1.log, ...
gor --input-raw :80 --output-file %Y%m%d.log
# single file per day
gor --input-raw :80 --output-file %Y%m%d.log --output-file-append Date tokens: %Y %m %d %H %M %S. Default name pattern when using those tokens is hourly (%Y%m%d%H) if you rely on the built-in helpers.
--output-file-size-limit— chunk size (default 32mb; k/m/g suffixes).--output-file-queue-limit— chunk queue length (default 256).--output-file-max-size-limit— max output file size (default 1TB).--output-file-flush-interval— force flush (default 1s).--output-file-buffer— temp dir for the current buffer (default/tmp). Used heavily for S3 in PRO.
.gz in the path enables gzip on write and read.
sudo gor --input-raw :80 --output-file /var/log/gor/%Y-%m-%d.gz --output-file-size-limit 256m --output-file-queue-limit 0 Reading
--input-file accepts a glob; files are replayed in lexicographic order. --input-file-loop restarts when the set finishes. --input-file-dry-run reports expected duration without sending. --input-file-read-depth (default 100) is the in-memory reorder buffer. --input-file-max-wait caps idle time between records. --input-file-exit-delay waits after the last record so responses can finish.
gor --input-file 'logs-2016-05-*' --output-http="http://staging.example.com"
gor --input-file requests.gor --input-file-loop --output-http="http://staging.example.com"
gor --input-file requests.gor --input-file-dry-run --output-null File format
Plain HTTP plus a meta line (payload type, request id, timestamp). Records are separated by a unique banner line. Payload types: 1 request, 2 origin response, 3 replayed response. You can grep it; do not let an editor change newlines.
Faster than realtime
gor --input-file "requests.gor|200%" --output-http="http://staging.example.com" More: load testing. S3 paths are PRO: PRO.
Replay options: replaying.