Amazon SQS
Standard vs FIFO Queues
Choose between massive-throughput best-effort (Standard) and ordered exactly-once (FIFO).
Amazon SQS offers two queue types with different guarantees. Standard queues give nearly unlimited throughput and at-least-once delivery, but only best-effort ordering — messages can arrive out of order and occasionally be delivered more than once. They are the default for most decoupling and fan-in workloads.
Standard is a huge open mailroom where letters get processed fast but may be handled slightly out of order or copied twice. FIFO is a single-file ticket line per customer: strict order, and each ticket served exactly once.
Key Concepts
1
FIFO queues guarantee strict ordering within a message group and exactly-once processing (deduplication), at the cost of much lower throughput (a few thousand messages/sec, higher with batching and high-throughput mode). Ordering is per MessageGroupId, so unrelated groups still process in parallel — similar in spirit to Kafka partition keys.
2
The decision is about whether order and dedup matter: if your consumers are idempotent and order is irrelevant, Standard is simpler and scales infinitely; if you process sequential commands per entity, FIFO is worth the throughput trade-off.
3
What the interviewer is probing.
What the interviewer is probing.
4
1. "What is the trade between them?" *Probing:* the central choice. *Stalls:* "FIFO is better."
*Moves up:* standard gives near-unlimited throughput with at-least-once delivery and best-effort
ordering; FIFO gives exactly-once processing and strict order at a lower throughput.
1. "What is the trade between them?"
5
2. "What is the FIFO throughput limit?" *Probing:* the practical number. *Stalls:* "Unlimited."
*Moves up:* 300 messages a second, or 3,000 with batching — and high throughput mode raises it per
message group.
2. "What is the FIFO throughput limit?"
6
3. "How does a message group id work?" *Probing:* the mechanism. *Stalls:* "It groups." *Moves
up:* ordering is guaranteed within a group, and groups are processed in parallel — so it is the FIFO
equivalent of a partition key.
3. "How does a message group id work?"
7
4. "Which would you default to?" *Probing:* judgement. *Stalls:* "FIFO, for safety." *Moves up:*
standard with idempotent consumers — FIFO only when ordering is a genuine business requirement.
4. "Which would you default to?"