Tagged articles
418 articles
Page 3 of 5
Sohu Tech Products
Sohu Tech Products
Aug 10, 2022 · Backend Development

Understanding Redisson Distributed Locks: Reentrancy, Fairness, and Watchdog Mechanism

This article explains how Redisson implements distributed locks on Redis, covering basic concepts, differences from Jedis and Lettuce, the Lua scripts for lock acquisition, reentrancy handling, automatic lease renewal via a watchdog, Pub/Sub based unlock notifications, and the design of a fair lock using Redis lists and sorted sets.

Watchdogdistributed-lockfair lock
0 likes · 30 min read
Understanding Redisson Distributed Locks: Reentrancy, Fairness, and Watchdog Mechanism
Top Architect
Top Architect
Aug 6, 2022 · Backend Development

Practical Coding Techniques: Kafka Transaction Commit, Redis Distributed Lock Simplification, and Business Log Decoupling

This article shares several practical coding techniques for backend development, including how to commit Kafka transactions safely, simplify Redis distributed lock usage with Redisson, implement AOP-based method locking, and decouple business logging using thread pools and asynchronous processing.

aopdistributed-lockredis
0 likes · 13 min read
Practical Coding Techniques: Kafka Transaction Commit, Redis Distributed Lock Simplification, and Business Log Decoupling
IT Architects Alliance
IT Architects Alliance
Aug 6, 2022 · Backend Development

Practical Coding Tips: Kafka Transaction Commit, Redis Distributed Lock Simplification, AOP Lock Annotation, and Business Log Decoupling

This article shares practical development techniques, including how to safely commit Kafka messages within transactions, simplify Redis distributed locks with Redisson, implement an AOP‑based lock annotation for method-level locking, and decouple business logging using asynchronous thread pools and helper utilities.

JavaKafkaaop
0 likes · 14 min read
Practical Coding Tips: Kafka Transaction Commit, Redis Distributed Lock Simplification, AOP Lock Annotation, and Business Log Decoupling
Code Ape Tech Column
Code Ape Tech Column
Aug 4, 2022 · Backend Development

Understanding Redisson Distributed Lock Implementation

This article provides a comprehensive, step‑by‑step analysis of Redisson’s distributed lock implementation, covering its architecture, Lua scripts for lock acquisition, re‑entrancy, watchdog renewal, unlocking, fair lock mechanisms, and code examples, enabling developers to grasp and apply robust Redis‑based locking in Java applications.

JavaLuaconcurrency
0 likes · 31 min read
Understanding Redisson Distributed Lock Implementation
Top Architect
Top Architect
Jul 26, 2022 · Backend Development

Stock Deduction Strategies: Database vs Redis Implementations

This article compares three stock‑deduction approaches—single‑record MySQL, sharded MySQL, and Redis with Lua scripts—analyzes their performance and concurrency issues, and provides complete Java/Spring code for a Redis‑based solution including distributed locking and initialization callbacks.

distributed-lockinventoryspring
0 likes · 10 min read
Stock Deduction Strategies: Database vs Redis Implementations
macrozheng
macrozheng
Jul 25, 2022 · Backend Development

How to Prevent Duplicate Payments in E‑Commerce: Strategies & Best Practices

This article explains the complete e‑commerce payment flow, identifies why orders can be paid twice—including lack of deduplication, lost orders, and multi‑channel issues—and presents practical solutions such as distributed locking, result caching, transaction cancellation, refunds, active polling, and sync‑async notifications to reliably avoid duplicate payments.

PollingRefunddistributed-lock
0 likes · 12 min read
How to Prevent Duplicate Payments in E‑Commerce: Strategies & Best Practices
Architect
Architect
Jul 11, 2022 · Databases

Understanding Redis: Features, Use Cases, and Architectural Evolution

Redis is an open‑source, in‑memory data store that supports various data types, persistence, replication, Sentinel, clustering, Lua scripting, pipelines, and distributed locks, and the article walks through its evolution from simple caching to a high‑availability, horizontally scalable database solution.

ClusterIn-Memory Databasecaching
0 likes · 12 min read
Understanding Redis: Features, Use Cases, and Architectural Evolution
DaTaobao Tech
DaTaobao Tech
Jul 11, 2022 · Backend Development

Optimizing System Design for a High‑Traffic Gather‑Order Page with Multi‑Level Caching and Chain‑of‑Responsibility

The author refactors a high‑traffic gather‑order page by introducing a reusable multi‑level cache with update‑key validation, Redis distributed locks and asynchronous refresh, and by restructuring the processing flow using a chain‑of‑responsibility/command pattern, while also handling pagination, weighted sorting, and time‑bound marketing keys to improve reliability, extensibility, and performance.

BackendDesign PatternsSystem Design
0 likes · 29 min read
Optimizing System Design for a High‑Traffic Gather‑Order Page with Multi‑Level Caching and Chain‑of‑Responsibility
Bin's Tech Cabin
Bin's Tech Cabin
Jul 1, 2022 · Backend Development

Mastering Redis Distributed Locks: From Basics to Advanced Redlock Strategies

This comprehensive guide walks through the fundamentals, pitfalls, and advanced implementations of Redis distributed locks—including basic SETNX usage, safe lock release with Lua scripts, re‑entrant lock design, timeout handling, Redlock debates, and practical Redisson integration—providing Java developers with actionable patterns for reliable concurrency control.

JavaLuaRedlock
0 likes · 25 min read
Mastering Redis Distributed Locks: From Basics to Advanced Redlock Strategies
ITPUB
ITPUB
Jun 28, 2022 · Backend Development

Mastering Distributed Locks: Database, Redis, and Zookeeper Strategies

This article explains the design and implementation of distributed locks, covering database pessimistic and optimistic locks, various Redis lock patterns, Redisson and RedLock, as well as Zookeeper's lock mechanism, and compares their advantages, drawbacks, and suitable use cases.

BackendZooKeeperconcurrency
0 likes · 20 min read
Mastering Distributed Locks: Database, Redis, and Zookeeper Strategies
Su San Talks Tech
Su San Talks Tech
Jun 7, 2022 · Backend Development

10 Proven Techniques to Ensure Thread Safety in Java Backend Development

