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
SNS/SQS performance - delivery times depend on the number of subscriptions #3670
Comments
Thanks for reporting @czerwonkabartosz . We've pushed a fix that parallelizes the SNS notifications in #4103 . Can you please pull the |
I've tested it and can confirm that it works in an asynchronous way 👍 and it improves performance a little bit. However, IMO, performance is still the main problem. Processing 5 messages on 30 queues require almost 20 seconds on MBP (i7 2,2 GHz 6-core, 16 GB RAM). But for sure is better so 👏 for this. Case 1 - 5 topics, 1 queue per topic, 5 messages
Case 2 - 1 topic, 5 queues per topic, 5 messages
Case 3 - 1 topic, 10 queues per topic, 5 messages
Case 4 - 3 topics, 10 queues per topic, 5 messages
Case 5 - 1 topic, 30 queues, 5 messages
|
Type of request: This is a ...
[x] bug report
[ ] feature request
Detailed description
We use Localstack with quite a big number of microservices where messages between are transported using SNS/SQS - one service pushes an event to SNS and this is broadcasted to a few queues (every service has a separate queue). We've noticed some problems related to delivery time (performance issue). The problem is related to the number of subscribed queues to one SNS topic.
Expected behavior
Events should be delivered faster in an asynchronous way.
Actual behavior
I've prepared some reports that present actual behavior. As you can see, events are delivered to subscribed queues in a synchronous way in contrast to AWS.
Case 1 - 5 topics, 1 queue per topic, 5 messages
Case 2 - 1 topic, 5 queues per topic, 5 messages
Case 3 - 1 topic, 10 queues per topic, 5 messages
Case 4 - 1 topic, 15 queues per topic, 10 messages
Case 5 - 3 topics, 10 queues per topic, 5 messages
Case 6 - 1 topic, 30 queues, 5 messages
Case 7 - use AWS instead of Localstack, 1 topic, 15 queues per topic, 10 messages
Case 8 - use AWS instead of Localstack, 1 topic, 30 queues, 5 messages
Delivery times are in milliseconds.
Steps to reproduce
I've prepared a demo to reproduce this problem: https://github.com/czerwonkabartosz/localstack-sqs-sns-performance
Command used to start LocalStack
https://github.com/czerwonkabartosz/localstack-sqs-sns-performance/blob/main/docker-compose.yml
Client code (AWS SDK code snippet, or sequence of "awslocal" commands)
https://github.com/czerwonkabartosz/localstack-sqs-sns-performance/blob/main/index.js
The text was updated successfully, but these errors were encountered: