A production incident revealed duplicate data creation: a single save operation resulted in three database records. Investigation traced the issue to inconsistent retry behavior between Dubbo’s XML and annotation-based configuration for retries = 0. In XML configuration, the following disables retri...
A production issue recently surfaced where duplicate data entries caused processing failures. Envestigation revealed missing idempotency checks and lack of unique constraints on order numbers, which should have prevented duplicate inserts. Upstream systems denied sending duplicate orders, but logs s...
Task scheduling is a fundamental requirement in enterprise software development. While many tutorials focus on "how to use tools," this article explores "how to build tools" by examining the core logic behind task scheduling systems. Quartz Framework Quartz is an open-source task...
Addressing Concurrency Issues in Inventory ManagementIn high-traffic e-commerce systems, a common concurrency challenge is the "overselling" phenomenon, where the quantity of sold goods exceeds the available stock. This discrepancy typically arises when inventory deduction logic is performed in appl...
Distributed systems require coordination when accessing shared resources. Distributed locks ensure only one node holds the lock at any time, preventing race conditions. Redisson provides distributed locks with mutex, reentrancy, auto-renewal, timeout settings, and fair locking capabilities. Key Lock...
Overview What is Task Scheduling? Consider the following real-world scenarios: A coupon distribution system that automatically issues vouchers at 10:00 AM, 3:00 PM, and 8:00 PM daily A banking application that sends SMS reminders three days before credit card payment due dates A finance platform tha...
Compiling Nacos requires retrieving the repository directly rather than relying on pre-built artifacts. The project follows a standard multi-module Maven layout. Parent directories typically encapsulate dependency management, while specific modules handle business logic like service discovery routin...
Apache Kafka employs log semgentation to efficiently organize message data on disk. This mechanism enables optimized write, read, and cleanup operations for persistent logs. Log Segmentation Principles: Each Kafka topic partition maintains a collection of persistent log files called segments Segment...
RaftKeeper is a high-performance distributed consensus service compatible with ZooKeeper, designed to address performance bottlenecks in systems like ClickHouse and other big data components. Performance Benchmark Results Benchmarking was conducted using the raftkeeper-bench tool on a three-node clu...
A consistent hash places both data keys and server identifiers in to the same circular hash address space. Treat the hash output as a ring from 0 to 2^32−1. Each server is mapped to a point on the ring using a hash of its identity (for example, IP:port). To route a key, hash the key and walk clockwi...