Tagged articles

distributed lock

459 articles · Page 5 of 5
Java High-Performance Architecture
Java High-Performance Architecture
Nov 8, 2019 · Databases

How to Prevent Redis Key Race Conditions: Optimistic Locks, Distributed Locks, Timestamps & Queues

This article explains the Redis concurrent key competition problem, illustrates typical scenarios where multiple clients modify the same key, and presents four practical solutions—optimistic locking with WATCH/EXEC, distributed locks, timestamp ordering, and message‑queue serialization—to ensure data correctness under high concurrency.

ConcurrencyOptimistic Lockdistributed lock
0 likes · 5 min read
How to Prevent Redis Key Race Conditions: Optimistic Locks, Distributed Locks, Timestamps & Queues
Selected Java Interview Questions
Selected Java Interview Questions
Oct 30, 2019 · Backend Development

Common Cache Problems and Their Solutions: Avalanche, Penetration, Concurrency, and DB‑Cache Inconsistency

This article explains typical cache issues such as cache avalanche, cache penetration, concurrent write conflicts, and database‑cache write inconsistency, and provides practical mitigation strategies including high‑availability setups, circuit breakers, placeholder values, distributed locks, double‑delete, and cache‑aside patterns.

cache avalanchecache penetrationcache-aside
0 likes · 8 min read
Common Cache Problems and Their Solutions: Avalanche, Penetration, Concurrency, and DB‑Cache Inconsistency
Java Backend Technology
Java Backend Technology
Jul 29, 2019 · Backend Development

How Redis Powers Distributed Locks: Design, Pitfalls, and Solutions

This article explores the design and implementation of a Redis‑based distributed lock used since 2013, analyzes lock acquisition and release mechanisms, discusses common pitfalls such as expiration handling and race conditions, and presents possible improvements like Lua scripts and Redisson.

ConcurrencyJavaRedis
0 likes · 8 min read
How Redis Powers Distributed Locks: Design, Pitfalls, and Solutions
Java Captain
Java Captain
Jul 14, 2019 · Backend Development

Backend Architecture, Distributed Locks, and Session Management in Java

This article explains a Java backend architecture with front‑end/back‑end separation, deployment diagrams, the concepts of thread, process and distributed locks, implementations using database optimistic locking, Redis and Zookeeper, session handling in distributed systems, and various related code examples and best‑practice notes.

JavaRedisSpring
0 likes · 12 min read
Backend Architecture, Distributed Locks, and Session Management in Java
HomeTech
HomeTech
Jun 5, 2019 · Backend Development

Performance Optimization of a New‑Car E‑commerce CRM System: Distributed Locks with ZooKeeper and Redis Cache Improvements

This article details how a new‑car e‑commerce CRM system was optimized for high availability by introducing ZooKeeper‑based distributed locks, mitigating herd effects, segmenting locks per merchant, and redesigning Redis caching with sorted sets to efficiently rank consultants by daily call volume, resulting in significant performance gains under high concurrency.

BackendJavaPerformance Optimization
0 likes · 10 min read
Performance Optimization of a New‑Car E‑commerce CRM System: Distributed Locks with ZooKeeper and Redis Cache Improvements
21CTO
21CTO
May 27, 2019 · Databases

Mastering Redis: When to Use Strings, Lists, Sets, Hashes, and Zsets

This article explains Redis' core data types—strings, lists, sets, hashes, sorted sets, and more—detailing their characteristics, common commands, practical use‑cases such as caching, counters, distributed locks, and ranking, and provides best‑practice tips for key design and performance.

Data Structuresdatabasedistributed lock
0 likes · 7 min read
Mastering Redis: When to Use Strings, Lists, Sets, Hashes, and Zsets
Tencent Cloud Developer
Tencent Cloud Developer
May 14, 2019 · Operations

Handling Connection Loss and Session Expiry in ZooKeeper-based Distributed Locks