This article explains why thread safety is critical for backend developers, describes common data race problems, and provides ten practical strategies—including stateless design, immutability, synchronized blocks, locks, distributed locks, volatile variables, ThreadLocal, concurrent collections, CAS, and data isolation—to reliably protect shared resources in multithreaded Java applications.

Javadistributed-lockthread safety
0 likes · 13 min read
10 Proven Techniques to Ensure Thread Safety in Java Backend Development
Java High-Performance Architecture
Java High-Performance Architecture
Jun 5, 2022 · Backend Development

Redis Cache Mastery: Real-World Scenarios & Distributed Lock Solutions for Java

This article examines common Redis caching challenges in Java high‑performance architectures—such as lock loss, cache hot‑spot rebuild, cache penetration, and avalanche—through eleven real‑world scenarios, and provides practical solutions including RedLock alternatives, Zookeeper, DCL, tryLock, multi‑level caching, and Lua‑based read‑write locks.

CacheJavadistributed-lock
0 likes · 19 min read
Redis Cache Mastery: Real-World Scenarios & Distributed Lock Solutions for Java
Java Architect Essentials
Java Architect Essentials
May 30, 2022 · Backend Development

Implementing IP+URL Rate Limiting with Spring Boot Interceptor and Redis Distributed Lock

This article demonstrates how to protect a Spring Boot service from malicious requests by creating a custom interceptor that tracks URL‑IP request counts, uses Redis for distributed locking, and disables offending IPs after a configurable threshold, with full code examples and configuration steps.

InterceptorSpring Bootdistributed-lock
0 likes · 8 min read
Implementing IP+URL Rate Limiting with Spring Boot Interceptor and Redis Distributed Lock
dbaplus Community
dbaplus Community
May 25, 2022 · Backend Development

How to Ensure Concurrency Quality with Distributed Locks in E‑Commerce Systems

This article explains why concurrency issues like overselling occur in e‑commerce, introduces distributed lock concepts and mainstream implementations (MySQL, Redis, Zookeeper/etcd), and provides a three‑stage quality‑assurance framework with code‑review checklists, testing methods, and data‑reconciliation techniques.

BackendCode reviewconcurrency
0 likes · 12 min read
How to Ensure Concurrency Quality with Distributed Locks in E‑Commerce Systems
dbaplus Community
dbaplus Community
May 11, 2022 · Backend Development

Mastering Failure‑Oriented Design: Mindset, Process, and Distributed Locks

This article explores the philosophy and practical techniques of failure‑oriented design, covering why anticipating failures is crucial for developers, the organizational and process changes needed, core design principles, and concrete implementations such as multi‑level Redis distributed locks with code examples.

Backend EngineeringOperationsdistributed-lock
0 likes · 23 min read
Mastering Failure‑Oriented Design: Mindset, Process, and Distributed Locks
58 Tech
58 Tech
May 10, 2022 · Backend Development

Understanding Distributed Locks: Java Native Locks, RedissonLock, RedLock, and WLock – Concepts, Algorithms, and Source Code Analysis

This article explains the need for distributed locks, compares Java native and JUC locks, details Redis‑based implementations such as RedissonLock and RedLock, introduces the WLock solution with WPaxos and RocksDB, and provides complete source‑code walkthroughs for lock acquisition and release.

Java concurrencyWLockdistributed-lock
0 likes · 31 min read
Understanding Distributed Locks: Java Native Locks, RedissonLock, RedLock, and WLock – Concepts, Algorithms, and Source Code Analysis
Code Ape Tech Column
Code Ape Tech Column
Apr 27, 2022 · Backend Development

Understanding Task Scheduling: Quartz, Distributed Locks, ElasticJob‑Lite, XXL‑JOB and a Custom Solution

This article explains the core concepts, architectures and trade‑offs of several Java task‑scheduling solutions—including Quartz, Redis/Zookeeper distributed locks, ElasticJob‑Lite, XXL‑JOB and a self‑built scheduler—while providing code examples and practical guidance for building reliable, scalable job execution systems.

JavaQuartzXXL-JOB
0 likes · 17 min read
Understanding Task Scheduling: Quartz, Distributed Locks, ElasticJob‑Lite, XXL‑JOB and a Custom Solution
Code Ape Tech Column
Code Ape Tech Column
Apr 24, 2022 · Backend Development

Designing a High‑Concurrency Flash Sale (秒杀) System: Key Techniques and Best Practices

This article explains how to design a flash‑sale system that can handle instant massive traffic by using page staticization, CDN acceleration, caching strategies, distributed locks, message‑queue async processing, rate limiting, and inventory management techniques such as pre‑deduction, optimistic locking, and Lua scripts.

cachingdistributed-lockflash sale
0 likes · 22 min read
Designing a High‑Concurrency Flash Sale (秒杀) System: Key Techniques and Best Practices
Top Architect
Top Architect
Apr 22, 2022 · Backend Development

Understanding Mutual Exclusion and Idempotency in Distributed Systems: Distributed Locks, ReentrantLock, Zookeeper, Redis, and GTIS

This article explains the mutual‑exclusion and idempotency challenges in distributed environments, analyzes multi‑thread and multi‑process solutions, introduces the principles and implementations of distributed locks (including ReentrantLock, synchronized, Zookeeper, Redis, Tair, and the Cerberus framework), and presents GTIS as a reliable idempotency guard.

IdempotencyJavaZooKeeper
0 likes · 32 min read
Understanding Mutual Exclusion and Idempotency in Distributed Systems: Distributed Locks, ReentrantLock, Zookeeper, Redis, and GTIS
Selected Java Interview Questions
Selected Java Interview Questions
Apr 19, 2022 · Backend Development

Implementing Distributed Locks in Java: Database, Redis, and Zookeeper Solutions

This article explains the concept of distributed locks, compares three common implementation schemes—database unique indexes, Redis SETNX, and Zookeeper temporary sequential nodes—and provides complete Java code examples for each, along with analysis of re‑entrancy, lock release timing, and single‑point failures.

BackendZooKeeperconcurrency
0 likes · 13 min read
Implementing Distributed Locks in Java: Database, Redis, and Zookeeper Solutions
Java High-Performance Architecture
Java High-Performance Architecture
Apr 10, 2022 · Backend Development

Mastering Redis Distributed Locks with Jedis: Build a 100k-User Flash Sale Simulation

