Tagged articles
28 articles
Page 1 of 1
Architect's Guide
Architect's Guide
Nov 12, 2025 · Backend Development

Four Practical Ways to Ensure Idempotency in High‑Traffic APIs

To prevent duplicate operations caused by network glitches, user errors, or retries, this article explains four common idempotency strategies—token, database unique index, distributed lock, and request payload hashing—providing clear concepts, key considerations, and ready‑to‑copy Java/Spring code examples.

Database IndexIdempotencydistributed-lock
0 likes · 9 min read
Four Practical Ways to Ensure Idempotency in High‑Traffic APIs
Code Wrench
Code Wrench
Sep 5, 2025 · Backend Development

Mastering Distributed Locks in Go: Principles, Implementations, and Pitfalls

This article explains the fundamentals of distributed locks, compares Redis, etcd, ZooKeeper and database approaches, provides practical Go code examples, highlights common mistakes, and offers optimization tips so developers can confidently apply the right locking strategy in real-world systems.

GolangZooKeeperbackend
0 likes · 12 min read
Mastering Distributed Locks in Go: Principles, Implementations, and Pitfalls
Architect's Must-Have
Architect's Must-Have
Jun 6, 2025 · Backend Development

Why Simple synchronized Locks Fail in Distributed Systems and How Redisson Fixes Them

This article examines common pitfalls of using single‑machine synchronization and basic SETNX locks for high‑concurrency stock‑deduction scenarios, demonstrates step‑by‑step improvements—including lock expiration and Redisson’s Lua‑based implementation—and discusses trade‑offs between Redis and Zookeeper for distributed locking.

RedisRedissondistributed-lock
0 likes · 16 min read
Why Simple synchronized Locks Fail in Distributed Systems and How Redisson Fixes Them
Su San Talks Tech
Su San Talks Tech
May 20, 2025 · Backend Development

10 Cache Governance Rules Every Backend Engineer Should Follow

This article shares ten practical cache governance rules—from avoiding large keys and setting proper TTLs to using distributed locks and final consistency strategies—illustrated with real‑world Java examples, code snippets, and diagrams to help backend developers design reliable, high‑performance caching solutions.

CachingRedisTTL
0 likes · 12 min read
10 Cache Governance Rules Every Backend Engineer Should Follow
Su San Talks Tech
Su San Talks Tech
Apr 16, 2025 · Backend Development

How to Prevent Product Overselling in High‑Traffic E‑Commerce Systems

This article explains why inventory overselling occurs during massive sales events, analyzes the root causes such as non‑atomic database operations, and presents practical solutions—including optimistic locking, Redis atomic scripts, distributed locks, message‑queue peak shaving, and pre‑deduct strategies—while highlighting common pitfalls and best‑practice combinations for robust e‑commerce back‑ends.

Redisdistributed-lockecommerce
0 likes · 9 min read
How to Prevent Product Overselling in High‑Traffic E‑Commerce Systems
Code Ape Tech Column
Code Ape Tech Column
Aug 29, 2024 · Backend Development

Implementing Interface Debounce with Redis and Redisson in Java Backend

This article explains how to prevent duplicate submissions in Java backend APIs by applying debounce techniques using shared Redis caches or Redisson distributed locks, detailing the design of a @RequestLock annotation, key generation, aspect implementation, and practical testing results.

DebounceRedissonRequest Lock
0 likes · 15 min read
Implementing Interface Debounce with Redis and Redisson in Java Backend
Architecture Digest
Architecture Digest
Jul 16, 2024 · Backend Development

Understanding SpringBoot @EnableScheduling Issues and Solutions with Thread Pools and Distributed Locks

This article explains how SpringBoot's default @EnableScheduling and @Scheduled annotations can cause execution delays and single‑threaded bottlenecks, demonstrates the root causes in the auto‑configured ThreadPoolTaskScheduler, and provides four practical solutions—including custom thread‑pool configuration, async execution, and Redisson‑based distributed locking—to achieve reliable, concurrent scheduled tasks in both monolithic and distributed environments.

AsyncSchedulingdistributed-lock
0 likes · 15 min read
Understanding SpringBoot @EnableScheduling Issues and Solutions with Thread Pools and Distributed Locks
IT Services Circle
IT Services Circle
Jun 29, 2023 · Backend Development

Tencent Testing Engineer Interview Experience and Technical Q&A

This article shares a detailed account of a Tencent testing engineer interview, covering self‑introduction, Go knowledge, Redis performance, distributed lock implementation, semaphore mechanics, RPC vs HTTP, concurrency usage, Git security practices, Linux commands, and a few brain‑teaser and algorithm questions.

