Feb 24

Amazon Simple Queue Service – shortnote

If you are interested at cloud computing, Amazon web service is not a new term for sure 🙂 .
Here, I thought to make blog post about one of AWS service called as Simple Queue Service abbreviated as SQS. This would be useful as aws exam short-note, and also understanding basic concept of SQS.

Queues store messages that are generated from one component of application and consumed(read) by another.
This is called as decouple infrastructure because each component of the system is functioning independently.


Core features

* Delay queue
Delivery of a message is delayed for the specific amount of time.

* Access control
It is possible to control who can retrieve / send message

* Guarantees delivery of “at least” 1 message.
But doesn’t guarantee the order, so it’s up to developer to implement such a feature if required.
SWF (Simple Work Flow) does guarantee the order of delivery.

* Multiple writers and readers
Multiple readers / writers can access the queue concurrently. SQS locks the message during the processing.

* Variable message size
– message size is up to 256Kb, but single request is 64Kb.
so 256Kb message require 4 requests
– message can contain instruction to access other aws service such as s3, dynamoDB etc.

* Visibility timeout
message is being processed, and no other process can poll the message until timeout period expires.

Polling types

[1] Short polling
* Default polling
* Continuous short polling should be performed to ensure all messages are recived.
* so this is not cheap (due to above statement)

[2] Long polling
* reduce empty responses
* wait until a message is available before sending response.
* respond at lease 1 message
* reduce the cost


Receive message wait time – If this is set to a value greater than 0, then long polling is enabled.




Important  SQS Timers


Timer minimum value maximum value
Delay queue 0 seconds 15 minutes
message retention (default 4 days) 1 minute 14 days
Visibility timeout 0 seconds 12 hours


So see you guys with  Amazon Simple Work Flow ( SWF ) article.

References :-

[1] http://aws.amazon.com/sqs/faqs/


Leave Your Thought Here