We've just rolled out a new version of the Amazon Simple Queue Service (SQS for short).
After taking a detailed look at the ways that the clever folks in our developer community (now 330,000 - strong by the way) are using SQS, we made a number of changes to increase the cost efficiency of the service, removing a few calls and reducing the maximum message size.
The original version of SQS features a pricing model base on the number of messages sent. The new and improved model is based on the actual number of web service requests. Instead of paying 10 cents for every 1000 messages, you will now pay 1 cent for every 10,000 requests.
If you poll your SQS queues to check for new messages, you should re-examine your code to see if you can do things more efficiently under this new pricing system. In particular, if you find that there's nothing to process, you should implement a backoff scheme of some sort. If your first request in a series doesn't find anything to process, wait 1 second and try again. If there's still nothing there, wait 2 seconds, and then 4, up to some upper bound based on the specific needs of your application.
We also found that a number of our developers are using SQS as a fundamental part of their Amazon-powered infrastructure. One common use is to dedicate Amazon EC2 instances to host particular components of a multi-stage image or document processing system using SQS queues to buffer the messages between stages. A system built on this architecture can be scaled to take on additional load by simply adding more EC2 instances at any stage. Systems built like this also exhibit a high degree of fault tolerance. You can learn more about this particular architectural model in Jinesh's post on SQS: The Super Queue Service and you can read about this model in action by reading François Beausoleil's post about Using SQS and S3 to decouple image resizing from uploading.
Using SQS as a piece of application infrastructure is now more economical than ever because (drum roll) there's no longer any charge to move data back and forth between EC2 and SQS! Note that you can use the AWS Simple Calculator to model your system and to estimate your monthly charges.
There's more information on these exciting changes in the forum post.
-- Jeff;
Recent Comments