GoInterviewRPC
0 likes · 13 min read
Tencent Testing Engineer Interview Experience and Technical Q&A
Sanyou's Java Diary
Sanyou's Java Diary
Feb 9, 2023 · Backend Development

Choosing the Right Task Scheduling Framework: Quartz, ElasticJob, XXL-JOB and More

This article compares popular Java task scheduling solutions—including Quartz, Spring Schedule with Redis locks, ElasticJob‑Lite, centralized MQ and XXL‑JOB approaches—explaining their core components, clustering strategies, code examples, and practical selection guidance for building reliable distributed schedulers.

QuartzXXL-JOBdistributed-lock
0 likes · 19 min read
Choosing the Right Task Scheduling Framework: Quartz, ElasticJob, XXL-JOB and More
Top Architect
Top Architect
Nov 13, 2022 · Backend Development

Cache Update Strategies and Concurrency Control in Backend Systems

The article analyzes the challenges of keeping cache and database consistent after write operations, evaluates four update‑order strategies, discusses their concurrency pitfalls, and presents practical solutions such as CAS, distributed locks, asynchronous updates, and delayed double‑delete techniques.

CASCacheConsistency
0 likes · 8 min read
Cache Update Strategies and Concurrency Control in Backend Systems
Top Architect
Top Architect
Aug 31, 2022 · Backend Development

Preventing Coupon Over‑Issuance: Concurrency Problems and Multi‑Layered Solutions

The article analyzes why a coupon‑distribution feature can over‑issue coupons under high concurrency, demonstrates the root cause with race conditions, and presents four practical solutions—including Java synchronized blocks, SQL row‑level checks, optimistic locking, and Redis‑based distributed locks using Redisson—to ensure safe coupon redemption.

Coupondistributed-lock
0 likes · 12 min read
Preventing Coupon Over‑Issuance: Concurrency Problems and Multi‑Layered Solutions
Top Architect
Top Architect
Jun 2, 2022 · Databases

Reasonable Strategies for Database and Cache Read/Write Consistency

The article discusses how to achieve reasonable read/write consistency between databases and caches by emphasizing cache expiration, eventual consistency, analyzing the Cache‑Aside pattern, evaluating four update‑order options, recommending the "update‑DB‑then‑delete‑cache" approach, and suggesting async deletion via message queues and distributed locks to handle concurrency and cache breakdown.

Consistencycache-asidedistributed-lock
0 likes · 19 min read
Reasonable Strategies for Database and Cache Read/Write Consistency
Architecture Digest
Architecture Digest
Jan 25, 2022 · Backend Development

Distributed Lock Implementation Approaches in Java: Database, Redis, and Zookeeper

This article explains the concept of distributed locks, compares three implementation methods—database unique indexes, Redis (using SETNX), and Zookeeper—provides detailed SQL table design and Java code examples for acquiring and releasing locks, and discusses reentrancy, lock release timing, and single‑point failure considerations.

DatabaseJavaRedis
0 likes · 14 min read
Distributed Lock Implementation Approaches in Java: Database, Redis, and Zookeeper
macrozheng
macrozheng
Oct 18, 2021 · Backend Development

Avoid These 8 Common Pitfalls When Using Redis Distributed Locks

This article examines the most frequent problems encountered with Redis distributed locks—including non‑atomic operations, forgotten releases, accidental unlocking of others, massive request failures, re‑entrancy, lock contention, timeout handling, and master‑slave replication—while offering practical code examples and mitigation strategies.

Luadistributed-lock
0 likes · 22 min read
Avoid These 8 Common Pitfalls When Using Redis Distributed Locks
Code Ape Tech Column
Code Ape Tech Column
Sep 30, 2021 · Operations

Common Pitfalls and Best Practices of Redis Distributed Locks

This article examines the typical mistakes when using Redis distributed locks—such as non‑atomic operations, forgetting to release locks, releasing others' locks, lock starvation, re‑entrancy issues, lock granularity, timeout handling, and master‑slave replication problems—and provides practical solutions and code examples for each scenario.

PitfallsRedissondistributed-lock
0 likes · 21 min read
Common Pitfalls and Best Practices of Redis Distributed Locks
MaGe Linux Operations
MaGe Linux Operations
Sep 17, 2021 · Backend Development

Mastering Redis: Caching, Distributed Locks, Counters, and More for Scalable Backend Systems

