Hacker News new | ask | show | jobs
by jcheng 1588 days ago
> Browsers also limit the number of websocket connections

True but the limit for websockets these days is in the hundreds, as opposed to 6 for regular HTTP requests.

1 comments

https://stackoverflow.com/questions/26003756/is-there-a-limi...

It appears to be 30 per domain, not “hundreds”, at least as of the time this answer was written. I didn’t see anything more recent that contradicted this.

In practice, this is unlikely to be problematic unless you’re using multiple websockets per page, but the limit of 6 TCP connections is even less likely to be a problem if you’re using HTTP/2, since those will be shared across tabs, which isn’t the case for the dedicated connection used for each websocket.

It’s 255 for Chrome and has been since 2015, 200 for Firefox since longer than that.

https://chromium.googlesource.com/chromium/src/net/+/259a070...

Agree that it should be much less of a problem with HTTP/2 than HTTP/1.1.