Tagged articles

distributed lock

459 articles · Page 3 of 5
Java High-Performance Architecture
Java High-Performance Architecture
Apr 26, 2023 · Backend Development

How to Build a Robust Redis Distributed Lock with Spring AOP

This article explains why time‑consuming business operations need a distributed lock, walks through using Redis as a lock with Spring AOP, details the lock‑acquire, timeout, and renewal mechanisms, provides full code examples, testing steps, and best‑practice recommendations for reliable concurrency control in Java back‑end services.

ConcurrencyJavaRedis
0 likes · 12 min read
How to Build a Robust Redis Distributed Lock with Spring AOP
Java Interview Crash Guide
Java Interview Crash Guide
Apr 21, 2023 · Databases

Mastering Redis: Core Uses, Data Types, Persistence, and Performance Tricks

This article explains Redis’s primary roles as a high‑speed cache, in‑memory database, and analytics engine, compares it with relational databases, details its data structures, single‑threaded performance, persistence options, expiration and eviction policies, distributed lock implementation, and strategies for cache penetration, breakdown, and avalanche.

In-Memory DatabaseRedisdistributed lock
0 likes · 21 min read
Mastering Redis: Core Uses, Data Types, Persistence, and Performance Tricks
Architecture Digest
Architecture Digest
Apr 21, 2023 · Backend Development

Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal

This article explains how to protect time‑consuming business operations by using Redis as a distributed lock, designing a custom @RedisLock annotation, applying Spring AOP to intercept methods, handling lock acquisition, expiration, renewal via a ScheduledExecutorService, and releasing the lock safely after execution.

AOPConcurrencyJava
0 likes · 12 min read
Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal
Su San Talks Tech
Su San Talks Tech
Apr 18, 2023 · Backend Development

Mastering Alibaba Sentinel: Real‑Time Flow Control and Circuit Breaking for Spring Cloud

This article introduces Alibaba Sentinel's lightweight traffic‑control and circuit‑breaking capabilities, walks through quick setup, advanced rule configuration, Spring Cloud Alibaba integration, custom extensions, distributed lock and A/B testing implementations, and discusses its limitations and future prospects for microservice reliability.

A/B testingCircuit BreakingSentinel
0 likes · 19 min read
Mastering Alibaba Sentinel: Real‑Time Flow Control and Circuit Breaking for Spring Cloud
Top Architect
Top Architect
Apr 11, 2023 · Backend Development

Designing a High‑Concurrency Flash‑Sale System: Architecture, Strategies, and Implementation Details

This article presents a comprehensive, seven‑dimensional design for a flash‑sale (秒杀) system, covering business characteristics, overall architecture, peak‑limiting, Nginx configuration, page optimization, Redis clustering, message‑queue throttling, database design, captcha mechanisms, and key precautions for achieving high throughput and reliability.

Flash SaleHigh ConcurrencyRedis
0 likes · 13 min read
Designing a High‑Concurrency Flash‑Sale System: Architecture, Strategies, and Implementation Details
Architect
Architect
Apr 4, 2023 · Backend Development

Evolution of Distributed Locks with Redis and Redisson

This article walks through the step‑by‑step evolution of Redis‑based distributed lock implementations—from simple SETNX locking to atomic expiration, UUID‑based ownership, Lua‑scripted safe release, and finally using Redisson’s high‑level lock API—illustrating common pitfalls and robust solutions.

BackendConcurrencyJava
0 likes · 8 min read
Evolution of Distributed Locks with Redis and Redisson
Wukong Talks Architecture
Wukong Talks Architecture
Apr 2, 2023 · Backend Development

Implementing Distributed Locks with Redis: From Basic to Advanced Schemes

This article examines the shortcomings of local locking in microservices, introduces distributed locking concepts, and walks through five progressive Redis-based lock implementations—from a simple SETNX bronze approach to a Lua‑scripted diamond solution—detailing their mechanisms, code examples, and trade‑offs.

JavaLua scriptdistributed lock
0 likes · 16 min read
Implementing Distributed Locks with Redis: From Basic to Advanced Schemes
IT Services Circle
IT Services Circle
Mar 31, 2023 · Backend Development

