Problem/Motivation
While implementing Server-Sent Events (SSE) in a Drupal project, I encountered significant scalability issues.
These challenges turned out to be quite critical, as they could prevent server resources from being released properly (impacting the normal operation of the website).
Has there been any consideration or discussion around scaling SSE within Drupal?
In our projects, we eventually switched to a WebSocket-based approach, running a Node.js server dedicated to handling client communication.
This decision came after extensive testing and experimentation.
Disclaimer: I am the maintainer of Notification Server.
The move to a Node.js + WebSocket setup was made only after evaluating multiple configurations and load conditions.
Steps to reproduce
1. Set up a Drupal instance locally (e.g., using DDEV).
2. Open a page that establishes an SSE connection.
3. Open 10 such pages to simulate 10 simultaneous SSE connections.
4. In my tests, timeouts began occurring after around 8 concurrent connections, effectively making the site unresponsive.
Proposed resolution
- TODO
Remaining tasks
- TODO
User interface changes
- N/A
API changes
- TODO
Data model changes
- N/A
Comments
Comment #2
d34dman commentedComment #3
mogtofu33 commented