SocketCluster / SocketCluster/socketcluster

Optimize for large number of simultaneous new connections

Open
#337 11 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.2k
Forks
318
PR merge metrics
No merged PRs in 30d

Description

If a large number of users attempt to connect at the same time, it would be good if there was a way to delay some handshakes in order to spread out the load evenly over a longer period of time to avoid overwhelming the Node.js event loop.

This could be a plugin (e.g. which delays the next() invocation in MIDDLEWARE_HANDSHAKE) or it could be done internally by SC based on an option passed to the main SocketCluster constructor.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the handshake middleware, especially MIDDLEWARE_HANDSHAKE and the main SocketCluster constructor mentioned in the issue, and review how Node.js connection work reaches the event loop. The issue leaves the implementation approach open; done would require a defined, maintainable way to spread simultaneous handshakes without overwhelming the event loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.