Hacker News new | ask | show | jobs
by austin-cheney 1114 days ago
I wrote my own web socket library so that I can integrate authentication into the connection handshake. Since I have my own library I also wrote conventions to automatically attempt reconnects in 15 second intervals when the connection drops.

https://github.com/prettydiff/share-file-systems/blob/master...

3 comments

You may want to consider adding a random jitter and backoff to the reconnect logic. Otherwise, if the server goes down and comes back up, all clients will reconnect at the same time and overload the server.
This is great! The whole project is useful. Thanks!
Look into exponential backoff with jitter. 15 second retry logic sounds like bad news.