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

Fix: no DB calls in message websocket #447

Merged
merged 5 commits into from
Jun 14, 2023
Merged

Conversation

odesenfans
Copy link
Contributor

Problem: the websocket uses the DB to apply filters to processed messages to determine whether they must be sent on the websocket. This leads to an exhaustion of DB connections when many websockets are open with the same filters.

Solution: send the full message on the RabbitMQ topic and apply filters in Python instead of using a DB query.

Problem: the websocket uses the DB to apply filters to processed
messages to determine whether they must be sent on the websocket.
This leads to an exhaustion of DB connections when many websockets
are open with the same filters.

Solution: send the full message on the RabbitMQ topic and apply
filters in Python instead of using a DB query.
@odesenfans odesenfans changed the base branch from master to dev June 12, 2023 16:11
@odesenfans odesenfans marked this pull request as ready for review June 12, 2023 16:11
src/aleph/schemas/api/messages.py Show resolved Hide resolved
src/aleph/schemas/api/messages.py Show resolved Hide resolved
src/aleph/web/controllers/messages.py Show resolved Hide resolved
@odesenfans odesenfans merged commit 85b283f into dev Jun 14, 2023
@odesenfans odesenfans deleted the od-websocket-avoid-db-calls branch June 14, 2023 14:08
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