Tagged articles
7 articles
Page 1 of 1
Architecture Digest
Architecture Digest
Sep 19, 2025 · Backend Development

Mastering Message Idempotency: From Simple Checks to State‑Machine Solutions

This article explores the challenges of duplicate message consumption in distributed systems, explains why naive de‑duplication fails under high concurrency, and presents four progressively robust idempotency strategies—from database pessimistic locks and local message tables to a state‑machine approach with Redis or MySQL, highlighting their trade‑offs.

Distributed SystemsIdempotencyMessage Queue
0 likes · 11 min read
Mastering Message Idempotency: From Simple Checks to State‑Machine Solutions
Lobster Programming
Lobster Programming
Aug 2, 2024 · Backend Development

Ensuring Idempotent Consumption in MQ: Strategies and Code Examples

To prevent duplicate processing when integrating message queues for rate limiting and decoupling, this article explains idempotency concepts, common pitfalls, and five practical solutions—including query checks, pessimistic and optimistic locking, deduplication tables, and non‑transactional approaches—complete with code snippets and diagrams.

IdempotencyMessage Queuedatabase locking
0 likes · 11 min read
Ensuring Idempotent Consumption in MQ: Strategies and Code Examples
MaGe Linux Operations
MaGe Linux Operations
Apr 9, 2024 · Databases

How to Simulate and Prevent SQL Server Deadlocks: A Step-by-Step Guide

This article explains what SQL Server deadlocks are, why they occur, demonstrates a reproducible deadlock scenario with T‑SQL code, and provides practical strategies such as proper schema design, indexing, query optimization, shorter transactions, appropriate isolation levels, and monitoring to minimize deadlock occurrences.

SQL Serverdatabase lockingdeadlock
0 likes · 9 min read
How to Simulate and Prevent SQL Server Deadlocks: A Step-by-Step Guide
Selected Java Interview Questions
Selected Java Interview Questions
Oct 30, 2023 · Databases

Understanding SELECT ... FOR UPDATE Locks in MySQL

This article explains how MySQL's SELECT ... FOR UPDATE statement applies different lock types—row, table, or none—depending on whether the WHERE clause uses primary keys, unique indexes, regular indexes, range queries, non‑indexed fields, or returns no rows, illustrated with practical transaction examples.

SELECT FOR UPDATEdatabase lockingrow lock
0 likes · 9 min read
Understanding SELECT ... FOR UPDATE Locks in MySQL
Architect
Architect
Feb 24, 2022 · Backend Development

Design and Analysis of Flash‑Sale (秒杀) Systems: Scenarios, Technical Characteristics, Request Chain, and Lock Strategies

This article examines flash‑sale systems by outlining typical business scenarios, analyzing read‑heavy and high‑concurrency technical traits, detailing the end‑to‑end request flow, and comparing optimistic, retry‑optimistic, and pessimistic locking mechanisms with practical SQL examples and performance tables.

Backend Architecturedatabase lockingflash sale
0 likes · 9 min read
Design and Analysis of Flash‑Sale (秒杀) Systems: Scenarios, Technical Characteristics, Request Chain, and Lock Strategies