This article demonstrates how to implement Redis distributed locks using Jedis in Java, covering lock creation with SETNX, lock release via Lua scripts, and a high‑concurrency flash‑sale simulation with 100,000 virtual users, illustrating key concepts such as lock expiration, atomic operations, and performance testing.

JavaJedisSpringBoot
0 likes · 10 min read
Mastering Redis Distributed Locks with Jedis: Build a 100k-User Flash Sale Simulation
Yang Money Pot Technology Team
Yang Money Pot Technology Team
Mar 24, 2022 · Backend Development

Design and Implementation of a Flexible Membership Rights System

This article presents a comprehensive design and implementation of a flexible membership rights system, covering business goals, a rights configuration pool, user rights acquisition and execution flows, template‑method pattern, distributed locking, and asynchronous job handling to achieve smooth product upgrades and reliable rights management.

Backend ArchitectureDesign PatternsJava
0 likes · 18 min read
Design and Implementation of a Flexible Membership Rights System
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 idempotencyBackend DevelopmentDuplicate Requests
0 likes · 9 min read
Ensuring API Idempotency: Why It Matters and How to Implement It
Java Backend Technology
Java Backend Technology
Mar 13, 2022 · Backend Development

Why Native Java Locks Fail in Distributed Systems and How Redis & Zookeeper Solve It

This article explains the inventory oversell problem caused by Java's JVM‑local locks in multi‑machine deployments, introduces distributed locks as a solution, and compares practical implementations using Redis (including RedLock and Redisson) and Zookeeper (with Curator), providing code snippets, deployment considerations, and a pros‑cons analysis to guide technology selection.

ZooKeeperdistributed-lockredis
0 likes · 19 min read
Why Native Java Locks Fail in Distributed Systems and How Redis & Zookeeper Solve It
Java Backend Technology
Java Backend Technology
Mar 8, 2022 · Operations

Avoid Common Redis Distributed‑Lock Pitfalls and Fix Them

This article explains why naive Redis lock usage can cause non‑atomic operations, forgotten releases, lock‑stealing, re‑entrancy, read‑write contention, segmentation, timeout, master‑slave failures, and offers practical Java/Redisson/Lua solutions to make distributed locks reliable.

JavaLuaconcurrency
0 likes · 20 min read
Avoid Common Redis Distributed‑Lock Pitfalls and Fix Them
DaTaobao Tech
DaTaobao Tech
Mar 7, 2022 · Databases

MySQL InnoDB Lock Types and Deadlock Analysis

The article explains MySQL InnoDB lock scopes and modes—including record, gap, next‑key and insert‑intention locks—illustrates a deadlock caused by concurrent inserts on a distributed lock table, and recommends limiting concurrency, sharding by business key, and splitting lock operations into smaller sub‑transactions to avoid such deadlocks.

InnoDBLockdatabase
0 likes · 16 min read
MySQL InnoDB Lock Types and Deadlock Analysis
QQ Music Frontend Team
QQ Music Frontend Team
Feb 15, 2022 · Databases

Mastering Redis: From Fundamentals to Advanced Features and Real‑World Use Cases

This comprehensive guide walks you through Redis basics, its data structures, commands, installation steps, high‑concurrency principles, persistence mechanisms, replication, caching strategies, Lua scripting, pipelines, distributed locks, and cluster concepts, providing practical examples and best‑practice recommendations for developers and operators.

Data StructuresLuaPersistence
0 likes · 70 min read
Mastering Redis: From Fundamentals to Advanced Features and Real‑World Use Cases
Code Ape Tech Column
Code Ape Tech Column
Feb 10, 2022 · Databases

Redis Distributed Lock: Seven Correct Implementation Schemes

This article explains why distributed locks are needed in high‑concurrency scenarios, defines their essential properties, and systematically presents seven Redis‑based locking solutions—including SETNX+EXPIRE, timestamp values, Lua scripts, extended SET options, unique‑value verification, Redisson’s watchdog, and the Redlock algorithm—detailing their code examples, advantages, and drawbacks.

LuaRedlockdistributed-lock
0 likes · 12 min read
Redis Distributed Lock: Seven Correct Implementation Schemes
NiuNiu MaTe
NiuNiu MaTe
Feb 9, 2022 · Backend Development

How to Resolve Account Transaction Conflicts with Split Writes and Lazy Integration

This article explains the "account conflict" problem caused by massive concurrent transactions, proposes splitting read/write operations and using lazy or timed data integration to improve performance and consistency, and discusses how to ensure atomicity and isolation with transactions or distributed locks.

Data Consistencydistributed-lock
0 likes · 6 min read
How to Resolve Account Transaction Conflicts with Split Writes and Lazy Integration
Top Architect
Top Architect
Jan 15, 2022 · Backend Development

Distributed Lock Implementation Strategies: Database, Redis, and Zookeeper

This article explains why distributed locks are needed beyond Java's JVM‑level locks, compares three common implementation approaches—database unique indexes, Redis SETNX, and Zookeeper ephemeral sequential nodes—and provides concrete SQL and Java code examples with analysis of re‑entrancy, release timing, and single‑point risks.

BackendJavaZooKeeper
0 likes · 15 min read
Distributed Lock Implementation Strategies: Database, Redis, and Zookeeper
Architecture Digest
Architecture Digest
Jan 11, 2022 · Backend Development

Implementing Distributed Locks with Redis and Redisson Watchdog Mechanism

This article explains how to implement a distributed lock using Redis by setting a unique key-value pair, handling expiration, addressing lock timeout issues, and leveraging Redisson's watchdog mechanism with automatic renewal, including detailed code examples for tryLock, subscription, and renewal processes.

JavaWatchdogdistributed-lock
0 likes · 9 min read
Implementing Distributed Locks with Redis and Redisson Watchdog Mechanism
Java High-Performance Architecture
Java High-Performance Architecture
Jan 6, 2022 · Backend Development

Mastering Redis Distributed Locks: Strategies, Pitfalls, and Redisson Watchdog

Redis distributed locks rely on a key-value marker with unique client IDs, expiration times, and careful release checks; the article explores lock timeout challenges, automatic renewal via watchdog mechanisms, Redisson's tryLock implementation, Lua‑based renewal scripts, and best practices to avoid deadlocks and resource waste.

