Skip to content

Why One Click Shouldn't Create Two Orders

Users double-click, browsers retry and networks reconnect. How idempotency keys stop one intent from becoming two orders.

By 2 min read
  • Architecture Breakdown
  • Reliability
  • Software Architecture
  • System Design

(Idempotency Explained)

You click "Place Order." Nothing happens.

So you click again.

A few seconds later...

  • Two orders appear.
  • Two payments are processed.
  • Two confirmation emails arrive.
  • The user didn't intend to buy twice.

The system simply couldn't tell the difference between a new request and a retried request.

Why One Click Shouldn't Create Two Orders

This is exactly the problem idempotency solves.

In distributed systems, retries are common.

  • Networks timeout.
  • Mobile connections drop.
  • Browsers retry requests.
  • Load balancers retry failed connections.

Without idempotency, every retry risks repeating the same operation. Instead, resilient systems attach a unique idempotency key to each request.

If the same request arrives again, the system recognizes it and returns the original result instead of processing it twice.

That's why payment platforms, booking systems, and financial applications rely heavily on idempotent operations.

One thing I find fascinating about architecture is this: The hardest problems often appear only when something goes wrong.

Retries improve reliability. Idempotency makes retries safe.

One without the other can create bigger problems than the original failure. Good architecture isn't just about completing requests.

It's about completing them exactly once, even when the network isn't perfect.

Have you ever encountered a duplicate payment, order, or notification caused by a retried request?

Keep reading