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

A question on performance #229

Closed
iluuu1994 opened this issue Jan 10, 2020 · 2 comments
Closed

A question on performance #229

iluuu1994 opened this issue Jan 10, 2020 · 2 comments

Comments

@iluuu1994
Copy link

We're planning to use Mercure for an event with ~3000 attendees. We'll have to push data to all users in real-time. The data pushed to the clients is small and personalized. What I'm wondering is what is the better approach:

  • Push all data (~600 KB) to all clients simultaneously
  • Push the data of one user (~200 bytes) to 3000 clients individually

One thing I've observed is that publishing 3000 times on my local machine takes a significant amount of time (~1 minute), even with an empty payload. Pushing all data (600 KB, but only to 1 device) only takes only 0.5s. However I'm not sure if these tests are even remotely accurate. I was hoping to get some advice from someone who is experienced in running Mercure in production. Excuse me if this has been answered before.

Thanks again!

@dunglas
Copy link
Owner

dunglas commented Apr 5, 2020

Are you pushing (making the POST requests) in parallel? Honestly I don't know which strategy would be faster. I've the feeling that pushing multiple times will perform a bit better, but I'm not sure, it deserves a proper test. Maybe that the load test can be adapted to measure this: https://github.com/dunglas/mercure/blob/master/LoadTest.scala

@iluuu1994
Copy link
Author

Thanks for your feedback. I went with sending all data at once to all clients. The event was canceled because of COVID-19 so unfortunately I never found out if that was the right decision. Maybe next year 🙂

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

No branches or pull requests

2 participants