SQS
Definition
Simple Queue Service - AWS message queuing service for decoupling application components, ensuring reliable message delivery and processing.
Use Cases
- Netflix: Decoupling microservices and buffering asynchronous work (e.g., background processing and event-driven workflows). — Uses AWS messaging patterns (including queues) to separate producers from consumers so services can process tasks independently and scale consumers based on backlog. (Improved resilience and elasticity by smoothing traffic spikes and preventing downstream services from being overwhelmed.)
- Zalando: Asynchronous order and inventory-related processing across distributed services. — Uses AWS-based event-driven and queueing approaches to handle bursts and ensure services can continue operating even when downstream components are slow or temporarily unavailable. (More reliable processing during peak load and better fault isolation between services.)
Provider Equivalents
- AWS: Amazon Simple Queue Service (Amazon SQS)
- Azure: Azure Queue Storage
- GCP: Google Cloud Pub/Sub
- OCI: OCI Queue
Frequently Asked Questions
- What's the difference between SQS and SNS?
- SQS is a queue: messages are stored until a consumer pulls them and processes them (good for work queues and task distribution). SNS is pub/sub: it pushes messages to subscribers (like HTTP endpoints, Lambda, email, or SQS queues). A common pattern is SNS for fan-out (broadcast) and SQS for buffering and reliable processing by workers.
- When should I use SQS?
- Use SQS when you need to decouple parts of an application, run background jobs, smooth out traffic spikes, or reliably hand off work to worker processes. It’s a good fit when producers and consumers scale independently, when you want retries for transient failures, or when you need a buffer so downstream systems aren’t overloaded.
- How much does SQS cost?
- SQS pricing is primarily based on usage: the number of requests (API calls such as SendMessage, ReceiveMessage, DeleteMessage) and any optional features you enable. Costs can increase with high polling rates, large message payload usage patterns, and cross-region data transfer (if applicable). Check the AWS SQS pricing page for current per-request rates and free tier details.
Category: communication
Difficulty: intermediate
Related Terms
See Also