personal / tool / archived
Centrifuge Load Test
Node script that spins up configurable numbers of Centrifuge WebSocket clients with JWT auth to load-test a chat channel with timed connects and messages.
- BPM
- 130
- GRADE
- B
- LEVEL
- 4
- RELEASES
- 0
- YEARS
- 2020–2020
A Thousand Fake Users
In August 2020 I spent an afternoon writing a single-file Node script to load test a Centrifuge WebSocket server. It connected a configurable number of clients, signed each one with its own JWT, and had them join a channel and chat on a timer.
You set the number of clients, the delay between connects, and how often each fake user posts, then watch what the server does. It was built to answer a question about a real-time backend, and making a fake crowd was the fastest way to get the answer.