1. Simple Queue Service (SQS)
Dayanand Shanmugham
http://www.linkedin.com/in/dayanandshanmugham
http://dkangala.wordpress.com
January 2013
2. Simple Queue Service (SQS)
http://aws.amazon.com/sqs/
SQS enables us to store and retrieve messages – this could be done between
applications or between distributed components of an application that
perform different tasks.
Key Highlights:
1.Message body can contain 64KB of text
2.Messages can be sent, received or deleted in batch of 10
3.Retained in queue for up to for 14 days
4.Secure sharing of queue data with other AWS Accounts
Sample Use Case with respect to how SQS, EC2, S3 and SimpleDB used
together is shown in next slide.
3. Simple Queue Service (SQS)
http://aws.amazon.com/sqs/
Use Case: Web Site For “Video Transcoding”
1.End users submit videos to be transcoded to the website
2.The videos are stored in Amazon S3, and a message (“the request message”) is
placed in an Amazon SQS queue (“the incoming queue”) with a pointer to the
video and to the target video format in the message
3.The transcoding engine, running on a set of Amazon EC2 instances, reads the
request message from the incoming queue, retrieves the video from Amazon S3
using the pointer, and transcodes the video into the target format
4.The converted video is put back into Amazon S3 and another message (“the
response message”) is placed in another Amazon SQS queue (“the outgoing
queue”) with a pointer to the converted video
5.Metadata about the video (e.g., format, date created and length) is indexed into
Amazon SimpleDB for easy querying
6.During this whole workflow, a dedicated Amazon EC2 instance constantly
monitors the incoming queue and based on the number of messages in the
incoming queue, dynamically adjust the number of transcoding Amazon EC2
instances to meet customers’ response time requirements.