Files
upstream-mirror b352a9a30d
Some checks failed
test / Lint (push) Failing after 3s
test / Test with Go 1.26.8 (push) Failing after 2s
snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:17:21 +05:00

716 B

A simple script which demonstrates benchmarking Centrifugo with k6. You can use it as a starting point.

It connects to Centrifugo with JWT per user, subscribes to the test channel, waits some time and exits.

Running test

Run Centrifugo with config like this:

{
  "token_hmac_secret_key": "secret",
  "admin": true,
  "admin_password": "password",
  "admin_secret": "0453661f-8b95-4f75-ab49-cfb2e3b2024f",
  "api_key": "7d8cee29-f5c0-419e-ae70-760767b21f8e",
  "allow_subscribe_for_client": true,
  "allowed_origins": []
}

Then:

k6 run benchmark.js

Make sure your system is tuned for dealing with many connections.