When using ZooKeeper‑based distributed locks, applications must detect CONNECTIONLOSS and SESSIONEXPIRED events, verify the master znode to confirm leadership, relinquish duties on session expiry, and design idempotent tasks to avoid split‑brain or duplicate execution caused by network partitions or quorum delays.

Leader ElectionZooKeeperconnection loss
0 likes · 10 min read
Handling Connection Loss and Session Expiry in ZooKeeper-based Distributed Locks
Java Captain
Java Captain
Apr 18, 2019 · Backend Development

Introduction to ZooKeeper: Concepts, ZNode Structure, Listeners, and Practical Use Cases

This article provides a comprehensive introduction to ZooKeeper, covering its definition, ZNode hierarchy, listener mechanisms, and practical applications such as unified configuration management, naming services, distributed locks, and cluster state monitoring, illustrating how these features enable robust coordination in distributed systems.

Distributed CoordinationNaming ServiceZooKeeper
0 likes · 9 min read
Introduction to ZooKeeper: Concepts, ZNode Structure, Listeners, and Practical Use Cases
Java Captain
Java Captain
Apr 14, 2019 · Databases

Redis Overview: Features, Use Cases, Data Types, Persistence, Distributed Locks, and Performance

This article provides a comprehensive overview of Redis, covering its definition, common use cases, core functionalities, differences from Memcached, single‑threaded design, cache‑penetration mitigation, supported data types, Java clients, consistency strategies, persistence methods, distributed lock implementation, memory optimization, eviction policies, and typical performance issues.

CachingData TypesPersistence
0 likes · 6 min read
Redis Overview: Features, Use Cases, Data Types, Persistence, Distributed Locks, and Performance
Java Captain
Java Captain
Apr 9, 2019 · Operations

Zookeeper Overview: Functions, Deployment Modes, Synchronization, and Notification Mechanism

This article explains Zookeeper as an open‑source distributed coordination service, detailing its core functions such as cluster management, leader election, distributed locks, and naming service, along with its three deployment modes, state‑synchronization via the ZAB protocol, and its watcher‑based notification mechanism.

Distributed CoordinationLeader ElectionNaming Service
0 likes · 4 min read
Zookeeper Overview: Functions, Deployment Modes, Synchronization, and Notification Mechanism
dbaplus Community
dbaplus Community
Mar 28, 2019 · Backend Development

How Distributed Locks Keep High‑Traffic Red‑Packet Systems Consistent

This article explains why traditional in‑process locks fail under massive concurrency, how distributed locks using Redis or Zookeeper ensure atomic updates across many servers, and details practical implementations, pitfalls like deadlocks, and strategies such as key expiration and ephemeral sequential nodes.

RedisZooKeeperbackend development
0 likes · 14 min read
How Distributed Locks Keep High‑Traffic Red‑Packet Systems Consistent
Didi Tech
Didi Tech
Mar 28, 2019 · Backend Development

Distributed Locks: Concepts, Evolution, and Implementation Strategies

Distributed locks provide mutual exclusion across multiple nodes in scalable, reliable systems, and can be implemented via simple Redis SETNX/EX patterns, ZooKeeper’s EPHEMERAL_SEQUENTIAL znodes with watches, or Redisson’s advanced Java‑centric primitives, each offering distinct trade‑offs in simplicity, consistency, and feature richness.

ConcurrencyJavaRedis
0 likes · 21 min read
Distributed Locks: Concepts, Evolution, and Implementation Strategies
NetEase Game Operations Platform
NetEase Game Operations Platform
Mar 23, 2019 · Backend Development

Implementing a Redis‑Based Distributed Lock to Ensure Data Consistency in a CMDB System

This article analyzes data‑inconsistency problems caused by concurrent multithreaded updates in a CMDB system and presents a step‑by‑step exploration of synchronization solutions, ultimately implementing a robust Redis‑backed distributed lock in Python to guarantee atomic reads and writes while handling edge cases such as crashes and lock expiration.

