Reputation: 958
Given an application that receives requests and uses an external messaging service to message users. The number of requests are usually non-linear and at times huge bulk requests come in to message users of the service. The external messaging service allows a throughput of say x/sec.
Using Elastic Beanstalk workers and SQS, is it possible to apply some rate limiting to how these messages are being processed?
Upvotes: 9
Views: 1774
Reputation: 18918
You can rate limit the number of messages pulled by the using the HTTP connections option setting in the aws:elasticbeanstalk:sqsd namespace.
HTTP connections – Specify the maximum number of concurrent connections that the daemon can make to any application(s) within an Amazon EC2 instance. The default is 50. You can specify a value between 1 and 100.
Read more about it here.
Remember to tweak the other parameters like Visibility Timeout, Max Retries, Retention Period accordingly. Also if you are tweaking Inactivity Timeout, remember to modify the nginx proxy timeout as well as shown here.
Upvotes: 12