JavaWatchdogconcurrency
0 likes · 11 min read
Mastering Redis Distributed Locks: Strategies, Pitfalls, and Redisson Watchdog
Sohu Tech Products
Sohu Tech Products
Jan 5, 2022 · Backend Development

Implementing Distributed Locks with Redis and Redisson

This article explains how to implement a distributed lock using Redis, discusses challenges with lock expiration, describes automatic renewal techniques such as watchdog mechanisms, and provides detailed Java code examples of Redisson's tryLock and renewal processes.

JavaWatchdogconcurrency
0 likes · 12 min read
Implementing Distributed Locks with Redis and Redisson
Selected Java Interview Questions
Selected Java Interview Questions
Dec 24, 2021 · Backend Development

Implementing Fixed-Time Scheduled Tasks in Single-Node and Distributed Java Applications

This article explains how to implement fixed‑time scheduled tasks on a single machine using Timer and ScheduledThreadPoolExecutor, how to build a custom Redis‑based distributed scheduler with distributed locks, and compares several third‑party frameworks such as Quartz, TBSchedule, Elastic‑Job and Sature for distributed task execution.

Backend DevelopmentJavaQuartz
0 likes · 8 min read
Implementing Fixed-Time Scheduled Tasks in Single-Node and Distributed Java Applications
Cloud Native Technology Community
Cloud Native Technology Community
Dec 9, 2021 · Backend Development

Redis Distributed Locks: Safety Issues, Redlock Debate, and Best Practices

This article thoroughly examines how Redis distributed locks work, the pitfalls of simple SETNX‑based locks such as deadlocks and premature expiration, presents robust solutions using expiration, unique identifiers, Lua scripts, discusses the Redlock algorithm and its controversy, compares Zookeeper locks, and offers practical guidance for safe lock usage.

LuaRedlockZooKeeper
0 likes · 31 min read
Redis Distributed Locks: Safety Issues, Redlock Debate, and Best Practices
Programmer DD
Programmer DD
Nov 30, 2021 · Backend Development

Mastering Redis Distributed Locks with Jedis: A Hands‑On Guide

This tutorial demonstrates how to implement Redis distributed locks in Java using Jedis, covering lock creation with SETNX, expiration handling, safe unlocking via Lua scripts, and a high‑concurrency simulation of 100,000 users competing for limited stock.

JavaJedisSpring Boot
0 likes · 9 min read
Mastering Redis Distributed Locks with Jedis: A Hands‑On Guide
IT Architects Alliance
IT Architects Alliance
Nov 26, 2021 · Fundamentals

Understanding Mutual Exclusion and Idempotency in Distributed Systems: Locks, Implementations, and GTIS

This article explains the challenges of mutual exclusion and idempotency in distributed environments, compares thread‑level and process‑level solutions, describes the principles and typical implementations of distributed locks (Zookeeper, Redis, Tair, Cerberus), and introduces GTIS as a reliable idempotency framework.

IdempotencyJavaZooKeeper
0 likes · 34 min read
Understanding Mutual Exclusion and Idempotency in Distributed Systems: Locks, Implementations, and GTIS
dbaplus Community
dbaplus Community
Nov 11, 2021 · Backend Development

How to Build a High‑Performance Flash Sale System for Massive Concurrency

This guide explains how to design a robust flash‑sale (秒杀) system that handles instant high traffic by combining page staticization, CDN acceleration, caching strategies, distributed locks, optimistic DB updates, Redis atomic operations, message‑queue async processing, rate limiting, and other techniques to prevent overload, data loss, and unfair access.

cachingdistributed-lockflash sale
0 likes · 24 min read
How to Build a High‑Performance Flash Sale System for Massive Concurrency
Architect
Architect
Nov 8, 2021 · Operations

Designing High Availability for Canal Using Zookeeper: Distributed Locks and Watch Mechanism

This article explains how to achieve high availability for Canal by designing a Zookeeper‑based distributed lock and watch mechanism, covering primary‑backup role election, failure detection, thundering‑herd mitigation, fair locking, node types, watcher events, and practical Zookeeper applications such as service registration and configuration management.

CanalZooKeeperdistributed-lock
0 likes · 13 min read
Designing High Availability for Canal Using Zookeeper: Distributed Locks and Watch Mechanism
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 23, 2021 · Backend Development

Redis Distributed Locks: Safety Issues, Redlock Debate, and Best Practices

This article thoroughly examines how Redis distributed locks work, the safety challenges they face—including deadlocks, lock expiration, and node failures—explores the Redlock algorithm and its controversies, compares Redis with Zookeeper implementations, and offers practical guidelines and best‑practice solutions for reliable distributed locking.

Redlockconcurrencydistributed-lock
0 likes · 32 min read
Redis Distributed Locks: Safety Issues, Redlock Debate, and Best Practices
Open Source Linux
Open Source Linux
Oct 13, 2021 · Backend Development

Unlock 16 Powerful Redis Patterns for Scalable Backend Systems

This guide explores sixteen practical Redis use cases—from caching and distributed locks to rate limiting, bitmaps, shopping carts, timelines, and ranking—detailing data types, commands, and implementation tips that help developers build efficient, scalable backend services.

Backend DevelopmentBitmapsMessage Queue
0 likes · 9 min read
Unlock 16 Powerful Redis Patterns for Scalable Backend Systems
Tencent Cloud Developer
Tencent Cloud Developer
Oct 13, 2021 · Databases

Ensuring Data Consistency Between MySQL and Redis: Strategies and Best Practices

To keep MySQL and Redis synchronized, the article defines consistency, examines read‑only and read‑write cache inconsistency cases, and recommends practical strategies such as update‑DB‑then‑delete‑cache with message‑queue retries, binlog‑driven updates, delayed double‑delete, and Redis distributed locks, while outlining stronger protocols and key design considerations.

Cache StrategyData Consistencydistributed-lock
0 likes · 15 min read
Ensuring Data Consistency Between MySQL and Redis: Strategies and Best Practices
Programmer DD
Programmer DD
Oct 9, 2021 · Databases

Mastering Redis Locks: From SETNX to RedLock and Redisson

