SocketCluster / SocketCluster/socketcluster
ping requests are sent even when traffic is ongoing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 318
- PR merge metrics
- No merged PRs in 30d
Description
socketcluster would send ping requests (and expect responses in time) even when traffic is ongoing on a connection. In general, ping keep-alive packets have two purposes:
- to check whether the peer is still there, e.g. to check that he has not dropped / crashed / disconnected from the network
- to keep the state in stateful firewalls
so, it does not make sense to send keep-alive packets when other traffic is being transmitted over the connection. It only makes sense when the connection is otherwise idle. From https://en.wikipedia.org/wiki/Keepalive:
Typically TCP Keepalives are sent every 45 or 60 seconds on an idle TCP connection
On top of being useless, the behavior can cause disconnects due to bogus ping timeouts when heavy traffic is being transmitted - the ping packets could get delayed beyond pingTimeout if lots of data is being sent/received.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing SocketCluster's ping and keep-alive handling, then reproduce a connection under sustained traffic to observe ping timing and timeout behavior. The change is done when keep-alive pings are sent only for otherwise idle connections and active traffic cannot cause bogus ping timeouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100