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

POC of queue to store events from MSTeams #598

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jespino
Copy link
Member

@jespino jespino commented Apr 12, 2024

This is a POC in draft of storing things in a queue inside mattermost.

The idea is, each event get stored in the databases, if the even gets processed right away, we delete it from the queue.

In the future I will add a pooling mechanism that is going to try again up to 5 times each element in the queue that has more than 0 tries, and we start trying to deliver everything that is in the queue.

This would allow us to provide a more resilient event handling. My main concern here is the performance impact, I think we have space to reduce the database load, but I'm not sure how much.

Probably would be cool to have a load test with this code to figure out the degree of impact on the database.

@enahum
Copy link
Contributor

enahum commented Apr 16, 2024

I have run a load test with this PR.

  1. There are no crashes with high load which is good
  2. There are no metrics on the three new store functions as there are not present in the timelayer (will try again after generating)
  3. a previous run was able to support 13953 users and with this PR it went down to 13776 users
  4. Database latency seems to have increased as well (see graphs)
Previous This PR
image image

I'll run it again after executing make generate and report back

@enahum
Copy link
Contributor

enahum commented Apr 17, 2024

a second run reports a total of 13629 users which is a bit lower than the previous run, so I can say that probably we are looking at supporting 13.5K users. DB Latency seems to reach a max of 500ms.

The way we have constructed the test so far it only includes calls for EnqueueActivity and DequeueActivity.

Here some graphs

Queue Everything
image image
image image

@lieut-data lieut-data removed their request for review May 14, 2024 12:13
@lieut-data
Copy link
Member

@jespino, propose we pause on these changes while we define next steps for the project.

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.

None yet

3 participants