Understanding Distributed Locks and Implementations with Redis and Redisson

This article explains the concept of distributed locks, compares them with local JVM locks, outlines essential properties, demonstrates simple Redis-based lock implementations using SETNX and Lua scripts, discusses lock expiration and renewal, and introduces Redisson's advanced features such as automatic watchdog renewal and the Redlock algorithm.

Javadistributed lockredisson
0 likes · 13 min read
Understanding Distributed Locks and Implementations with Redis and Redisson
Snowball Engineer Team
Snowball Engineer Team
Mar 29, 2023 · Databases

Mastering Redis: Architecture, Use Cases, Testing Pitfalls & Solutions

This article provides a comprehensive overview of Redis—including its architecture, common data structures, real‑world usage scenarios such as caching, counters, and distributed locks—followed by detailed QA test cases, common pitfalls like cache penetration, and practical mitigation strategies.

CachingPerformanceRedis
0 likes · 16 min read
Mastering Redis: Architecture, Use Cases, Testing Pitfalls & Solutions
Selected Java Interview Questions
Selected Java Interview Questions
Mar 14, 2023 · Databases

16 Common Redis Use Cases and How to Implement Them

This article outlines sixteen practical Redis usage scenarios—including caching, distributed sessions, locks, ID generation, counters, rate limiting, bitmaps, shopping carts, timelines, message queues, lotteries, likes, tags, filtering, follow relationships, and leaderboards—explaining each concept and providing example code snippets for implementation.

BitmapsLeaderboardRedis
0 likes · 9 min read
16 Common Redis Use Cases and How to Implement Them
vivo Internet Technology
vivo Internet Technology
Mar 8, 2023 · Backend Development

Design and Architecture of Vivo E‑commerce Inventory System

The article details Vivo Mall’s inventory system evolution from a tightly‑coupled service to a layered architecture handling multiple stock types, high‑concurrency flash‑sale deductions, duplicate‑deduction safeguards, hotspot mitigation, and CDC‑based synchronization, outlining current capabilities and future unified management goals.

High Concurrencydistributed locke-commerce
0 likes · 17 min read
Design and Architecture of Vivo E‑commerce Inventory System
ITPUB
ITPUB
Feb 7, 2023 · Backend Development

How Redis Enables Ultra‑Fast Flash Sale Handling

This article explains why Redis is essential for flash‑sale (秒杀) systems, detailing the load characteristics, the three sale phases, stock‑checking and decrement strategies, atomic operations, distributed locks, data modeling, and practical deployment recommendations for high‑concurrency back‑end services.

Flash SaleHigh ConcurrencyRedis
0 likes · 11 min read
How Redis Enables Ultra‑Fast Flash Sale Handling
JavaEdge
JavaEdge
Jan 25, 2023 · Backend Development

How Redis Powers High‑Concurrency Flash Sales (秒杀)

This article explains why Redis is essential for flash‑sale systems, detailing load characteristics, the three sale phases, Redis features such as high concurrency and atomic operations, and practical implementations using Lua scripts and distributed locks to ensure safe stock checking and deduction.

Flash SaleHigh ConcurrencyRedis
0 likes · 12 min read
How Redis Powers High‑Concurrency Flash Sales (秒杀)
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 3, 2023 · Backend Development

Understanding Distributed Locks and Redis RedLock Implementation

This article explains the concept of distributed locks, illustrates real‑world scenarios such as concurrent ATM transactions, and details how to implement reliable distributed locking with Redis using TTL keys, SETNX, Lua scripts, lock renewal, high‑availability considerations, and the RedLock algorithm.

BackendConcurrencyLua
0 likes · 8 min read
Understanding Distributed Locks and Redis RedLock Implementation
Su San Talks Tech
Su San Talks Tech
Jan 3, 2023 · Fundamentals

What Makes Apache ZooKeeper the Backbone of Distributed Coordination?

This article explains Apache ZooKeeper's role as a reliable distributed coordination service, covering its ZAB protocol, hierarchical data model, node types, watches, session management, ACLs, serialization, cluster architecture, leader election, ZAB algorithm, log cleanup, distributed locks, ID generation, load balancing, and real‑world integrations with Dubbo and Kafka.

ACLDistributed CoordinationLeader Election
0 likes · 49 min read
What Makes Apache ZooKeeper the Backbone of Distributed Coordination?
Top Architect
Top Architect
Dec 14, 2022 · Backend Development

Implementing Inventory Deduction and Preventing Overselling in E‑commerce with MySQL and Redis

This article explains three common inventory‑deduction strategies for e‑commerce—single‑field MySQL, multi‑row MySQL, and Redis incrby—analyzes their drawbacks under high concurrency, and provides a complete Redis‑Lua based solution with distributed locking, including full Java code examples for the callback interface, stock service, and controller.

InventoryRedisdistributed lock
0 likes · 10 min read
Implementing Inventory Deduction and Preventing Overselling in E‑commerce with MySQL and Redis
Java Architect Essentials
Java Architect Essentials
Nov 30, 2022 · Backend Development

Understanding Redisson Distributed Locks: Architecture, Reentrancy, Fairness, and WatchDog Mechanism

This article explains Redisson's role as a Java in‑memory data grid built on Redis, compares it with Jedis and Lettuce, and details how Redisson implements distributed locks—including simple lock/unlock, Lua‑based reentrant locks, automatic lock renewal (WatchDog), and a fair lock using Redis lists and sorted sets—providing complete code examples and execution flow.

LuaRedisdistributed lock
0 likes · 31 min read
Understanding Redisson Distributed Locks: Architecture, Reentrancy, Fairness, and WatchDog Mechanism
ITPUB
ITPUB
Nov 26, 2022 · Databases

Mastering Redis Distributed Locks with Jedis: A Step‑by‑Step Guide

This article introduces Redis’s evolution, key features for distributed locking, explains lock and unlock workflows with Jedis, presents Java code examples, discusses pitfalls like non‑atomic operations, and offers configuration and performance tuning tips for reliable, high‑availability lock services.

JavaJedisRedis
0 likes · 20 min read
Mastering Redis Distributed Locks with Jedis: A Step‑by‑Step Guide
Java Captain
Java Captain
Nov 18, 2022 · Backend Development

Preventing Coupon Over‑Issuance in High‑Concurrency Scenarios with Java, SQL, and Redis Distributed Locks

This article analyzes the coupon over‑issuance issue caused by concurrent requests, demonstrates why simple SQL updates can fail under load, and presents four solutions—including Java synchronized blocks, conditional SQL updates, Redis distributed locks, and Redisson’s lock implementation—to ensure atomic stock reduction and prevent negative inventory.

coupondistributed lock
0 likes · 11 min read
Preventing Coupon Over‑Issuance in High‑Concurrency Scenarios with Java, SQL, and Redis Distributed Locks
IT Architects Alliance
IT Architects Alliance
Nov 17, 2022 · Backend Development

Cache Update Strategies and Concurrency Control: CAS, Distributed Locks, Asynchronous Updates, and Delayed Double Delete

This article examines cache update strategies in high‑concurrency systems, analyzing the trade‑offs of delete‑then‑write versus write‑then‑write approaches, illustrating race conditions, and presenting solutions such as CAS, distributed locks, asynchronous updates, and delayed double‑delete to maintain data consistency.

CAScacheconsistency
0 likes · 8 min read
Cache Update Strategies and Concurrency Control: CAS, Distributed Locks, Asynchronous Updates, and Delayed Double Delete
58 Tech
58 Tech
Nov 17, 2022 · Backend Development

Design and Migration Strategies for the WLock Distributed Lock Service

The article presents the architecture of WLock, a Paxos‑based distributed lock service, analyzes key isolation schemes, evaluates cluster expansion and splitting, and details a multi‑step key migration process—including forward and reverse migration, node scaling, and consistency safeguards—to achieve high‑availability and isolated lock handling in multi‑tenant environments.

Key MigrationPaxosWLock
0 likes · 18 min read
Design and Migration Strategies for the WLock Distributed Lock Service
Java Architect Essentials
Java Architect Essentials
Nov 6, 2022 · Backend Development

Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java

This article explains how to design and implement a distributed lock using Redis, Spring AOP annotations, and a scheduled executor to automatically extend lock expiration, providing complete Java code examples, configuration details, testing procedures, and best‑practice recommendations for handling long‑running business operations safely.

AOPConcurrencyRedis
0 likes · 12 min read
Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java
Java High-Performance Architecture
Java High-Performance Architecture
Nov 4, 2022 · Backend Development

Mastering Distributed Locks with Redis: From Basic SetNX to Redisson’s Atomic Solutions

This article walks through the evolution of Redis-based distributed locking—from simple SETNX placeholders and manual expiration, through atomic SETNX EX, UUID‑based lock ownership, Lua‑scripted unlocks, and finally Redisson’s high‑level lock API—highlighting common pitfalls and robust solutions for backend developers.

JavaRedisdistributed lock
0 likes · 10 min read
Mastering Distributed Locks with Redis: From Basic SetNX to Redisson’s Atomic Solutions
dbaplus Community
dbaplus Community
Oct 26, 2022 · Backend Development

Designing a Scalable After‑Sales System: Architecture, Distributed Locks, and ES Sync

This article explains the capabilities, positioning, and three‑tier architecture of JD Daojia's after‑sales system, detailing how it handles multi‑endpoint requests, distributed locking, promotion‑aware split data, Elasticsearch synchronization, combined return logistics, and accurate refund processing.

System Designafter-salesdata synchronization
0 likes · 16 min read
Designing a Scalable After‑Sales System: Architecture, Distributed Locks, and ES Sync
Top Architect
Top Architect
Oct 20, 2022 · Backend Development

Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal

This article explains how to implement a Redis-based distributed lock in Spring Boot using custom annotations, AOP interception, and a scheduled executor to automatically renew lock expiration, providing a complete design, code examples, and testing guidance for handling long-running operations safely.

ConcurrencyJavaRedis
0 likes · 12 min read
Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal
Java High-Performance Architecture
Java High-Performance Architecture
Oct 18, 2022 · Backend Development

How to Implement a Robust Redis Distributed Lock with Spring AOP and Auto‑Renewal

This article explains the design and implementation of a Redis‑based distributed lock using Spring AOP, covering annotation creation, pointcut definition, lock acquisition, automatic renewal via a scheduled thread pool, error handling, and testing to ensure safe concurrent access to critical business data.

ConcurrencyJavaRedis
0 likes · 13 min read
How to Implement a Robust Redis Distributed Lock with Spring AOP and Auto‑Renewal
Top Architect
Top Architect
Oct 11, 2022 · Backend Development

Implementing Distributed Locks with Redis and AOP in Spring Boot

This article explains how to protect time‑consuming business operations by using Redis as a distributed lock together with Spring AOP, covering annotation design, aspect implementation, lock acquisition, automatic renewal via a scheduled executor, and practical testing examples.

AOPJavaRedis
0 likes · 15 min read
Implementing Distributed Locks with Redis and AOP in Spring Boot
Cognitive Technology Team
Cognitive Technology Team
Sep 25, 2022 · Backend Development

Implementation and Pitfalls of Distributed Locks with Redis and Redisson Watchdog

This article explains the requirements for a Redis‑based distributed lock, analyzes Redisson's watchdog lock implementation—including tryLock and unlock flows, Lua atomic scripts, single‑instance versus cluster limitations—and provides practical tips to avoid common pitfalls in production environments.

Backenddistributed lockredisson
0 likes · 6 min read
Implementation and Pitfalls of Distributed Locks with Redis and Redisson Watchdog
Top Architect
Top Architect
Sep 3, 2022 · Backend Development

Implementing Distributed Locks with Redis, Zookeeper, and etcd

The article explains how to build reliable distributed locks using Redis, Zookeeper, and etcd, describing the essential concepts of mutual exclusion, safety, and liveness, showing code examples, highlighting common issues, and comparing each solution's advantages and drawbacks.

ConcurrencyRedisZooKeeper
0 likes · 6 min read
Implementing Distributed Locks with Redis, Zookeeper, and etcd
Java Tech Enthusiast
Java Tech Enthusiast
Aug 31, 2022 · Databases

Redis Persistence, Transactions, and Distributed Locks

Redis ensures data durability through RDB snapshots and AOF logs—configurable for location, compression, and sync policies—while offering atomic transactions via MULTI/EXEC and simple distributed locks using SETNX (optionally guarded by WATCH) with expirations to prevent deadlocks.

AOFPersistenceRDB
0 likes · 11 min read
Redis Persistence, Transactions, and Distributed Locks
IT Services Circle
IT Services Circle
Aug 28, 2022 · Backend Development

How to Prevent Duplicate Payments in E‑commerce Orders

This article explains the complete e‑commerce payment workflow, identifies the causes of duplicate payments such as missing deduplication, order loss and multi‑channel issues, and presents practical backend solutions including distributed locking, result caching, payment‑flow cancellation, active polling, and sync‑async notification strategies to ensure order consistency and improve payment success rates.

Backenddistributed lockduplicate payment
0 likes · 13 min read
How to Prevent Duplicate Payments in E‑commerce Orders
dbaplus Community
dbaplus Community
Aug 25, 2022 · Backend Development

Mastering Distributed Locks: From Basics to Redlock and Beyond

This comprehensive guide explains why distributed locks are needed, outlines their three essential properties, compares common implementations such as Redis, MySQL, ZooKeeper, and Redlock, discusses pitfalls like non‑atomic operations and lock expiration, and presents correct patterns using atomic commands, Lua scripts, watchdogs, and fencing tokens.

LuaMySQLRedis
0 likes · 37 min read
Mastering Distributed Locks: From Basics to Redlock and Beyond
58 Tech
58 Tech
Aug 11, 2022 · Backend Development

WLock: High‑Reliability, High‑Throughput Distributed Lock Service Based on WPaxos

WLock is an open‑source distributed lock service built on the WPaxos consensus algorithm and RocksDB storage, offering multiple lock types, flexible acquisition modes, high concurrency optimizations, and strong reliability and throughput for coordinating shared resources in distributed systems.

RocksDBWPaxosdistributed lock
0 likes · 12 min read
WLock: High‑Reliability, High‑Throughput Distributed Lock Service Based on WPaxos
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.

Redisdistributed 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.

AOPRedisSpring
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.

AOPJavaKafka
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.

ConcurrencyJavaLua
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.

InventorySpringdistributed lock
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.

Pollingdistributed lockduplicate payment
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.

CachingIn-Memory DatabaseRedis
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.

BackendCachingDesign Patterns
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.

ConcurrencyJavaLua
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.

BackendConcurrencyZooKeeper
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.

JavaThread Safetydistributed lock
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.

JavaRediscache
0 likes · 19 min read
Redis Cache Mastery: Real-World Scenarios & Distributed Lock Solutions for Java
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.

Failure Designbackend engineeringdistributed 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.

ElasticJobJavaXXL-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.

CachingFlash SaleHigh Concurrency
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.

ConcurrencyJavaRedis
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.

BackendConcurrencyZooKeeper
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.

ConcurrencyJavaJedis
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.

Design PatternsJavaRights Management
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 idempotencyDuplicate RequestsOptimistic Lock
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.

RedisZooKeeperdistributed lock
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.

ConcurrencyJavaLua
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.

InnoDBLockMySQL
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.

Luadistributed lockredisson
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.

BackendJavaRedis
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.

JavaRedisdistributed 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.

ConcurrencyJavaRedis
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.

ConcurrencyJavaRedis
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.

JavaRedisbackend development
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.

ConcurrencyLuaRedis
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.

ConcurrencyJavaJedis
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.

ConcurrencyJavaRedis
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.

CachingFlash SaleHigh Concurrency
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.

ConcurrencyRedisdistributed 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.

BitmapsCachingRate Limiting
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.

Data ConsistencyMySQLRedis
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.

LuaRedisdistributed 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.

CerberusGTISdistributed lock
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.

ConcurrencyJavaLock Pitfalls
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 scriptRedisdistributed 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.

Redisbackend developmentdistributed 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.

Data StructuresRediscache
0 likes · 45 min read
Redis Interview Questions and Core Concepts: Data Types, Performance, Persistence, High Availability, and Common Use Cases