Hacker News new | ask | show | jobs
by ricardobeat 1591 days ago
Mind expanding on your experience and how are websockets more reliable than SSE? one of the main benefits of SSE is reliability from running on plain HTTP.
1 comments

I've done both. One big one is Sse connections will eventually time out, and you WILL have to renegotiate, so there will be a huge latency spike on those events. They are easier in elixir than most pls, but honestly if you're using elixir, you might as well use phoenix's builtin we socket support.
How is this different from websockets? They will eventually close for various reasons, sometimes in not obvious ways.
Not if you send "noop" messages.
In my experience, sse times out way more than ws, even if you are always sending (I was streaming jpegs using sse).
I think it might be your ISP. For example one of my ISPs cut off my SSH connections no matter what I do. They simply dislike hanging SSH connections.

It's just random that your ISP like WebSockets more than long HTTP responses, and it can change in a heartbeat and for most people it will be different. As I said before 99,6% successful networking is an unheard of number for real-time multiplayer games.

I only care about that number, until you proove with hard stats and 350.000 real users from everywhere on the planet that WebSocket has 99,7% success rate, I'm not even going to flinch.

It's not random. Having limited timeouts for http is policy set at often time several layers to prevent certain types of security regressions.
Ok, what security regressions?