CMDBData ConsistencyPython
0 likes · 17 min read
Implementing a Redis‑Based Distributed Lock to Ensure Data Consistency in a CMDB System
Programmer DD
Programmer DD
Feb 27, 2019 · Backend Development

Mastering Redis Distributed Locks with Redisson: From Simple Locks to Redlock

This article explains how to implement ordinary Redis distributed locks and the advanced Redlock algorithm using Redisson across single‑node, sentinel, and cluster architectures, provides complete Java code examples, and addresses common questions about expiration, high availability, and comparisons with Zookeeper.

JavaRedisdistributed lock
0 likes · 11 min read
Mastering Redis Distributed Locks with Redisson: From Simple Locks to Redlock
Programmer DD
Programmer DD
Feb 20, 2019 · Fundamentals

Mastering Redis Redlock: A Deep Dive into Distributed Lock Implementation

This article explains the classic Redis distributed lock using SETNX and Lua, highlights its pitfalls, introduces the advanced Redlock algorithm with step‑by‑step acquisition and release procedures, and provides concrete Java Redisson code examples, illustrating how to implement reliable distributed locks across multiple Redis nodes.

JavaRedisdistributed lock
0 likes · 12 min read
Mastering Redis Redlock: A Deep Dive into Distributed Lock Implementation
Java Captain
Java Captain
Jan 29, 2019 · Backend Development

Implementing a Simple Seckill (Flash Sale) Using Redis Distributed Locks in Java

This article explains the business background of a flash‑sale (seckill) scenario, analyzes naive locking approaches, introduces Redis‑based distributed locks, and provides a complete Java demo with custom annotations, dynamic proxies, and a multithreaded test to ensure correct inventory decrement under high concurrency.

JavaRedisannotation
0 likes · 15 min read
Implementing a Simple Seckill (Flash Sale) Using Redis Distributed Locks in Java
Zhuanzhuan Tech
Zhuanzhuan Tech
Jan 4, 2019 · Backend Development

Design and Implementation of ZZLock Distributed Lock Service Based on Etcd

This article details the requirements analysis, design choices, architecture, code implementation, monitoring, and special considerations of ZZLock, a high‑performance distributed lock solution built on Etcd that ensures atomicity, consistency, and fault‑tolerance for backend services.

Backenddistributed locketcd
0 likes · 10 min read
Design and Implementation of ZZLock Distributed Lock Service Based on Etcd
dbaplus Community
dbaplus Community
Dec 3, 2018 · Backend Development

Mastering Distributed Locks: DB, Redis, and Zookeeper Implementations Compared

This article examines the design and implementation of distributed locks using databases, Redis, and Zookeeper, outlining their core characteristics, practical code patterns, performance trade‑offs, fault‑tolerance mechanisms, and guidance on selecting the right solution for specific workloads.

ConcurrencyDB lockRedis Lock
0 likes · 11 min read
Mastering Distributed Locks: DB, Redis, and Zookeeper Implementations Compared
Architecture Talk
Architecture Talk
Oct 19, 2018 · Fundamentals

How Google’s Chubby Inspired Zookeeper’s Distributed Coordination and Locking

This article compares Google’s Chubby lock service with Apache Zookeeper, explains their design philosophies, system architectures, the Zab protocol versus Paxos, and demonstrates how Zookeeper can be used for naming services, publish‑subscribe, distributed transactions, and distributed locks with concrete Java code examples.

ChubbyDistributed CoordinationZAB Protocol
0 likes · 25 min read
How Google’s Chubby Inspired Zookeeper’s Distributed Coordination and Locking
HomeTech
HomeTech
Sep 18, 2018 · Backend Development

Design and Implementation of a High‑Availability Red Envelope (Coupon) System