This article explains the fundamentals of Redis locking mechanisms, covering SETNX usage, the pitfalls of naive implementations, Lua‑based atomic unlock scripts, the Redisson client library, and the RedLock algorithm, while providing practical code examples and diagrams to illustrate each concept.

LuaRedlockdistributed-lock
0 likes · 10 min read
Mastering Redis Locks: From SETNX to RedLock and Redisson
Top Architect
Top Architect
Oct 4, 2021 · Backend Development

Mutual Exclusion and Idempotency in Distributed Systems: Problems, Principles, and Solutions

This article examines the challenges of mutual exclusion and idempotency in distributed environments, explains their underlying principles, compares multithread and multiprocess approaches, and presents practical distributed‑lock implementations such as Zookeeper, Redis, Tair, and the Cerberus framework, as well as the GTIS solution for idempotency.

CerberusDistributed SystemsGTIS
0 likes · 32 min read
Mutual Exclusion and Idempotency in Distributed Systems: Problems, Principles, and Solutions
Architect
Architect
Oct 4, 2021 · Backend Development

Common Pitfalls and Best Practices of Redis Distributed Locks

Redis distributed locks are widely used for ensuring mutual exclusion in distributed systems, but improper implementation can cause issues such as non‑atomic operations, forgotten releases, lock stealing, high contention, re‑entrancy problems, timeout handling, and master‑slave failures; this article explains each pitfall and offers practical solutions and code examples.

JavaLock Pitfallsconcurrency
0 likes · 21 min read
Common Pitfalls and Best Practices of Redis Distributed Locks
Architecture Digest
Architecture Digest
Oct 2, 2021 · Databases

Understanding Redis Locks: setnx, RedLock, Redisson and Best Practices

This article explains how Redis locking works, covering the setnx command, the importance of using unique values, atomic unlock via Lua scripts, the Redisson client features, and the RedLock distributed algorithm, while highlighting common pitfalls and practical recommendations.

Lua ScriptRedlockdistributed-lock
0 likes · 10 min read
Understanding Redis Locks: setnx, RedLock, Redisson and Best Practices
MaGe Linux Operations
MaGe Linux Operations
Oct 1, 2021 · Backend Development

Mastering Redis Distributed Locks: From SetNX to RedLock and Redisson

This article explores the most common Redis locking mechanisms—SetNX, RedLock, and Redisson—detailing their principles, pitfalls, and implementation nuances, including code examples, Lua scripts for atomic unlocks, and best‑practice recommendations for building reliable distributed locks in backend systems.

Backend DevelopmentRedlockdistributed-lock
0 likes · 11 min read
Mastering Redis Distributed Locks: From SetNX to RedLock and Redisson
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 29, 2021 · Databases

Redis Interview Questions and Core Concepts: Data Types, Performance, Persistence, High Availability, and Common Use Cases

This article provides a comprehensive overview of Redis, covering its definition, basic and special data structures, performance optimizations, expiration and eviction policies, common application scenarios, persistence mechanisms, high‑availability architectures, distributed lock implementations, transaction handling, and related algorithms such as Redlock and Bloom filters.

CacheData Structuresdistributed-lock
0 likes · 45 min read
Redis Interview Questions and Core Concepts: Data Types, Performance, Persistence, High Availability, and Common Use Cases
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 26, 2021 · Backend Development

Understanding Distributed Locks with Redis and Redisson: Concepts, Implementation, and RedLock Algorithm

This article explains what distributed locks are, their requirements, how to implement them using Redis commands and the Redisson library in Java, and introduces the RedLock algorithm for multi‑node fault‑tolerant locking, complete with code examples and practical considerations.

Javaconcurrencydistributed-lock
0 likes · 28 min read
Understanding Distributed Locks with Redis and Redisson: Concepts, Implementation, and RedLock Algorithm
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Sep 24, 2021 · Backend Development

Mastering Redis: 16 Real-World Patterns for Caching, Locks, Counters, and More

This article presents sixteen practical Redis use‑cases—including caching, distributed sessions, locks, global IDs, counters, rate limiting, bitmap statistics, shopping carts, timelines, message queues, lotteries, likes, tags, filtering, follow models, and ranking—explaining their data types, commands, and sample code.

BitmapCounterMessage Queue
0 likes · 8 min read
Mastering Redis: 16 Real-World Patterns for Caching, Locks, Counters, and More
Sohu Tech Products
Sohu Tech Products
Sep 22, 2021 · Databases

Common Redis Use Cases and Implementation Patterns

This article introduces a collection of practical Redis use cases—including caching, distributed sessions, locks, global IDs, counters, rate limiting, bitmaps, shopping carts, timelines, message queues, lotteries, likes, tags, product filtering, follow relationships, and ranking—explaining their data types, commands, and sample code.

Bitmapscachingdistributed-lock
0 likes · 8 min read
Common Redis Use Cases and Implementation Patterns
Code Ape Tech Column
Code Ape Tech Column
Sep 15, 2021 · Backend Development

Designing a High‑Concurrency Flash‑Sale (Seckill) System: Key Techniques and Best Practices

This article explains how to design a high‑concurrency flash‑sale system by addressing instant traffic spikes, page static‑generation, CDN acceleration, button activation, read‑heavy/write‑light patterns, cache breakdown and penetration, inventory pre‑deduction, distributed locking, message‑queue handling, and multi‑level rate limiting.

cachingdistributed-lockflash sale
0 likes · 23 min read
Designing a High‑Concurrency Flash‑Sale (Seckill) System: Key Techniques and Best Practices
Selected Java Interview Questions
Selected Java Interview Questions
Sep 9, 2021 · Backend Development

Preventing Overselling in Flash‑Sale (SecKill) Systems with a Redis Distributed Lock

This article explains how a naïve SpringBoot SecKill implementation can cause overselling, then introduces Redis commands (SETNX, EXPIRE, GETSET) and a custom RedisLock component to achieve safe distributed locking, avoid deadlocks, and ensure accurate inventory updates during high‑concurrency flash‑sale events.

JavaSeckillSpringBoot
0 likes · 10 min read
Preventing Overselling in Flash‑Sale (SecKill) Systems with a Redis Distributed Lock
NiuNiu MaTe
NiuNiu MaTe
Sep 8, 2021 · Backend Development

Mastering Distributed Locks with Redis: From Basics to RedLock

