-
Notifications
You must be signed in to change notification settings - Fork 25
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
Every queue has a consume rate of at best 25 messages per second. How can I increase this? #63
Comments
Hi, @ppinel. Thanks for taking the time to write about your issue. I've tested this on my side and found wildly different numbers than the ones you brought up. For instance, running the microservices on the See screenshot below: And while this isn't a thorough benchmark by any means, our results are so different, that I'm inclined to say there's something in your topology or Are you connecting to the broker locally (ie.: using Finally, could you run the examples and share your results? Or maybe (if this isn't too much to ask), could you profile your script and tell me exactly where exec time is spent? That would be very helpful. Thanks again! EDIT Also, all my tests were run using node |
Awesome. Your setup LGTM. Could you also include the output of RabbitMQ's web admin? In particular, I'm interested in the "Acknowledge" rate. |
I just reinstall RabbitMQ on the server and still have the same issue. |
@ppinel All right. Numbers on your Macbook look a lot more than what I'd expect. What other differences can you think of between your local env and your server? Consider:
Also, you did change |
Yes I did changed setInterval in both cases, otherwise messages are coming to slowly and I never reach the mysterious limit. Regarding the server it's from a french hosting service OVH. |
It could be on the OS layer. Is there any limitation you had to change or met someone with issues on Debian? |
I'm perplexed. And out of ideas. Could you please read and check this out? Use the |
Although rare, it could be. Check the Process statistics panel on Overview -> (More about this node) and take a look at the thresholds in each graph. For example, mine look like this: Also, is your RabbitMQ node Disc or RAM based? |
Minimum free space needed for the node to run. Ok, so no throttling on the connection. This looks like a non-arbitrary fixed cap of sorts. 25 is too much of a nice round number to be a coincidence. Anything on the RabbitMQ log? It should be under |
Also it's the same number across server even on the aws ec2 instance. |
Thank you for your time, I'll post an update here as soon as I have the solution. |
Thanks! Yes, if you come up with a solution, please share it. I'm intrigued now. |
I wanted to know if by any chance you take advantage of this option https://github.com/squaremo/amqp.node/blob/master/lib/connect.js#L98? |
Found out how to set the noDelay option: |
Had no idea about that You learn something new everyday. Thanks for your teachings 🐐 ! Perhaps, I can include this in some FAQ section on the Feel free to close the issue if you think there's nothing else you can do to improve your message rate. |
Yes it's OS dependant. Would be great if this flag could be documented. |
@ppinel After reading the whole thread on that Google Groups forum, I'm inclined to say that your solution with Glad you could work things out. Good work. |
Hello,
I am using SenecaJS with this plugin and RabbitMQ. When I did some benchmarking to understand why at best I had 25 messages per second handled on each queue, I found out that it takes 40ms for a message to go and come back.
For exemple, a microservice ask for an object to another microservice (Basically a mongodb query).
The act callback is called 40ms after when Mongodb query only takes 2ms to complete.
So I now understand why on RabbitMQ admin interface, I have at best 25 messages handled per second per queue: 40ms * 25 = 1 second.
I use the default config for Amqp plugin and SenecaJS. All microservices and RabbiMQ are on the same server.
Each microservice has only one instance running.
Is this a normal behaviour?
Is it possible to only increase the rate by modifying the parameters of Seneca AMQP Transport, SenacaJS and/or RabbitMQ ?
The text was updated successfully, but these errors were encountered: