Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Conversation

@elimelt
Copy link
Contributor

@elimelt elimelt commented Apr 6, 2025

Added a connection pooler since I was hitting the connection limit resulting in dropped requests. Things were working nicely, until the thread safety of pika came into play. Thus, I added add_callback_threadsafe in, as well as a few more changes to properly work with the blocking connection in a multithreaded environment.

With very spammy users (req every .1-.5 sec), we can handle a pretty high throughput without dropping any requests now. For reference, I wasn't able to get above 30 RPS beforehand

Screenshot 2025-04-05 at 9 09 00 PM

With less spammy users (req every 1-5 sec), but more overall, we start to run into issues

Screenshot 2025-04-05 at 9 51 49 PM

@elimelt elimelt requested a review from Copilot April 6, 2025 05:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 11 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • Dockerfile: Language not supported
  • Dockerfile.manager: Language not supported
  • requirements-dev.txt: Language not supported
  • requirements-rabbit.txt: Language not supported
  • requirements-server.txt: Language not supported
Comments suppressed due to low confidence (1)

server/mq/core/producer.py:159

  • Accessing the private _loop attribute of the connection may lead to maintainability issues; consider storing the event loop in a dedicated public instance variable for improved clarity.
asyncio.run_coroutine_threadsafe(self._set_event(publish_event), self._connection._loop)

@github-actions
Copy link

github-actions bot commented May 7, 2025

Marking as stale since there has been no activity for 30 days. Will close in 7 days if no activity.

1 similar comment
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

Marking as stale since there has been no activity for 30 days. Will close in 7 days if no activity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants