SocketCluster / SocketCluster/socketcluster

Callbacks scale much more than async/await approach

Open
#590 2 comments 0 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

I had done some extensive testing, I had some observations ->

  • The older approach that socket cluster offered (v14.2) scales much better as compared to the new async/await approach. ( i had too many subs pubs every seconds, around 2k connects+disconnects and around 5k messages published every second)
    Refer to event loop added below
    v17

The event loop is not able to handle when we have around 30k average connections with the above mentioned condition, whereas same works amazingly well with 14.2 version.

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 reproducing the comparison between the v14.2 callback approach and the newer async/await approach under the reported load: about 30k connections, 2k connects/disconnects per second, and 5k published messages per second. Compare event-loop behavior and determine what changed; done requires an identified cause and a verified improvement against the v14.2 baseline.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, networking, performance
Issue type
Bug
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.