buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
https://goreplay.org
Other
18.54k stars 13 forks source link

Recorded latency for responses is much higher than real #547

Open mgtriffid opened 6 years ago

mgtriffid commented 6 years ago

Environment: Linux 4.4.0-112-generic (Xubuntu 16.04 LTS) GoReplay 0.16.1 What I do? Run some small HTTP server locally on 4567 port Run GoReplay with gor --input-raw-track-response --input-raw :4567 --output-stdout Call localhost:4567 from browser Stare at browser console and GoReplay stdout What I expect? Latency in GoReplay stdout in nanoseconds is close to what I see in browser What I see instead? Latency in GoReplay stdout is high, like 511125014, 1252538137, i.e. 511 ms and 1253ms, while in browser it's 22ms and 18ms.

Could somebody please help?

pparth commented 6 years ago
buger commented 6 years ago

Apologies for the delay!

I made some work on this and maybe found the cause, see this PR https://github.com/buger/goreplay/pull/549

It will be great if you can test these binaries: gor_0.17.PRE_mac.tar.gz gor_0.17.PRE_x64.tar.gz

mgtriffid commented 6 years ago

@buger , I've tried this binary you provided, and it works like a charm, latencies are totally sane. Thanks a lot!