This article explains what distributed locks are, outlines their essential properties, walks through step‑by‑step Redis implementations—from simple SETNX to Lua‑based atomic operations—and discusses reliability strategies such as master‑slave failover and RedLock while highlighting the inherent limits of any distributed lock.

Lua scriptingRedlockdistributed-lock
0 likes · 11 min read
Mastering Distributed Locks with Redis: From Basics to RedLock
Java Backend Technology
Java Backend Technology
Aug 31, 2021 · Backend Development

How to Build a High‑Performance Flash Sale System: 9 Essential Design Tips

This article explains how to design a flash‑sale (秒杀) system that can handle instant high concurrency by using page static‑generation, CDN acceleration, caching strategies, distributed locks, message‑queue async processing, stock pre‑deduction, rate limiting and other techniques to ensure reliability and prevent overselling.

distributed-lockflash sale
0 likes · 28 min read
How to Build a High‑Performance Flash Sale System: 9 Essential Design Tips
Code Ape Tech Column
Code Ape Tech Column
Aug 29, 2021 · Backend Development

Understanding Idempotency and Preventing Duplicate Submissions in Backend Systems

This article explains the concept of idempotency, the common causes of duplicate submissions in web applications, and presents multiple backend solutions—including frontend button disabling, Post‑Redirect‑Get, session tokens, local locks with Content‑MD5, AOP aspects, and Redis distributed locks—accompanied by complete Java code examples.

Javaaopdistributed-lock
0 likes · 15 min read
Understanding Idempotency and Preventing Duplicate Submissions in Backend Systems
Programmer DD
Programmer DD
Aug 22, 2021 · Backend Development

Mastering Distributed Locks with Redis: From Basics to Redisson

This article walks through the evolution of Redis‑based distributed locks, illustrating common pitfalls and step‑by‑step improvements—from simple set‑if‑absent locks to atomic UUID checks and Lua‑scripted releases, culminating in a robust Redisson solution.

JavaSpring Bootdistributed-lock
0 likes · 8 min read
Mastering Distributed Locks with Redis: From Basics to Redisson
Dada Group Technology
Dada Group Technology
Aug 13, 2021 · Backend Development

Inside JD Daojia’s After‑Sale System: Distributed Locks, Data Sync, and Refund Strategies

This article examines JD Daojia’s after‑sale platform, detailing its three‑tier architecture, distributed‑lock mechanisms for multi‑endpoint requests, complex promotion‑aware split‑data handling, Elasticsearch synchronization, combined‑order logistics, and rigorous refund validation to ensure accurate and performant service delivery.

BackendElasticsearchRefund
0 likes · 16 min read
Inside JD Daojia’s After‑Sale System: Distributed Locks, Data Sync, and Refund Strategies
Laravel Tech Community
Laravel Tech Community
Aug 12, 2021 · Backend Development

Cache Penetration, Cache Breakdown, and Cache Avalanche: Concepts and Solutions

The article explains the concepts of cache penetration, cache breakdown, and cache avalanche in Redis‑based systems, analyzes the performance problems they cause under high concurrency, and presents practical mitigation techniques such as Bloom filters, caching empty objects, distributed locks, high‑availability clusters, rate limiting, and data pre‑warming.

BackendCachebloom-filter
0 likes · 6 min read
Cache Penetration, Cache Breakdown, and Cache Avalanche: Concepts and Solutions
Top Architect
Top Architect
Aug 9, 2021 · Backend Development

Understanding Thread, Process, and Distributed Locks and Their Implementation

This article explains the differences between thread, process, and distributed locks, describes how distributed locks work using third‑party storage such as Redis or Zookeeper, discusses implementation details, and highlights when and why to use them in backend systems.

ZooKeeperdistributed-lockprocess lock
0 likes · 9 min read
Understanding Thread, Process, and Distributed Locks and Their Implementation
Yang Money Pot Technology Team
Yang Money Pot Technology Team
Aug 4, 2021 · Backend Development

Design and Implementation of ylock: A Distributed ReentrantReadWriteLock Framework

This article explains the challenges of distributed locking, compares existing lock services, and details the design, implementation, and monitoring features of the ylock framework, which provides reentrant read‑write locks over Redis and Zookeeper with unified APIs and Spring Boot integration.

Spring BootZooKeeperdistributed-lock
0 likes · 24 min read
Design and Implementation of ylock: A Distributed ReentrantReadWriteLock Framework
Java Architect Essentials
Java Architect Essentials
Aug 2, 2021 · Backend Development

Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking

The article provides a comprehensive overview of Java garbage‑collection algorithms, JVM memory regions, object reachability analysis, the semantics of volatile, synchronized and ReentrantLock, thread‑pool creation and operation, deadlock examples, distributed‑lock strategies, and related tooling such as JUC utilities and Git conflict handling.

Garbage CollectionJVMJava
0 likes · 23 min read
Java Garbage Collection, JVM Memory Model, Concurrency Locks, Thread Pools and Distributed Locking
Su San Talks Tech
Su San Talks Tech
Jul 29, 2021 · Backend Development

How to Build a High‑Performance Flash Sale System: 9 Essential Design Tips

Designing a flash‑sale (秒杀) system for massive concurrent users requires careful handling of instant traffic spikes, page staticization, CDN acceleration, caching strategies, distributed locks, rate limiting, asynchronous processing, and reliable stock management, with nine detailed techniques to ensure stability and prevent overselling.

Backend Developmentcachingdistributed-lock
0 likes · 26 min read
How to Build a High‑Performance Flash Sale System: 9 Essential Design Tips
Wukong Talks Architecture
Wukong Talks Architecture
Jul 25, 2021 · Backend Development

Understanding Cache Breakdown and Effective Mitigation Strategies

The article explains the concept of cache breakdown—when an expiring cache key triggers a surge of database requests—and presents three practical mitigation approaches: using never‑expire for immutable data, applying distributed or local locks for infrequently updated data, and employing scheduled pre‑warming or expiration extension for frequently changing or slow‑refreshing caches.

cache-breakdowndistributed-lock
0 likes · 2 min read
Understanding Cache Breakdown and Effective Mitigation Strategies
Laravel Tech Community
Laravel Tech Community
Jul 23, 2021 · Backend Development

