Custom Load-Testing Tool built on wrk Lua Scripting
Build a reusable HTTP load-testing toolkit using wrk's embedded Lua scripting to generate realistic multi-endpoint traffic patterns, dynamic auth tokens, and custom metrics aggregation. Learners practice writing Lua request/response hooks for a high-performance C benchmarking tool and analyzing latency distributions.
- Estimate
- ~9.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
wrk · Lua
Project roadmap
- 01
Set up wrk and baseline script
~1hInstall wrk and write a minimal Lua script overriding the request() function.
- 02
Model multi-endpoint traffic
~2hWrite logic to randomly select from a weighted list of endpoints and HTTP methods per request.
- 03
Handle dynamic authentication
~2hFetch and refresh an auth token during setup() and attach it to each request's headers.
- 04
Aggregate custom metrics
~2.5hUse the response() callback to record per-endpoint latency and status codes into Lua tables.
- 05
Generate a summary report
~2hUse the done() callback to compute and print percentile latencies and error rates per endpoint.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack