Tagged articles
7 articles
Page 1 of 1
Coder Trainee
Coder Trainee
Jan 11, 2026 · Backend Development

Ensuring API Idempotency: Primary Keys, Optimistic Locks, and Token Strategies

The article explains three practical methods for achieving API idempotency—leveraging unique database primary keys (with distributed IDs), applying optimistic locking via version fields, and using a global anti‑repeat token stored in Redis—detailing their applicability, requirements, and operational flow.

API idempotencyRedis tokendistributed-id
0 likes · 3 min read
Ensuring API Idempotency: Primary Keys, Optimistic Locks, and Token Strategies
IT Services Circle
IT Services Circle
Sep 30, 2025 · Backend Development

Why Idempotency Matters: Designing Safe Backend APIs

This article explains the concept of API idempotency, when it should be applied, practical design patterns—including database checks, unique transaction IDs, and Snowflake ID generation—and the core principles for balancing reliability and cost in backend services.

API idempotencySnowflake algorithmbackend design
0 likes · 10 min read
Why Idempotency Matters: Designing Safe Backend APIs
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 idempotencydatabase lockdistributed-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
Java Backend Technology
Java Backend Technology
Aug 23, 2024 · Backend Development

How to Implement Distributed API Debounce with Redis and Redisson in Java

This article explains why API debounce is essential, identifies the types of endpoints that need it, and provides two distributed solutions—shared Redis cache and Redisson lock—along with complete Java code examples and deployment tips for preventing duplicate submissions in a Spring Boot backend.

API idempotencyDebounceSpring Boot
0 likes · 16 min read
How to Implement Distributed API Debounce with Redis and Redisson in Java
IT Architects Alliance
IT Architects Alliance
May 24, 2022 · Backend Development

How to Ensure API Idempotency and Implement Distributed Rate Limiting in Java

This guide explains the principles of API idempotency using unique business IDs or token mechanisms, explores distributed rate‑limiting dimensions, compares token‑bucket and leaky‑bucket algorithms, and provides concrete implementations with Guava RateLimiter, Nginx configuration, and a Redis‑Lua script integrated into Spring Boot, including annotation‑based AOP for easy usage.

API idempotencyGuava RateLimiterNginx
0 likes · 19 min read
How to Ensure API Idempotency and Implement Distributed Rate Limiting in Java
Java Interview Crash Guide
Java Interview Crash Guide
Mar 22, 2022 · Backend Development

Ensuring API Idempotency: Why It Matters and How to Implement It

This article explains the concept of API idempotency, why duplicate requests can cause critical issues such as double payments, and presents a comprehensive set of client‑side and server‑side strategies—including token mechanisms, PRG pattern, unique indexes, optimistic locking, distributed locks, and more—to guarantee safe, repeatable operations.

API idempotencyDuplicate Requestsbackend-development
0 likes · 9 min read
Ensuring API Idempotency: Why It Matters and How to Implement It