nodejs-logreplay is a (very) simple Node.js application which parses the standard Apache access log and replays the requests, in real time, against a target server.
nodejs-logreplay was developed to assist in load testing web server(s) by replicating the same request pattern that production systems experience. This helps us determine how code modifications will perform in production before they are deployed.
Easy:
- Install Node.js and the following packages from npm:
- lazy
- konphyg
-
Clone this repository onto the server you wish to launch your load test requests from
-
Copy the provided configuration file
config/example.json.dist
toconfig/<something>.json
and edit
source
: Full path to the access log you want to replayspeedupFactor
: Speed at which log is replayed (ie: 2 = twice normal speed)target
: Specifies the target of the load testinghost
: hostname of target machineport
: target port (for SSL, only 443 is supported)
-
Run the profile you created (the
<something>
you chose in #3)```node replay.js <something>```
This code is provided AS-IS, with no warranty (explicit or implied) and has not been vetted or tested for deployment in a production environment. Use of this code at your own risk.
Released under Public Domain. Associated libraries carry their own individual licenses where applicable.