question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReconnectingWebSocket much slower than WebSocket

See original GitHub issue

I have a simple app for asynchronous message passing, using websockets (React + Django).

If I use WebSocket, the connection opens almost instantaneously upon loading the page, whereas if I switch to ReconnectingWebSocket (that’s the only change in the code and using import ReconnectingWebSocket from 'reconnecting-websocket'; ), it takes around 3-5 seconds.

Is the reason behind this delay understood?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
quentinus95commented, Oct 22, 2018

it would indeed be great to have the first attempt to be immediate!

12reactions
quentinus95commented, Nov 14, 2018

I’ve just opened a pull request here: #94

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slow HTTP vs Web Sockets - Resource utilization
A WebSocket and a "slow" HTTP connection both use an open connection. The difference is in expectations of the server design. Typical HTTP...
Read more >
Snatchbot too slow
I am getting "reconnecting-websocket.js:231 WebSocket connection to 'wss://es.snatchbot.me/bot/ws' failed: WebSocket is closed before the connection is ...
Read more >
Server-Sent Events: the alternative to WebSockets you should ...
WebSockets are the most used technology for real-time web apps. However, Server Sent Events (SSE) are a simpler alternative that is often ...
Read more >
WebSocket server stops sending data to client after a time
What we typically refer to as "slow consumer", what could be happening is the "ping" messages are being sent out in the expected...
Read more >
reconnecting-websocket - npm
WebSocket that will automatically reconnect if the connection is closed. Features. WebSocket API compatible (same interface, Level0 and Level2 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found