Performance: Broadcasting messages
MEDIUM IMPACT
Broadcasting messages affects the responsiveness and scalability of real-time features by impacting server load and network traffic.
server.emit('update', data);for (const client of clients) { client.emit('update', data); }
| Pattern | Server Event Loop | Network Calls | Client Handling | Verdict |
|---|---|---|---|---|
| Per-client emit | High (N emits) | High (N sends) | Normal | [X] Bad |
| Server broadcast emit | Low (1 emit) | Low (1 send) | Normal | [OK] Good |