DEV Community

Cover image for Master Amazon SQS in One Page
Chisom Ejiba
Chisom Ejiba

Posted on

Master Amazon SQS in One Page

At a buka, nobody is taking your order number.

The mama serving jollof doesn't care who came first. She's scooping for whoever is closest, loud, or holding their plate out furthest. You might wait five minutes. Someone who arrived after you gets served first. If you wait patiently, you still get your food. Speed is the whole point.

But at GTBank or Access Bank? Try telling the teller to process your withdrawal before your transfer has cleared. What do you think will happen?

Order matters there. Sequence is everything.

This is exactly the difference between SQS Standard queues and SQS FIFO queues.

Standard queues are the buka model.

Messages go in, messages come out. fast, at scale, in whatever order the system can manage. Sometimes a message is delivered more than once. The order is not guaranteed.

It's actually a feature, a deliberate trade-off for speed and volume.

When order doesn't matter, Standard is what you want.

→ Sending OTP notifications to users? Any order is fine.

→ Resizing profile photos after upload? Do them anyhow.

→ Logging app events for analytics? Sequence doesn't matter.

FIFO queues are the banking hall model.

FIFO means First In, First Out. Whatever enters the queue first is processed first. Every time. No exceptions here. And no duplicate processing, each message is handled exactly once.

The tradeoff is throughput. You can't match the raw volume of a Standard queue.

But for these systems, getting it right matters more than getting it fast.

→ Processing a Paystack or Flutterwave payment? Order matters.

→ Debiting a wallet after a transaction is confirmed? Order matters.

→ Running onboarding steps that depend on each other? Order matters.

The question is not, which one is better?

It's "what happens if two messages arrive in the wrong order or the same message is processed twice?"

If the answer is "nothing, we'll be fine" — Standard queue.

If the answer makes you uncomfortable — FIFO queue.

Most fintech systems running in Nigeria need FIFO. Most notification or media systems don't.

Knowing your system helps you choose accordingly.

What AWS concept should I break down next?

Want to learn more? Let's connect on LinkedIn

Top comments (0)