107k views
5 votes
Your company has a web-based ticketing service that utilizes Amazon SQS and a fleet of EC2 instances. The EC2 instances that consume messages from the SQS queue are configured to poll the queue as often as possible to keep end-to-end throughput as high as possible. You noticed that polling the queue in tight loops is using unnecessary CPU cycles, resulting in increased operational costs due to empty responses. In this scenario, what will you do to make the system more cost-effective?

User Eqbal
by
7.5k points

1 Answer

4 votes

Answer:

Set up Amazon SQS using long-polling through adjusting a ReceiveMessageWaitTimeSeconds to a number greater than zero.

Step-by-step explanation:

A user corporation seems to have an internet-based booking application that employs Amazon SQS as well as a number of the following instances. That instances the receive messages from those in the SQS queues are designed to test that list as much as necessary to maintain the end-to-end performance is large as necessary.

He found that perhaps the queue within close loop requires unwanted CPU cycles as well as allows that device quite price-effective by setup Amazon's SQS by long-running through modifying the ReceiveMessageWaitTimeSeconds to the amount larger than zero.

User LgFranco
by
7.2k points