Skip to content

EventSource vs maximum number of HTTP connections per domain #382

@shamrin

Description

@shamrin

EventSource, currently listed as "use, with fallback", has a hard-to-debug problem when using it in real life. Every additional EventSource connection counts against maximum number of HTTP connections per domain. This limit is usually very low. In contrast, WebSocket connection limit is usually not a problem. In my experience this problem could be hard to debug, because you would only notice it when you have a couple of tabs opened. After a certain limit, additional tabs would fail to work properly.

I was personally burned by this problem, when I've decided to ignore WebSockets and use only EventSource in a project. And I'm not the only one. FastMail had to implement inter-tab communication via localStorage to fix this problem. And their solution doesn't work in all cases. E.g. Safari in private mode doesn't allow localStorage.

What do you think? Does it make sense to warn about this problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions