Finding · affects your reliability

Self-hosted WebSockets

Raw WebSocket connections pin each user to one server, so deploys drop them and load can't be rebalanced.

Why it matters

A WebSocket is a long-lived connection to one specific instance. Load balancers can't move it, every deploy disconnects it, and each instance ends up holding thousands of open sockets with their memory.

What it looks like

A WebSocket server inside the app process:

Before
const wss = new WebSocketServer({ server });
wss.on("connection", (socket) => { /* state lives on this instance */ });

How to fix it

  1. Use a managed realtime layer (API Gateway WebSockets, Ably, Pusher, Supabase Realtime), or
  2. Make reconnect and resume first-class, keep connection state outside the instance, and drain connections on deploy.

How Skeram detects it

Realtime connections the extraction finds are checked for a managed provider. Self-hosted WebSockets are flagged.

When it starts to hurt: A warning from about 1,000 monthly users, critical from about 10,000.

Every finding cites the file and line it came from, and scanning again after a fix shows it resolved in History. How the analysis works.

Related findings

Find it in your code

Skeram reads your repo, prices every model call from 100 to 100,000 users, and flags these patterns with the file and line.