Cache Penetration, Cache Breakdown, and Cache Avalanche: Concepts and Mitigation Strategies

The article explains the concepts of cache penetration, cache breakdown, and cache avalanche in Redis‑based systems, describes the performance risks they pose to persistent databases, and presents practical mitigation techniques such as Bloom filters, empty‑object caching, hot‑key permanence, distributed locks, high‑availability clusters, rate limiting, and data pre‑warming.

BackendCachebloom-filter
0 likes · 6 min read
Cache Penetration, Cache Breakdown, and Cache Avalanche: Concepts and Mitigation Strategies
vivo Internet Technology
vivo Internet Technology
Jul 21, 2021 · Backend Development

Resolving Duplicate OpenID Insertions in Fast App Center: Analysis and Distributed Lock Solutions

The Fast App Center’s duplicate OpenID rows were traced to a non‑atomic check‑then‑insert race condition, prompting the team to evaluate a unique‑index safeguard versus application‑level distributed locking, ultimately implementing a Redis‑based lock to serialize inserts and adding a cleanup job to purge existing duplicates.

Backend DevelopmentDatabase ConcurrencyJava
0 likes · 18 min read
Resolving Duplicate OpenID Insertions in Fast App Center: Analysis and Distributed Lock Solutions
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jul 9, 2021 · Backend Development

Comprehensive Overview of Zookeeper: Architecture, Core Functions, Protocols, and Use Cases

This article provides a detailed introduction to Zookeeper, covering its definition as a distributed coordination service, core features such as a hierarchical file system, notification mechanism, and cluster management, various application scenarios, the ZAB protocol, node types, leader election process, distributed lock implementation, and watch mechanism, all illustrated with diagrams.

Backend DevelopmentDistributed CoordinationZAB Protocol
0 likes · 8 min read
Comprehensive Overview of Zookeeper: Architecture, Core Functions, Protocols, and Use Cases
macrozheng
macrozheng
Jun 15, 2021 · Backend Development

Mastering Redisson: Seamless Distributed Locks in Spring Boot

This tutorial explains what Redisson is, how it extends Redis with powerful distributed data structures and lock mechanisms, and provides step‑by‑step Spring Boot integration, code examples, and detailed testing of re‑entrant, read‑write, and semaphore locks.

JavaSpring Bootconcurrency
0 likes · 15 min read
Mastering Redisson: Seamless Distributed Locks in Spring Boot
ITPUB
ITPUB
Jun 11, 2021 · Backend Development

Is Redis Distributed Lock Really Safe? Uncovering Redlock, Pitfalls, and Best Practices

This comprehensive guide explains why distributed locks are needed, walks through basic Redis lock implementations, reveals common dead‑lock and expiration issues, presents atomic solutions with SET EX NX and Lua scripts, evaluates the Redlock algorithm, examines expert debates, compares Zookeeper locks, and offers practical recommendations for safe usage.

Distributed SystemsLua ScriptSafety
0 likes · 35 min read
Is Redis Distributed Lock Really Safe? Uncovering Redlock, Pitfalls, and Best Practices
Wukong Talks Architecture
Wukong Talks Architecture
Jun 9, 2021 · Backend Development

Inventory Deduction Strategies for Flash Sale (秒杀) Systems

This article examines three inventory‑deduction approaches for flash‑sale scenarios, discusses methods to mitigate malicious buyers, addresses payment‑failure due to insufficient stock, presents database‑level solutions to prevent overselling under high concurrency, and explores practical implementations using order‑time deduction, Redis caching, and rate limiting.

distributed-lockflash saleinventory
0 likes · 9 min read
Inventory Deduction Strategies for Flash Sale (秒杀) Systems
Top Architect
Top Architect
May 8, 2021 · Backend Development

Distributed Locks: Why They Are Needed, Required Conditions, and Three Implementation Approaches (Database, Redis, Zookeeper)

This article explains the necessity of distributed locks in multi‑node applications, outlines the essential properties a distributed lock must satisfy, and compares three common implementation methods—database‑based exclusive locks, Redis‑based locks, and Zookeeper‑based locks—highlighting their advantages, drawbacks, and usage patterns.

BackendRedis LockZookeeper lock
0 likes · 15 min read
Distributed Locks: Why They Are Needed, Required Conditions, and Three Implementation Approaches (Database, Redis, Zookeeper)
Youzan Coder
Youzan Coder
Apr 30, 2021 · Backend Development

Uncovering Hidden Flaws in a Distributed Lock Implementation: A Structured Code Review

This article examines the business context and collection workflow of a BOS‑integrated service, dissects the distributed lock logic and its execution sequence, and conducts a thorough structured code review that reveals logical, exception, non‑functional, and testability issues while offering concrete improvement recommendations.

BackendCode reviewJava
0 likes · 8 min read
Uncovering Hidden Flaws in a Distributed Lock Implementation: A Structured Code Review
dbaplus Community
dbaplus Community
Apr 21, 2021 · Backend Development

21 Essential Redis Practices: Key Design, Pipelines, Locks, and Performance Tips

This guide compiles 21 practical Redis usage guidelines covering key naming conventions, value size limits, expiration strategies, batch operations, risky commands, distributed lock patterns, cache consistency, capacity planning, and common pitfalls like cache penetration, snowball, and hot‑key issues, helping developers and operators build reliable, high‑performance Redis deployments.

Cache ConsistencyKey DesignPipeline
0 likes · 21 min read
21 Essential Redis Practices: Key Design, Pipelines, Locks, and Performance Tips
Architect's Tech Stack
Architect's Tech Stack
Apr 20, 2021 · Backend Development

Redis Distributed Lock Failure Analysis and Safer Lock Implementation for High‑Concurrency Seckill

This article examines a real‑world incident where a Redis‑based distributed lock caused a 100‑bottle oversell of a scarce product, analyzes the root causes such as lock expiration and non‑atomic stock checks, and presents safer lock and stock‑validation solutions using Lua scripts and atomic Redis operations.

Javaconcurrencydistributed-lock
0 likes · 11 min read
Redis Distributed Lock Failure Analysis and Safer Lock Implementation for High‑Concurrency Seckill
Open Source Linux
Open Source Linux
Apr 16, 2021 · Operations

