Tagged articles
16 articles
Page 1 of 1
Tech Freedom Circle
Tech Freedom Circle
Dec 12, 2025 · Backend Development

Why Redisson’s Reentrant Distributed Lock Relies on HINCRBY Increment and Decrement

The article explains how Redisson implements a re‑entrant distributed lock using Redis hash structures and the atomic HINCRBY command to manage client identity, re‑entry counting, concurrency safety, and graceful release, providing a complete technical analysis with code, Lua scripts, and best‑practice guidelines.

HINCRBYLua ScriptReentrant Lock
0 likes · 34 min read
Why Redisson’s Reentrant Distributed Lock Relies on HINCRBY Increment and Decrement
Ma Wei Says
Ma Wei Says
Apr 5, 2025 · Backend Development

Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis

This article explains why simple GET‑modify‑SET inventory updates cause overselling in flash‑sale spikes and presents several Redis‑based solutions—including Lua scripts, WATCH‑based optimistic locks, distributed SETNX locks, and asynchronous queue processing—detailing their implementation, advantages, and trade‑offs.

BackendLua Scriptconcurrency
0 likes · 8 min read
Ensuring Accurate Inventory Deduction in High‑Concurrency Sales with Redis
Sanyou's Java Diary
Sanyou's Java Diary
Mar 24, 2025 · Databases

Boost High‑Concurrency Performance with Redis Batch Query Techniques

This article explores why batch execution in Redis improves command efficiency, simplifies client logic, and enhances transaction performance, and then details four core batch query methods—MGET, HMGET, Pipeline, and Lua scripting—along with practical SpringBoot examples and best‑practice considerations.

Lua ScriptMGETPipeline
0 likes · 10 min read
Boost High‑Concurrency Performance with Redis Batch Query Techniques
Sanyou's Java Diary
Sanyou's Java Diary
Mar 17, 2025 · Backend Development

Mastering Flash Sale Scalability: Redis, MQ, and Inventory Hint Strategies

This article explores industry‑proven techniques for handling massive flash‑sale traffic, covering pressure‑distribution, Redis + MQ combos, Lua‑based stock deduction, RocketMQ transactional messages, and Alibaba Cloud's Inventory Hint to ensure consistency and performance under extreme concurrency.

Inventory HintLua ScriptMessage Queue
0 likes · 14 min read
Mastering Flash Sale Scalability: Redis, MQ, and Inventory Hint Strategies
Zhuanzhuan Tech
Zhuanzhuan Tech
Feb 19, 2025 · Backend Development

High-Concurrency Flash Sale Solutions: Pressure Distribution, Redis + MQ, and Inventory Hint Techniques

This article examines common industry approaches for handling massive flash‑sale traffic, detailing pressure‑distribution sharding, Redis + MQ integration, the Inventory Hint optimization, and provides concrete Lua script examples and transactional‑message workflows for reliable stock deduction.

Inventory HintLua ScriptMessage Queue
0 likes · 12 min read
High-Concurrency Flash Sale Solutions: Pressure Distribution, Redis + MQ, and Inventory Hint Techniques
Top Architect
Top Architect
Sep 6, 2023 · Backend Development

Using Redisson for Distributed Locks in Java: Configuration, Code Samples, and Source‑Code Analysis

This article explains how distributed locks solve data‑consistency problems in clustered environments, introduces Redisson as a Redis‑based locking library, provides Maven and YAML configuration, shows Java code for Redisson setup and test cases, and analyses the underlying Lua scripts and source‑code mechanisms.

Lua Scriptconcurrencydistributed-lock
0 likes · 18 min read
Using Redisson for Distributed Locks in Java: Configuration, Code Samples, and Source‑Code Analysis
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.

Lua Scriptdistributed-lockjava
0 likes · 16 min read
Implementing Distributed Locks with Redis: From Basic to Advanced Schemes
Su San Talks Tech
Su San Talks Tech
Dec 16, 2022 · Backend Development

How Redisson Implements Distributed Locks with Redis: A Deep Dive into Lua Scripts and Watchdog

This article explains how Redisson provides Redis‑based distributed locks, covering atomic lock acquisition via Lua scripts, lease time handling, watchdog auto‑extension, re‑entrant and fair locks, read‑write locks, multi‑lock batching, and the RedLock algorithm for high‑availability scenarios.

Lua ScriptWatchdogfair lock
0 likes · 24 min read
How Redisson Implements Distributed Locks with Redis: A Deep Dive into Lua Scripts and Watchdog
Tencent Cloud Developer
Tencent Cloud Developer
Jun 1, 2022 · Backend Development

Implementing a Distributed Delayed Message Queue in Go Using Redis

Implementing a distributed delayed message queue in Go with Redis uses a List for ready jobs and a Sorted Set for delayed jobs, periodically migrating expired entries atomically via Lua or transactions, providing O(1) enqueue/dequeue performance, retry support, and scalable concurrency for multi‑instance systems.

Delayed MessagingGoLua Script
0 likes · 12 min read
Implementing a Distributed Delayed Message Queue in Go Using Redis
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
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
MaGe Linux Operations
MaGe Linux Operations
Jul 29, 2020 · Backend Development

How to Build Safe Distributed Locks with Redis and Redisson

This article explains why simple SETNX/EXPIRE commands can cause deadlocks, shows how to achieve atomic lock operations with Lua scripts or the Redis SET command, and demonstrates how to use the Redisson library for re‑entrant, auto‑renewing distributed locks in Java.

Lua Scriptdistributed-lockredis
0 likes · 8 min read
How to Build Safe Distributed Locks with Redis and Redisson
Java Captain
Java Captain
Nov 27, 2019 · Backend Development

Designing a High‑Concurrency Flash Sale System Using Cloud Redis Caching

This article explains how to build a high‑traffic flash‑sale (秒杀) system by leveraging browser and CDN caching, read‑write split Redis for traffic interception, master‑slave Redis for atomic inventory deduction with Lua scripts, and Redis‑based message queues for asynchronous order processing.

Lua Scriptcachingredis
0 likes · 8 min read
Designing a High‑Concurrency Flash Sale System Using Cloud Redis Caching
21CTO
21CTO
Nov 8, 2017 · Backend Development

Mastering Redis Distributed Locks: From Basics to Robust Java Implementations

This article explains how to build reliable distributed locks with Redis, covering essential commands, common pitfalls, improvements using GETSET, Lua scripting for atomicity, and complete Java code examples that address deadlock and unlock vulnerabilities.

Lua Scriptdistributed-lockjava
0 likes · 15 min read
Mastering Redis Distributed Locks: From Basics to Robust Java Implementations