> For the complete documentation index, see [llms.txt](https://huy312100.gitbook.io/software-development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huy312100.gitbook.io/software-development/cloud-service/aws/certificate/clf-c02/cloud-technology-and-services/cloud-integration/sqs.md).

# SQS

Simple Queue Service

<figure><img src="https://1722711354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwNXdoUkfmcozr29fRrfb%2Fuploads%2FNFYfCg6S990zp852pz8z%2FScreenshot%202023-12-24%20at%2000.10.25.png?alt=media&amp;token=e91aea3d-9fc9-45bc-a293-6e8110440c0d" alt=""><figcaption></figcaption></figure>

### Standard Queue

• Oldest AWS offering (over 10 years old)

• Fully managed service (\~serverless), used to decouple applications

• Scales from 1 message per second to 10,000 per second

• Default retention of messages: 4 days, maximum of 14 days

• No limit to how many messages can be in the queue

• Messages are deleted after they’re read by consumers

• Low latency (<10 ms on publish and receive)

• Consumers share the work to read messages & scale horizontally

### SQS to decouple between application tiers

<figure><img src="https://1722711354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwNXdoUkfmcozr29fRrfb%2Fuploads%2FI1PQNm4XBJutmg9lQo9Y%2FScreenshot%202023-12-24%20at%2000.12.16.png?alt=media&amp;token=a962cafa-03fd-44ff-9179-a9955167157e" alt=""><figcaption></figcaption></figure>

### FIFO Queue

• FIFO = First In First Out (ordering of messages in the queue)

<figure><img src="https://1722711354-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwNXdoUkfmcozr29fRrfb%2Fuploads%2FG4Uj7stvyCZWthd7RUUo%2FScreenshot%202023-12-24%20at%2000.14.03.png?alt=media&amp;token=389144b5-5a7b-4918-be22-6d8fd162bb0d" alt=""><figcaption></figcaption></figure>

• Messages are processed in order by the consumer