This article presents a comprehensive design of a high‑availability red‑envelope system, covering its data model, generation, distribution, verification, query optimization, and product tagging strategies, while detailing the use of Redis, distributed locks, MQ, and caching to meet complex business scenarios.

Red Envelopebackend architecturecoupon system
0 likes · 15 min read
Design and Implementation of a High‑Availability Red Envelope (Coupon) System
JD Tech
JD Tech
Sep 11, 2018 · Backend Development

Design and Implementation of Distributed Lock Services: Redis, ZooKeeper, and SharkLock

This article explains the principles, requirements, and implementation details of distributed lock services, comparing Redis and ZooKeeper approaches, and introduces SharkLock's design built on SharkStore with Raft-based replication, covering lock acquisition, release, reliability, scaling, and failover mechanisms.

RaftRedisSharkLock
0 likes · 14 min read
Design and Implementation of Distributed Lock Services: Redis, ZooKeeper, and SharkLock
Architecture Digest
Architecture Digest
Jun 29, 2018 · Backend Development

Design and Implementation of a High‑Concurrency Seckill System Using SpringBoot

This article presents a comprehensive design of a flash‑sale (seckill) architecture, covering business characteristics, user scale, layered system components, optimization strategies, full‑link stress testing, and a complete SpringBoot code example with distributed locks, message queues, and database sharding.

High Concurrencybackend architecturedistributed lock
0 likes · 7 min read
Design and Implementation of a High‑Concurrency Seckill System Using SpringBoot
dbaplus Community
dbaplus Community
Jun 24, 2018 · Databases

Redis Deep Dive: Why Use It, Pitfalls, and Practical Solutions

This article provides a comprehensive overview of Redis, covering its performance benefits, single‑threaded speed, data types, expiration policies, memory eviction strategies, consistency challenges with databases, and practical techniques for handling cache penetration, snowball effects, and concurrent key conflicts.

Redisconsistencydistributed lock
0 likes · 15 min read
Redis Deep Dive: Why Use It, Pitfalls, and Practical Solutions
ITPUB
ITPUB
Jun 10, 2018 · Backend Development

Implementing Distributed Locks with Redis and Zookeeper

This article explains the concept of distributed locks and provides step‑by‑step implementations using Redis's SET command with NX/EX options and Zookeeper's persistent and sequential znodes, including lock acquisition, release, and failure handling.

BackendZooKeeperdistributed lock
0 likes · 6 min read
Implementing Distributed Locks with Redis and Zookeeper
Architecture Digest
Architecture Digest
May 17, 2018 · Backend Development

Implementing a Distributed Lock with Redis in Java

This article explains the principles of distributed locks, discusses why they are needed in distributed applications, and provides a complete Java implementation using Redis’s NX and EX parameters, including lock acquisition, blocking and non‑blocking modes, unlocking with Lua scripts, configuration, usage examples, and testing strategies.

ConcurrencyJavaRedis
0 likes · 12 min read
Implementing a Distributed Lock with Redis in Java
dbaplus Community
dbaplus Community
Jan 4, 2018 · Operations

Understanding ZooKeeper Architecture and FastLeaderElection: A Deep Dive

This article explains ZooKeeper's distributed coordination architecture, the ZAB consensus protocol, server roles, write and read workflows, FastLeaderElection mechanics, configurable election algorithms, and how ZooKeeper can be used to implement reliable distributed locks and leader election.

Distributed CoordinationFastLeaderElectionLeader Election
0 likes · 26 min read
Understanding ZooKeeper Architecture and FastLeaderElection: A Deep Dive
Alibaba Cloud Infrastructure
Alibaba Cloud Infrastructure
Nov 29, 2017 · Databases

Case Study: Resolving a One‑Cent Discrepancy Caused by Distributed‑Lock Timeout and Concurrency Issues in Alibaba’s Financial System

This article analyzes a real Alibaba internal financial‑system incident where a one‑cent accounting error arose from concurrent database writes after a distributed‑lock timeout, details the root‑cause investigation, and presents two remediation strategies—adjusting timeout settings and strengthening idempotent controls—to prevent similar issues.

