Skip to content

Load-test the public instance and document capacity #3

Description

@7akob

The public instance at skood.jkb.app runs on a small box and has never been load-tested. The README currently hedges with "if it's busy, self-host". Let's replace the hedge with numbers.

What to measure

  • Concurrent WebSocket connections and rooms before latency or errors degrade. Note that the transport is WebSocket only, so every client holds a persistent socket and there is no polling fallback to soak up overflow
  • Memory per room and per socket (rooms are a single in-memory object in server.js)
  • Broadcast fan-out cost in big rooms, since every play, pause and seek hits every socket in the room

A simple harness would do: N socket.io-client connections joining M rooms, each emitting a play or pause every few seconds. Even rough numbers from the actual VPS help.

What to do with the numbers

  • Document real capacity in the README's hosted-instance note, replacing the hedge
  • Consider a MAX_ROOMS env guard: when the cap is hit, new join attempts get a friendly system message saying the instance is full and self-hosting is two commands, instead of everyone degrading together
  • Rooms are ephemeral by design and a restart wipes them; if the instance restarts often, note that in the README too

Not in scope

Horizontal scaling and Redis adapters. A second instance would split rooms, and it cuts against the tiny-by-design philosophy. If one box can't hold the load, the answer is more self-hosting, not more infrastructure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions