- Download K6
brew install k6
- Install deps
pnpm install
- Build and serve the app
pnpm build && pnpm serve
- Run K6 load test in a separate terminal tab
k6 run load-test.js
- Curl the server periodically in a separate terminal tab
curl -o /dev/null -s -w "Total time: %{time_total}s\n" http://localhost:6173/test/
As K6 increases the number of concurrent users, the server starts to slow down dramatically.
When you curl the server, on the server log, you will see the time it took to render the app.
As the concurrent users increase, this app render time stays low. But the server response increases dramatically.
tl;dr: as the concurrent users increase, the app stays fast, but the server response time increases.
The server response time should stay low, even as the concurrent users increase.