Hacker News new | ask | show | jobs
by collingreen 433 days ago
Oof, what a headline to be top of hn the day after you implement websockets into a project.
2 comments

We've had a production app with them for over 10 years and it's generally great. The only thing to be aware of is this Chrome bug:

https://issuetracker.google.com/issues/362210027?pli=1

You can add a recurring ping/pong between the client/server so you can know with some recency that the connection has been lost. You shouldn't have to do that, but you probably want to until this bug is fixed.

60s heartbeat interval, job done.

We've got multiple internal apps using WebSockets in production, for years. I have to say I don't really get all the concern in the article about upgrading the connection - any decent backend framework should handle this for you without a problem.

Hacker News articles on new libraries generally live in the 1% of the 1%. For lots of websites, they don't need a web-socket because they are just doing CRUD. For the 1% doing live updates, web-sockets are great and straight-forward. For whatever specialised use case the article has, sure there's something even less well supported you can pivot to.

We use a much short heartbeat interval because our use case is for real time control and monitoring so our users need to know immediately if the connection is lost.
Websockets work great, don't worry too much about it.