Mastering ZooKeeper: Core Concepts, Architecture, and Real‑World Use Cases

This comprehensive guide explains ZooKeeper’s role as a distributed coordination service, covering its consistency guarantees, Znode hierarchy, ZAB protocol, watcher mechanism, ACLs, server roles, data synchronization modes, deployment options, dynamic scaling, and typical use cases such as configuration management, service discovery, leader election, distributed locks and queues.

ACLDistributed CoordinationWatcher
0 likes · 23 min read
Mastering ZooKeeper: Core Concepts, Architecture, and Real‑World Use Cases
Ops Development Stories
Ops Development Stories
Apr 12, 2021 · Backend Development

Mastering Zookeeper Distributed Locks: From Seckill to Read‑Write Locks

This article explains how Zookeeper’s distributed lock mechanisms—including non‑fair, fair, and read‑write locks—can prevent overselling in high‑traffic seckill scenarios, details their advantages and drawbacks, and provides practical Curator‑based Java implementations with code examples.

JavaZooKeeperconcurrency
0 likes · 13 min read
Mastering Zookeeper Distributed Locks: From Seckill to Read‑Write Locks
macrozheng
macrozheng
Apr 1, 2021 · Backend Development

21 Essential Redis Usage Tips to Avoid Common Pitfalls

This article compiles 21 practical Redis guidelines covering key naming, value sizing, expiration strategies, batch operations, risky commands, distributed lock patterns, cache consistency, capacity planning, and configuration tips, helping developers and operators build reliable, high‑performance Redis‑backed systems.

cachingdistributed-lockperformance
0 likes · 25 min read
21 Essential Redis Usage Tips to Avoid Common Pitfalls
Code Ape Tech Column
Code Ape Tech Column
Mar 29, 2021 · Backend Development

Understanding Distributed Locks and Their Implementation with Redis and Zookeeper

Distributed locks ensure exclusive access across multiple servers in high-concurrency scenarios, and this article explains their necessity, illustrates problems with simple locks, and details practical implementations using Redis and Zookeeper, including lock acquisition, release, expiration handling, and avoiding deadlocks.

ZooKeeperconcurrencydistributed-lock
0 likes · 13 min read
Understanding Distributed Locks and Their Implementation with Redis and Zookeeper
Java Captain
Java Captain
Mar 28, 2021 · Backend Development

Analysis and Solutions for Redis Distributed Lock Over‑selling in High‑Concurrency Seckill Scenario

This article examines a real‑world flash‑sale incident where Redis distributed locks failed, causing severe overselling, and presents root‑cause analysis, safer lock implementation with Lua scripts, atomic stock handling, refactored Java code, and deeper reflections on lock necessity and further optimizations.

JavaLuaSeckill
0 likes · 10 min read
Analysis and Solutions for Redis Distributed Lock Over‑selling in High‑Concurrency Seckill Scenario
360 Tech Engineering
360 Tech Engineering
Mar 15, 2021 · Backend Development

Distributed Lock Implementations with Redis, Etcd, and Zookeeper

This article explains the concept, application scenarios, and detailed implementations of distributed locks using Redis, Etcd, and Zookeeper, providing Java code examples, lock mechanisms, lease handling, watch features, and a comparative summary of their advantages and drawbacks.

distributed-lock
0 likes · 14 min read
Distributed Lock Implementations with Redis, Etcd, and Zookeeper
360 Quality & Efficiency
360 Quality & Efficiency
Mar 12, 2021 · Backend Development

Distributed Lock Implementations with Redis, Etcd, and Zookeeper

This article explains the concept of distributed locks, outlines common application scenarios, and provides detailed Java implementations using Redis (including Redisson and RedLock), Etcd, and Zookeeper, complete with code examples and a comparative summary of their advantages and drawbacks.

Backenddistributed-locketcd
0 likes · 14 min read
Distributed Lock Implementations with Redis, Etcd, and Zookeeper
360 Smart Cloud
360 Smart Cloud
Feb 25, 2021 · Backend Development

Understanding Distributed Locks: Concepts, System Classification, and Implementations with Redis and etcd/Zookeeper

This article explains the fundamentals of distributed locks, compares lock implementations based on asynchronous replication and Paxos protocols, and provides practical Redis and etcd/Zookeeper examples—including exclusive and shared lock mechanisms, code snippets, and usage considerations for reliability and safety.

BackendZooKeeperconcurrency
0 likes · 9 min read
Understanding Distributed Locks: Concepts, System Classification, and Implementations with Redis and etcd/Zookeeper
Selected Java Interview Questions
Selected Java Interview Questions
Feb 4, 2021 · Backend Development

Understanding Thread Locks, Process Locks, and Distributed Locks: Concepts and Implementation with Redis and Zookeeper

This article explains the differences between thread, process, and distributed locks, describes how distributed locks are implemented using third‑party storage such as Redis and Zookeeper, and discusses practical scenarios, advantages, and design considerations for using distributed locks in high‑concurrency systems.

distributed-lock
0 likes · 10 min read
Understanding Thread Locks, Process Locks, and Distributed Locks: Concepts and Implementation with Redis and Zookeeper
Programmer DD
Programmer DD
Dec 29, 2020 · Backend Development

Mastering Locks: Optimistic, Pessimistic, and Distributed Strategies for High-Concurrency Systems

This article explains the different lock types—pessimistic, optimistic, and distributed—covers their use cases, compares their advantages and drawbacks, and provides concrete code examples and four practical solutions for handling high‑concurrency deduction scenarios such as inventory or balance reduction.

Javadistributed-lockoptimistic lock
0 likes · 13 min read
Mastering Locks: Optimistic, Pessimistic, and Distributed Strategies for High-Concurrency Systems
Java Interview Crash Guide
Java Interview Crash Guide
Dec 29, 2020 · Backend Development

How Distributed Locks Prevent Chaos in Massive Red‑Packet Systems

This article explains why traditional locks fail under massive concurrent traffic, how distributed locks coordinate multiple servers to ensure correct total payouts, and compares Redis and Zookeeper implementations, highlighting their mechanisms, pitfalls, and practical considerations for large‑scale systems.

ScalabilityZooKeeperconcurrency
0 likes · 13 min read
How Distributed Locks Prevent Chaos in Massive Red‑Packet Systems