This article explores how to leverage Redis for a wide range of backend functionalities—including caching, distributed data sharing, locks, global IDs, counters, rate limiting, bitmap statistics, shopping carts, timelines, message queues, lotteries, likes, product tagging, filtering, follow relationships, and leaderboards—providing practical code examples and usage patterns.

CachingCounterbackend-development
0 likes · 8 min read
Mastering Redis: Caching, Distributed Locks, Counters, and More for Scalable Backend Systems
Selected Java Interview Questions
Selected Java Interview Questions
Aug 26, 2021 · Databases

Redis Interview Topics: Persistence, Caching Issues, Data Types, Cluster Architecture, and More

This article provides a comprehensive overview of Redis interview questions, covering persistence mechanisms, cache avalanche and penetration, hot vs. cold data, differences from Memcached, single‑threaded performance, data structures, internal architecture, expiration policies, clustering options, distributed locks, and transaction handling.

CachingClusterPersistence
0 likes · 24 min read
Redis Interview Topics: Persistence, Caching Issues, Data Types, Cluster Architecture, and More
Sohu Tech Products
Sohu Tech Products
Aug 4, 2021 · Backend Development

Resolving Duplicate OpenID Insertions with Distributed Locks in a Fast App Center

To prevent duplicate OpenID records caused by concurrent synchronization requests in the Fast App Center, this article analyzes the root cause, evaluates database‑level unique indexes versus application‑level distributed locks, and presents a Redis‑based lock implementation with cleanup procedures to ensure data consistency.

Data ConsistencyJavaMySQL
0 likes · 16 min read
Resolving Duplicate OpenID Insertions with Distributed Locks in a Fast App Center
Java Backend Technology
Java Backend Technology
Oct 8, 2020 · Backend Development

Unlocking Redis: 9 Real‑World Patterns from KV Cache to Bloom Filters

This article walks through nine practical Redis use cases—including basic KV caching, distributed locking, delayed queues, rate limiting, service discovery, bitmap storage, HyperLogLog counting, roaring bitmaps, and Bloom filters—explaining the underlying concepts, configuration tips, and code examples for robust backend development.

CachingHyperLogLogbitmap
0 likes · 20 min read
Unlocking Redis: 9 Real‑World Patterns from KV Cache to Bloom Filters
Java Architect Essentials
Java Architect Essentials
Aug 29, 2020 · Backend Development

Understanding Distributed Locks, Session Management, Maven Configuration, and Caching in Backend Architecture

This article explains the fundamentals of backend architecture, covering Maven's settings.xml, front‑back separation, various types of locks (thread, process, distributed), detailed Redis‑based and Zookeeper‑based distributed lock implementations with code examples, session handling in distributed systems, and key Spring‑Redis caching annotations.

JavaRedisSession
0 likes · 15 min read
Understanding Distributed Locks, Session Management, Maven Configuration, and Caching in Backend Architecture
Java Backend Technology
Java Backend Technology
Jun 11, 2020 · Backend Development

How to Build a Robust Re‑entrant Distributed Lock with Redis, Lua and Java

This article explains why a MySQL repeatable‑read transaction can produce an incorrect negative balance, then shows how to prevent such anomalies by implementing a reliable, re‑entrant distributed lock using Redis commands, Lua scripts, and Java/Spring‑Boot code, while also covering lock expiration, atomicity, and the RedLock algorithm.

distributed-lockspring-boot
0 likes · 16 min read
How to Build a Robust Re‑entrant Distributed Lock with Redis, Lua and Java
Java Backend Technology
Java Backend Technology
Sep 11, 2019 · Backend Development

How to Ensure Idempotent Requests in Java Backend: Strategies and Code Samples

This article explains the concept of idempotency in programming, outlines common causes of duplicate submissions, and presents multiple solutions—including frontend button disabling, PRG pattern, session tokens, database constraints, local locks using ConcurrentHashMap, AOP interceptors, and distributed Redis locks—complete with Java code examples.

distributed-lockspring-boot
0 likes · 14 min read
How to Ensure Idempotent Requests in Java Backend: Strategies and Code Samples
Architecture Digest
Architecture Digest
Nov 8, 2017 · Backend Development

Implementing Distributed Locks with Redis: Commands, Java Implementations, and Lua Script Optimizations

This article explains how to build a reliable distributed lock using Redis by introducing essential Redis commands, presenting initial Java pseudocode, addressing race‑condition pitfalls, improving the design with GETSET and Lua scripts, and providing complete, production‑ready Java implementations with unlock safety fixes.

Luabackenddistributed-lock
0 likes · 16 min read
Implementing Distributed Locks with Redis: Commands, Java Implementations, and Lua Script Optimizations