Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSE Scalability #7382

Merged
merged 1 commit into from
Sep 28, 2023
Merged

SSE Scalability #7382

merged 1 commit into from
Sep 28, 2023

Conversation

kobergj
Copy link
Collaborator

@kobergj kobergj commented Sep 28, 2023

There is a technical issue when running multiple sse service instances.

Consider running two sse instances A and B. When calling /sse endpoint you will be connected to one of them, let's say A. But when an event happens only one of the services will get it, because they are both in the same consumer group. If service B gets the event it will not be able to send a message to the client because the sse library we are using is storing connections in memory (which makes sense because there is no need to persist them).

This PR adds unique consumer groups to each sse service. This way all services will get all events and can therefore always transmit the message to the client.

Signed-off-by: jkoberg <jkoberg@owncloud.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@kobergj kobergj merged commit c409859 into owncloud:master Sep 28, 2023
2 checks passed
@kobergj kobergj deleted the sse-scalability branch September 28, 2023 14:53
ownclouders pushed a commit that referenced this pull request Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants