Tag

API idempotency

1 views collected around this technical thread.

Lobster Programming
Lobster Programming
May 30, 2025 · Backend Development

How to Ensure API Idempotency with Locks: 5 Proven Strategies

This article explores five practical lock-based approaches—including database primary keys, pessimistic and optimistic locks, state machines, and distributed locks—to achieve reliable API idempotency in distributed systems, highlighting implementation details, trade‑offs, and code examples.

API idempotencyDistributed Lockdatabase lock
0 likes · 7 min read
How to Ensure API Idempotency with Locks: 5 Proven Strategies
Lobster Programming
Lobster Programming
May 27, 2025 · Backend Development

Ensuring API Idempotency with Redis and Unique Serial Numbers

This article explains how to achieve API idempotency by having clients send a short‑lived unique serial number, storing it as a Redis key with SETNX and an expiration, and handling the Redis response to process or reject duplicate requests.

API idempotencyRedisSETNX
0 likes · 3 min read
Ensuring API Idempotency with Redis and Unique Serial Numbers