AlibabaConcurrencydistributed lock
0 likes · 7 min read
Case Study: Resolving a One‑Cent Discrepancy Caused by Distributed‑Lock Timeout and Concurrency Issues in Alibaba’s Financial System
Alibaba Cloud Developer
Alibaba Cloud Developer
Nov 27, 2017 · Backend Development

How a 0.01‑Yuan Mistake Exposed Distributed Lock Flaws in Alibaba’s Backend

A tiny 0.01‑yuan discrepancy in an Alibaba product revealed duplicate settlement records, exposing a distributed‑lock timeout and concurrency issue that led to double commits, and the article walks through the root‑cause analysis, reverse engineering of the process, and two remediation strategies focusing on timeout adjustments and idempotency controls.

AlibabaConcurrencydistributed lock
0 likes · 8 min read
How a 0.01‑Yuan Mistake Exposed Distributed Lock Flaws in Alibaba’s Backend
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.

JavaLua scriptRedis
0 likes · 15 min read
Mastering Redis Distributed Locks: From Basics to Robust Java Implementations
Java Backend Technology
Java Backend Technology
Sep 18, 2017 · Fundamentals

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

This article provides a comprehensive overview of ZooKeeper, covering its purpose, design goals, architecture, key features, data flow, components, and common application scenarios such as service naming, configuration management, cluster coordination, distributed locks, and queues.

Coordination Serviceconfiguration managementdistributed lock
0 likes · 12 min read
Mastering ZooKeeper: Core Concepts, Architecture, and Real-World Use Cases
Dada Group Technology
Dada Group Technology
Aug 25, 2017 · Backend Development

Designing a High‑Availability Inventory System: Stock Pre‑allocation, Idempotency, Concurrency Control, and Rollback Strategies

The article describes how JD Daojia's inventory system serves millions of stores by using health‑monitoring platforms, pre‑allocation policies, idempotent order processing, distributed locks, and rollback mechanisms to ensure stability, prevent overselling, and handle high‑concurrency scenarios such as flash‑sales.

Inventorydistributed lockidempotency
0 likes · 11 min read
Designing a High‑Availability Inventory System: Stock Pre‑allocation, Idempotency, Concurrency Control, and Rollback Strategies
Qunar Tech Salon
Qunar Tech Salon
Jun 28, 2017 · Backend Development

Understanding Curator's InterProcessMutex Distributed Lock in Java

This article explains how to replace Redis‑based lock with Curator's InterProcessMutex, detailing its re‑entrant design, node creation, lock acquisition logic, waiting mechanisms, and release process, while highlighting advantages over traditional Thread.sleep approaches in multithreaded resource access.

CuratorInterProcessMutexJava
0 likes · 8 min read
Understanding Curator's InterProcessMutex Distributed Lock in Java
Tencent Architect
Tencent Architect
Apr 13, 2017 · Databases

Overview of Tencent's TXSQL: Custom MySQL Kernel Enhancements, Performance Optimizations, and Feature Additions

The article provides a comprehensive overview of TXSQL, Tencent's heavily customized MySQL kernel, detailing its motivations, version choices, performance improvements such as read‑view and redo‑log optimizations, added functionalities like multi‑mode operation and distributed locks, stability testing, financial‑grade features, benchmark results against official MySQL releases, upcoming support for MySQL 5.7, and future development directions.

Cloud DatabaseDatabase EngineMySQL
0 likes · 22 min read
Overview of Tencent's TXSQL: Custom MySQL Kernel Enhancements, Performance Optimizations, and Feature Additions
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Apr 9, 2017 · Backend Development

Mastering Distributed Locks and Idempotency for High‑Concurrency Systems

This article explores the challenges of mutual exclusion and idempotency in distributed environments, explains the underlying principles of locks in multi‑threaded and multi‑process contexts, and presents practical implementations using Zookeeper, Redis, Tair, and the Cerberus and GTIS frameworks to ensure reliable, scalable operations.

ConcurrencyRedisZooKeeper
0 likes · 35 min read
Mastering Distributed Locks and Idempotency for High‑Concurrency Systems
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Apr 7, 2017 · Backend Development

Ensuring Idempotency in High‑Concurrency Systems: Strategies and Best Practices

To prevent duplicate operations such as repeated inserts, updates, or message sends in high‑traffic applications, this article explains the concept of idempotency and outlines practical techniques—including read‑only APIs, MVCC with optimistic locking, deduplication tables, distributed locks, safe deletes, unique indexes, UUID‑based request tracking, and state‑machine safeguards.

BackendHigh Concurrencydatabase
0 likes · 5 min read
Ensuring Idempotency in High‑Concurrency Systems: Strategies and Best Practices
dbaplus Community
dbaplus Community
Mar 9, 2017 · Databases

Why Redis Redlock May Not Be Safe: A Deep Dive into the Redlock Debate

An in‑depth review of the heated debate between Redis creator antirez and distributed‑systems expert Martin Kleppmann over the safety of Redis’s Redlock algorithm, covering single‑node lock pitfalls, failover issues, timing assumptions, fencing tokens, and practical recommendations for when to use Redlock versus simpler locks.

FailoverRedisconsistency
0 likes · 25 min read
Why Redis Redlock May Not Be Safe: A Deep Dive into the Redlock Debate
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Nov 24, 2016 · Fundamentals

Why Redlock May Not Be the Ultimate Distributed Lock (And What to Use Instead)

This article reviews the evolution of distributed locking—from simple MySQL table locks to Redis cache locks and the Redlock algorithm—examines expert criticisms of Redlock’s correctness, presents the Redis author’s rebuttal, and ultimately recommends Zookeeper as a more reliable solution for high‑availability distributed locks.

ConsensusRedisZooKeeper
0 likes · 22 min read
Why Redlock May Not Be the Ultimate Distributed Lock (And What to Use Instead)
Meituan Technology Team
Meituan Technology Team
Oct 1, 2016 · Backend Development

Analysis of Mutual Exclusion and Idempotency Issues in Distributed Systems and Their Solutions

The article examines how distributed systems face mutual‑exclusion and idempotency challenges, explains traditional thread and process synchronization, then details distributed‑lock techniques (e.g., Zookeeper, Redis, Tair, Cerberus) and global‑ID‑based idempotent services, emphasizing the importance of external storage, fault‑tolerance, and proper lock granularity for reliable high‑throughput applications.

Java concurrencyRedisZooKeeper
0 likes · 36 min read
Analysis of Mutual Exclusion and Idempotency Issues in Distributed Systems and Their Solutions
21CTO
21CTO
Jan 5, 2016 · Backend Development

Unlocking Alibaba’s Alicom-Frame: DAO, Caching, Distributed Locks & More

This article introduces the Alicom‑Frame library from Alibaba’s Telecom Billing Refactor project, detailing its modular utilities such as flexible DAO with sharding support, method‑level caching, Diamond‑based configuration tools, distributed locks, and various helper classes, illustrating how they simplify backend development.

DAODiamondJava
0 likes · 11 min read
Unlocking Alibaba’s Alicom-Frame: DAO, Caching, Distributed Locks & More
Architect
Architect
Dec 11, 2015 · Backend Development

Implementing Distributed Locks with Redis: The RedLock Algorithm

This article explains how to build reliable distributed locks using Redis, introduces the official RedLock algorithm, discusses safety properties, compares it with simple failover approaches, and provides implementation details, performance considerations, and lock‑extension techniques.

ConcurrencyRedisdistributed lock
0 likes · 16 min read
Implementing Distributed Locks with Redis: The RedLock Algorithm