Skip to content

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Latest articles

12 min read

Distributed Multi-Rule Rate Limiting & Duplicate Prevention with Redis ZSet & Lua

This article demonstrates how to implement distributed multi-rule rate limiting and duplicate submission prevention using Redis sorted sets and atomic Lua scripts, covering annotation design, key generation, concurrency handling, and two Lua implementation strategies with retry logic for timestamp collisions.

46 min read

RocketMQ HA: Master-Slave Replication, Dledger Raft, and Production Failover Strategies

This article details RocketMQ's high availability mechanisms, covering master-slave replication models, HA replication internals, synchronous vs asynchronous trade-offs, Dledger's Raft-based consensus for automatic failover, migration strategies, production configurations, monitoring practices, and source code analysis of core replication and election logic.

45 min read

Kafka Exactly-Once: Idempotent Producers, Transactions & Two-Phase Commit Explained

This article explains Kafka's exactly-once semantics through idempotent producers, transactions, and read-committed isolation, detailing real incidents, configuration patterns, source-code mechanisms, and the critical boundary that Kafka transactions cannot cover external side effects, requiring application-level idempotence for true end-to-end exactly-once.

50 min read

Kafka Controller & KRaft: Why Metadata Migration Slashes Failover from 5 Minutes to 4 Seconds

This article analyzes Kafka's Controller architecture evolution from ZooKeeper to KRaft, detailing how metadata migration to an internal Raft-replicated log transforms failover from minutes-long rebuilds to seconds-long handoffs, covering deployment models, migration pitfalls, source-code mechanisms, and production monitoring strategies.

53 min read

Kafka Replication: ISR, High Watermark, and the Hidden Dangers of acks=all

This article explains Kafka's replication mechanism through ISR and high watermark, revealing why acks=all waits only for in-sync replicas, how the 30-second shrink window works, why min.insync.replicas is essential, and the trade-offs of unclean leader election, with production configurations, source code insights, and incident case studies.

7 min read

OpenAI Researcher Audrey Cheng Joins Stanford, Advancing AI-Driven Systems Research

Chinese-American researcher Audrey Cheng, a visiting researcher at OpenAI, will join Stanford's Computer Science department as an assistant professor in fall 2027, bringing a research portfolio spanning database optimization for Meta's TAO and multi-tenant scheduling to pioneering AI-driven systems research that automates algorithm discovery for tasks like cloud scheduling and LLM inference.

56 min read

DeepSeek SuperAgent Architecture Explained: Design, Code & Our Flock Practice

This article analyzes DeepSeek's SuperAgent architecture, detailing its dual-layer Router/Worker design, event-driven triggers, context management with Inline/Spill and chain-of-recall, full-duplex async execution, and compute-state-environment separation. It compares with Cursor, LangChain, Anthropic, and Cognition approaches, examines the open-source prototype's code-level decisions (model proposes/code decides, outbox pattern, security layers), and shares the author's Flock system implementation for multi-human multi-agent collaboration.

5 min read

Qwen Code 1.0 Open Sources Harness: Unified Event-Driven Agent Architecture

Qwen Code 1.0 merges Qoder's Harness capabilities into an open-source release, introducing a unified event mechanism that routes external inputs through adapters into standard events, enabling scalable agent orchestration with hand-brain separation and distributed evolution from in-memory bus to multi-node clusters.

19 min read

Why 'Completed' Doesn't Mean Done: Verifying Order Creation After Timeouts & Retries

This article explains why an AI agent's 'completed' message can hide duplicate purchase orders after API timeouts, detailing how to verify actual creation status, implement idempotent retries with stable request IDs, distinguish cancellation from revocation, and test failure scenarios using concrete examples like REQ01 and PO8601.

50 min read

ZooKeeper Watch Mechanism & Curator Best Practices: Solving Herd Effect & Connection Pitfalls

This article analyzes ZooKeeper's watch mechanism through three production accidents — one-time triggers, herd effect, and missed events during disconnection — then explains Curator's cache abstractions, session vs connection lifecycles, reconnection rebuild process, and three-layer solutions to herd effect with troubleshooting commands and interview questions.

48 min read

ZooKeeper & ZAB Protocol Deep Dive: Leader Election, Crash Recovery, and Write Path Internals

This comprehensive analysis dissects ZooKeeper's architecture, the ZAB consensus protocol, leader election mechanics, write request lifecycle, crash recovery guarantees, and operational pitfalls through real-world failure scenarios and source code walkthroughs.

34 min read

Building a Robust Member Points System with Spring Boot: Account Model, Idempotency & Reconciliation

This article details a production-grade member points and growth system built on Spring Boot, covering account modeling with ledger tables, batch-based expiration, FIFO deduction, idempotency keys, freeze/unfreeze flows, high-concurrency Redis pre-deduction with async DB persistence, anti-fraud layers, and a three-equation reconciliation framework with automated repair.

11 min read

Why Honor of Kings Avoids Microservices: Real-Time Game Architecture Explained

This article analyzes why real-time multiplayer games like Honor of Kings reject microservices, citing latency sensitivity, stateful game sessions, sticky routing needs, and the mismatch between microservice patterns (stateless, request/response) and game server requirements (streaming, in-memory state, single-threaded Netty models).

81 min read

Engineering Always-On Personal Agents: Persistence, Events, and Safe Autonomy

This article details the engineering architecture required for personal AI agents to operate continuously over days without user presence, covering persistent delegation records, event-driven wakeup with exactly-once semantics, a harness that binds model decisions to immutable actions, risk-tiered approval for proactive behavior, and a correction-driven memory system that aligns with user preferences without over-fitting.

45 min read

API Idempotency Deep Dive: 8 Patterns, 4-Layer Defense & Production Code

A comprehensive guide to API idempotency covering concept clarification, six sources of duplicate requests, a golden formula (unique key + deduplication storage + atomic operation), four-layer defense architecture, eight implementation patterns with code examples, common pitfalls with solutions, and interview preparation questions.

68 min read

Designing a Collaborative Document Editor: WebSocket, OT/CRDT & Snapshot Replay Deep Dive

This comprehensive guide covers designing a real-time collaborative document editing system, detailing WebSocket communication, OT/CRDT conflict resolution algorithms, server-side sequencing, snapshot-based storage, offline editing, presence, and performance optimization with runnable Java code examples.

16 min read

Unitized Architecture: E-commerce Dual-active Lessons – Sharding, Routing, Consistency

This article shares practical lessons from implementing unitized architecture for an e-commerce platform's cross-region dual-active deployment, covering sharding strategies, traffic routing, data classification, consistency trade-offs, hidden risks, and a decision checklist for when to adopt unitization.

23 min read

Microservice Design Patterns: Decomposition, Integration, Data, and Observability Strategies

This article systematically categorizes and explains core microservice design patterns across decomposition, integration, database, event-driven, observability, and cross-cutting concerns, providing practical guidance for architects building resilient, scalable distributed systems.

36 min read

From Redis INCR to Leaf-Segment: Reliable Short-Link ID Generation

This article analyzes short-link ID generation systems, comparing Redis INCR, database auto-increment, Leaf-segment, and Snowflake approaches, covering Base62 capacity planning, segment allocation with audit tables, dual-buffer prefetching, cache consistency for immediate readability, failure recovery protocols, and observability requirements for production-grade reliability.

9 min read

Configuration Architecture Design: Storage, Multi-level Caching & Multi-tenant Governance

This chapter explores system configuration architecture design, covering storage and loading strategies, multi-level caching, distributed configuration centers, dictionary management, multi-tenant configuration hierarchies, and governance practices including versioning, auditing, canary releases, and historical snapshot preservation for auditability.

9 min read

Batch Processing Scheduling Architecture: Reliability Beyond Scheduled Triggers

This chapter distinguishes scheduling from batch execution, covering single-machine, cluster, distributed, and pipeline batch patterns, emphasizing reliability through state tracking, idempotency, sharding, checkpoints, and explicit dependencies over fixed timing. It also outlines practical platform capabilities like versioned task definitions, unique run instances, state machines, leases, business idempotency keys, resource quotas, and end-to-end reconciliation.

37 min read

Why Stale Workers Still Cause Failures: Lease, Fencing & Outbox Patterns for Go + PostgreSQL

This article presents a production-grade design for handling long-running, preemptible worker tasks in Go and PostgreSQL, covering lease protocols, fencing tokens, outbox patterns, and side-effect reconciliation to prevent stale workers from corrupting state or duplicating external operations.

14 min read

Why Milvus 3.0 Can't Find Just-Inserted Data: The Hidden 5-Second Consistency Window

This article explains why newly inserted vectors in Milvus 3.0 may not be immediately searchable, revealing that the default Bounded consistency level sets a 5-second grace period (GracefulTime) during which recent writes fall outside the query's guaranteed timestamp (GuaranteeTs). It details the underlying mechanisms — TSO timestamps, timetick propagation, query node water-level waiting, and the four consistency levels — and provides a troubleshooting decision tree to distinguish expected behavior from actual failures.

14 min read

AI Generates an Order API in 30 Seconds — Why I Still Won't Merge It

The article demonstrates that while AI coding agents can produce functional order-API code in seconds, shipping reliable software still demands deep engineering judgment — around business rules, edge cases, consistency, concurrency, and operational constraints — that AI amplifies but cannot replace.

7 min read

Why Your Response Time Fixes Fail: The Shift to Path-Driven Optimization

This article contrasts traditional resource-driven response time optimization with modern path-driven paradigms, exposing three common traps and introducing user-journey metrics, latency budgets, and proactive shaping via eBPF to deliver predictable user experiences in distributed systems.

24 min read

Async Idempotency in Practice: Local Message Tables, Duplicate Deduction Fixes, and Layered Defense

A real-world postmortem of duplicate coupon deductions during a major promotion reveals how retries in local message tables cause duplicate execution; the article dissects four idempotency patterns, their trade-offs, and a layered defense architecture with a practical review checklist.

16 min read

Debugging AI-Generated Code: The 'Facts First' Method That Catches Agent Hallucinations

The article presents a debugging methodology for AI-generated code based on three production incidents, advocating a constraint-satisfaction approach where agents collect immutable facts before forming hypotheses, use control comparisons to isolate strong signals, and verify against all evidence to avoid hallucinated fixes.

34 min read

Reliability in Software Engineering: Definitions, Key Concerns, and Distributed Systems Reality

This article defines software reliability per ISO/IEC 25010, distinguishes it from availability and stability, and details five operational concerns — correct user-visible results, change management, blast radius, detection/recovery speed, and failure semantics — with concrete distributed-systems patterns like idempotency, fault domains, burn-rate alerting, and fault injection.

21 min read

Sa-Token Deep Dive: 10 Interview Questions on Auth, Multi-Account & SSO

This article explores 10 key Sa-Token interview questions covering core interfaces, one-line login internals, token styles, second-level authentication, multi-account architecture, distributed storage options, SSO comparisons, token passing strategies, permission annotation implementation, and production security hardening.

10 min read

Four Principles of Large-Scale Internet Architecture: Availability, Scalability, Concurrency & Security Trade-offs

This chapter from "Architecture Fundamentals" defines four quality attributes — high availability, high scalability, high concurrency, and security — as the pillars of large-scale internet architecture, emphasizing that normal traffic tests only prove functional correctness, not resilience. It details the trade-offs between these attributes, concrete implementation patterns for each, and a practical checklist for deriving architecture from measurable business goals rather than stacking technologies.

28 min read

API Timeout After Ticket Creation: Why Query-First Recovery Beats Blind Retries

When an API times out after creating a ticket, the system must treat the result as unknown rather than failed, using persistent operation IDs to query the business service, relying on idempotency contracts for safe retries, and escalating to manual review only after exhausting a time-bounded recovery budget.

48 min read

11 HR Interview Questions to Negotiate Salary from 18K to 28K: A Technical Guide

This guide dissects 11 critical HR interview questions for tech professionals, offering interviewer insights, model answers, pitfall avoidance, and technical frameworks like state machines and data anchoring to negotiate salary effectively with real-world examples.

17 min read

Agent Error Recovery: Why Retries Alone Fail — Idempotency & Reconciliation

This article explains why automatic retries after agent timeouts can duplicate business actions, and details how to distinguish call failures from executed side effects, implement execution-side idempotency guarantees, reconcile using original action identifiers, and define safe recovery rules with human escalation when outcomes remain unknown.

12 min read

DeepSeek DSec: Running 380K Sandboxes with 50x Overcommit for Agent Training

DeepSeek's DSec infrastructure supports millions of agent sandboxes through layered environments, on-demand image loading via 3FS, memory sharing with virtio-pmem/DAX, CPU scheduling, and trajectory forking, achieving 50x resource overcommit while addressing security challenges like agent-discovered vulnerabilities.

25 min read

Fault Domain Design: Turning Blast Radius from 100% into a Tunable 1/N Parameter

The article presents a layered fault-domain strategy—physical anti-affinity, logical isolation (sharding, cluster groups, swimlanes, bulkheads), cell-based architecture, chaos-engineering validation, and quantitative governance metrics—to shrink the blast radius of a ten-million-QPS system from a fixed 100% to a controllable 1/N design parameter.

39 min read

Cross-Region Disaster Recovery: From Backup to Multi-Active at 10M QPS

This article systematically dissects the engineering evolution from disaster backup to multi-active architecture, covering fault domain isolation, RTO/RPO/recovery capacity metrics, data replication trade-offs, traffic switching state machines, business unitization, conflict convergence, and a phased adoption roadmap for systems operating at ten million QPS.

23 min read

From Monoliths to AI Agents: Architecture Evolution's Two Patterns and New Challenges

This article traces software architecture evolution from monoliths through primitive distributed systems, SOA, microservices, and cloud-native, highlighting two recurring patterns — finer decoupling and stronger fault isolation — and a shift from zero-failure goals to designing for resilience, while outlining four unprecedented challenges AI agents introduce: semantic hallucinations, stateful context, dynamic orchestration, and observability gaps.

73 min read

10 System Design Questions That Decide Big Tech Interview Success

This article dissects 10 high-frequency system design questions — seckill, short URL, distributed ID, delayed tasks, leaderboard, real-time push, short-video feed, sharding, rate limiting, and config center — with architecture diagrams, core code, and comparative solutions for each.

5 min read

What Is ZooKeeper? Core Concepts, Node Types, and Quick Start Guide

This article introduces Apache ZooKeeper as a distributed coordination service, explains its hierarchical data model with four znode types (persistent, persistent sequential, ephemeral, ephemeral sequential), describes the watch mechanism for change notifications, and provides a step-by-step installation and basic CLI tutorial for version 3.8.3.

76 min read

Complete Algorithm & Data Structure Interview Guide: From Arrays to Distributed Systems with Java Implementations

This comprehensive 30,000-word guide covers 9 core modules — data structures, sorting, search algorithms, algorithm paradigms, string algorithms, hash engineering, rate limiting, distributed IDs, and massive data processing — with Java code, complexity tables, and interview-focused explanations for big-tech preparation.

18 min read

Forgetting Details ≠ Incompetence: Senior Engineers' Cognitive Compression Playbook

This article explains why senior engineers naturally forget micro-details through the brain's lossy compression, and provides a three-part framework — pre-interview 'deep-water nails' (real failure cases, core parameters, personal artifacts) and three on-the-spot defense frameworks (deduction, methodology anchoring, pivoting) — to demonstrate unforgeable engineering depth in high-stakes technical interviews.

23 min read

Beyond Retry: Designing Fault Tolerance from Failure Models to Disaster Recovery

This article explains why retry alone is insufficient for fault tolerance, detailing how to classify failures via fault models, apply appropriate mechanisms like timeouts and circuit breakers, design recovery paths targeting state convergence, define RTO/RPO for disaster recovery, and validate all assumptions through fault injection drills.

12 min read

Redis Multi-Rule Rate Limiting & Duplicate Submission Prevention in Distributed Systems

This article details a distributed Redis-based solution for enforcing multiple rate-limiting rules simultaneously (e.g., 10 requests per minute and 20 per two minutes) while preventing duplicate submissions, using Zset data structures, Lua scripts for atomicity, and Spring AOP annotations.

14 min read

MQ Production Failure Troubleshooting: Message Loss, Duplicates, Backlog & Dead Letters

This comprehensive guide covers the five critical MQ production failures — message loss, duplicate consumption, massive backlog, consumer hangs, and dead letter queue blocking — with root cause analysis, emergency mitigation steps, and long-term architectural fixes for RocketMQ, Kafka, and RabbitMQ.

36 min read

Scaling Spring Boot Sign-In to 100M Users: Distributed Architecture Evolution & Production Hardening

This article details the evolution of a Spring Boot daily sign-in system from 10K to 100M users, covering Redis bitmap sharding, Lua atomic operations, command outbox pattern, Kafka async reward processing, idempotency guarantees, fault tolerance strategies, and production-grade observability with real incident postmortems.

23 min read

Circuit Breaker & Degradation Architecture: From Production Avalanche Postmortems to Enterprise-Grade Protection

This article analyzes three real production incidents from e-commerce promotions to expose critical flaws in circuit breaker and degradation architectures, detailing the dangers of half-open state probing, configuration hot-update inconsistency, and unbounded business degradation, then presents a three-layer protection model with custom recovery strategies and governance checklists.

10 min read

Ordered Messages Aren't Enough: Preventing State Regressions with Versioning and State Machines

The article explains why message ordering alone fails to prevent business state regressions, detailing how version gaps and unordered consumption cause issues, and presents solutions using event versioning, state machines, and proper Kafka/RocketMQ configuration to ensure correct order processing per order ID while allowing parallelism across orders.

28 min read

Spring Boot QR Code Login: State Machines, SSE Push, and Replay Protection for Production

This article details a production-ready QR code login implementation using Spring Boot, covering state machine design with Redis and Lua for atomic transitions, SSE for low-latency status push with polling fallback, HMAC-SHA256 with nonce for replay protection, and Redis Pub/Sub for cross-instance consistency in clustered deployments.

17 min read

Distributed Rate Limiting with Redis + Lua: Surviving API Floods in Spring Boot

After an external system hammered a Spring Boot search endpoint causing database connection exhaustion, the author builds a distributed fixed-window rate limiter using Redis and Lua for atomicity, wraps it with an annotation-driven AOP aspect supporting user, IP, API key, and global dimensions, returns proper HTTP 429 with Retry-After, discusses fixed-window limitations versus token bucket and sliding window, and covers fail-open/fail-closed strategies for Redis outages plus monitoring metrics.

29 min read

Idempotency Design for Write Services: 7 Patterns & Selection Guide

This article details seven idempotency patterns for backend write operations—including unique keys with database constraints, state machines, execution records, naturally idempotent actions, request fingerprinting, client-generated keys, and server-issued tokens—with concrete examples, SQL code, and a selection guide to match each pattern to specific business scenarios like payment callbacks, order cancellations, and duplicate purchases.

67 min read

CAP Theorem Debunked: Not 'Choose 2 of 3' — Master 10 Core Distributed System Topics for Interviews

This comprehensive guide corrects the common CAP theorem misconception, then deep-dives into 10 high-frequency distributed system topics — CAP/BASE, distributed IDs (UUID to Meituan Leaf), distributed locks (DB, Redis, ZooKeeper, Etcd), distributed transactions (2PC to RocketMQ), consistent hashing, rate limiting algorithms, load balancing, circuit breaking (Hystrix vs Sentinel), configuration centers, and distributed tracing — with 30+ diagrams, comparison tables, code snippets, and production pitfalls.

35 min read

Automating Fault Localization at 10M QPS: Evidence Chains Over Manual Hunts

This article details how to build automated fault localization for 10M QPS systems by unifying entity identities, aligning timestamps, integrating change records, and applying a four-layer engine—anomaly normalization, temporal correlation, topological pruning, and causal scoring—to converge millions of anomalies into verifiable hypotheses while avoiding correlation-causation pitfalls through counterfactual evidence and phased rollout.

16 min read

Order Timeout Auto-Cancellation: RabbitMQ Delayed Queue + Scheduled Task Dual Insurance Pattern

This article details a production-ready dual-insurance pattern for e-commerce order timeout cancellation, combining RabbitMQ delayed message queues for real-time processing with scheduled database scans as a fallback, including Spring Boot implementation code, idempotent cancellation logic, and distributed deployment considerations.

17 min read

How to Guarantee Single Order Processing When Payment Callbacks Fire 10 Times

The article explains how to handle duplicate payment callbacks in Spring Boot using database unique constraints, conditional state updates, an outbox pattern for reliable event publishing, and downstream idempotency, ensuring orders are processed exactly once even if the payment platform sends repeated notifications.

22 min read

Distributed ID Deep Dive: Snowflake vs Segment Mode – Trade-offs, Pitfalls & Production Patterns

This article analyzes real-world e-commerce failures to compare Snowflake and Segment ID generation, exposing architectural pitfalls like time rollback, machine ID collisions, and blocking windows, while providing production-ready code patterns and a decision matrix for choosing between ordered consistency and high-throughput availability.

36 min read

Second-Level Fault Detection at 10M QPS: Layered Signals & Safe Automation

This article explains how to reduce fault detection latency from minutes to seconds in 10M QPS systems by implementing layered signals, combined evidence detection, distributed judgment, event normalization, and safe automation guardrails, rather than simply increasing sampling frequency.

24 min read

Microservice Config Governance: Why Your Control Plane Causes Elusive Bugs

This article analyzes three real production incidents caused by configuration governance gaps in microservices, detailing a three-tier classification model, audit logging, version snapshots, metadata requirements, and validation mechanisms to prevent configuration-related failures.

27 min read

Distributed Timeout & Retry Deep Dive: Prevent Cascading Failures

This article analyzes three real e-commerce production incidents caused by misconfigured timeouts and uncontrolled retries, then provides a systematic framework for timeout calculation, call-chain layering, retry decision boundaries, MQ-specific rules, and a release-review checklist to prevent cascading failures in microservices.

40 min read

RocketMQ Interview Deep Dive: 8 Core Topics from Architecture to Message Backlog

This comprehensive guide covers eight critical RocketMQ interview topics including architecture design, CommitLog storage, message sending/consumption modes, transaction messages, reliability mechanisms, duplicate consumption handling, and message backlog solutions with production-grade troubleshooting steps.

9 min read

From 4 Hours to 40 Minutes: Postal Savings Bank's Cross-Unit Data Cleaning Breakthrough

Postal Savings Bank developed a parameter-driven, group-concurrent cross-unit data cleaning framework for its distributed core remittance system, reducing cleaning time for hundreds of millions of records from 4 hours to 40 minutes while ensuring consistency and minimizing business impact.

5 min read

Anthropic's CI Crisis: Scaling Test Impact Analysis After AI Wrote 80% of Code

Anthropic's AI-generated code increased CI jobs 25x, overwhelming their Test Impact Analysis service; they iterated through three patches before redesigning with a distributed journal-based architecture that stabilized queue backlog, teaching them to plan for exponential growth and separate state from process.

21 min read

Multi-Agent Consistency: Distributed Systems Challenges Return with Autonomous Agents

The article explores four critical questions for multi-agent consistency: task decomposition rationale, structured handoffs with versioned snapshots, conflict resolution via evidence-based contracts, and verifiable completion criteria. It argues multi-agent systems reintroduce classic distributed systems challenges—identity, leases, idempotency, compensation—and require runtime proofs over model assertions.

47 min read

Safe Configuration Rollout at Scale: Versioning, Canary, and Rollback Loops

The article analyzes the engineering challenges of moving configuration management from single-machine files to distributed cluster control planes, covering immutable versioning, schema validation layers, canary deployment by failure domains, two-phase commit for atomic switches, rollback with side-effect mitigation, observability across control and data planes, and maturity stages of config platforms.

21 min read

Distributed Systems' Hardest Challenge: State Over Interfaces — Consistency, Idempotency & Async Tasks

This article explores why cross-service state management is harder than API design in distributed systems, using a refund example to illustrate how local transactions, idempotency, state machines, Outbox patterns, and manual intervention achieve recoverable convergence when operations span multiple services and external channels.

27 min read

Apollo Configuration Center: Complete Guide from Core Concepts to Kubernetes Deployment

This article provides a comprehensive tutorial on Apollo configuration center, covering its core concepts (application, environment, cluster, namespace), client architecture with long-polling and local caching, overall system design with Config/Admin services and Eureka, availability scenarios, hands-on SpringBoot integration with Maven setup, dynamic configuration testing (updates, rollbacks, offline fallback), multi-environment/cluster/namespace usage, and Kubernetes deployment via Docker and YAML manifests.

16 min read

What Does await Actually Wait For? 10 Misconceptions That Break Async Code

This article dissects 10 common misconceptions about JavaScript's await keyword, explaining how it evaluates expressions, waits only for Promise settlement — not side effects — and why patterns like forEach with async callbacks, bare setTimeout, and Promise.all can cause silent bugs in production.

14 min read

AI Agent Development: The Dual Challenge of Thinking Engineering & Distributed Systems

This article argues that AI agent development shifts from traditional coding to dual-system engineering: single agents require thinking logic design (prompt engineering, reasoning frameworks), while multi-agent systems demand distributed architecture skills (task graphs, state management, concurrency control), combining probabilistic reasoning with system reliability challenges.

19 min read

Chaos Engineering for Ordinary Enterprises: Zero-Risk Production Drills

This article exposes common chaos engineering misconceptions, defines five forbidden zones for production experiments, and provides a four-stage progressive approach with strict blast-radius controls and a standardized SOP for ordinary enterprises to safely validate system resilience without causing real incidents.

27 min read

Why a Single Timeout Spawned Two Risk Reviews: Production MCP Server Patterns

The article analyzes a timeout-induced duplicate risk review incident, then presents a comprehensive production-grade MCP server design covering stateless protocol alignment, schema validation, dual-key idempotency (request_key + business_key), UNKNOWN state machine, recovery workers, MCP Tasks integration, concurrency control, observability, and fault-injection testing to ensure exactly-once business effects.

21 min read

Independent Deployment ≠ Independent Evolution: Designing Dependencies, Routing & Release Architecture

The article explains why independent deployment doesn't guarantee independent service evolution, detailing five required capabilities—identifiable dependencies, compatible interfaces, controllable traffic routing, verifiable releases, and recoverable failures—using a refund service case study to illustrate dependency topology, interface evolution patterns, phased release strategies, and evidence-based rollback decisions.

9 min read

Spring Boot 3.5 Embraces UUIDv7: Replace Auto-Increment IDs with Time-Ordered UUIDs

This tutorial demonstrates how to replace auto-increment IDs with UUIDv7 in Spring Boot 3.5 using JPA and MyBatis-Plus, covering UUIDv7's timestamp-based structure, the java-uuid-generator library, and custom identifier generator implementations for both persistence frameworks.

18 min read

How WeChat Resets 1 Billion Step Counts at Midnight Without Crashing

WeChat avoids server crashes during midnight step-count resets for 1 billion users by using logical time-based versioning instead of physical updates, a custom PaxosStore for atomic increments, delayed double-write buffers for clock skew, Redis ZSet sharding for rankings, and asynchronous cold-data archival during low-traffic hours.

6 min read

smart-mqtt 1.7.0: Solving MQTT Clustering Beyond Single-Node Limits

smart-mqtt 1.7.0 introduces production-ready MQTT clustering by separating cluster messaging via ClusterMessage, optimizing Core/Worker communication and node coordination, and providing HAProxy load balancing with Docker Compose deployment for horizontal scaling beyond single-node limits.

25 min read

10 Message Queue Patterns for Spring Boot: Decoupling, Async, Traffic Shaping & More

This article details 10 practical message queue scenarios for Spring Boot microservices, covering system decoupling, asynchronous processing, traffic shaping for flash sales, data synchronization, centralized logging, broadcast configuration updates, ordered message processing, delayed messages for timeouts, retry mechanisms with dead-letter queues, and transactional messaging for distributed consistency, with code examples for RabbitMQ, Kafka, and RocketMQ.

15 min read

Nacos Config Center Deep Dive: Core Mechanisms, 4 Fatal Failure Postmortems & Production Standards

This article dissects Nacos configuration center's core mechanisms — long-connection push, local disk caching, and differentiated refresh behaviors — and postmortems four real production incidents: config drift causing instance divergence, large-config push triggering cluster avalanche, K8s IP-based gray release failure, and rollback ineffectiveness due to lost push events and cache pollution. It provides coding standards, enterprise-grade landing specifications, and emergency SOPs.

13 min read

Nacos CP Mode Still Has Split-Brain? 4 Scenarios Where Raft Fails

This article explains why Nacos CP mode can still experience split-brain despite using Raft, detailing four trigger scenarios (even-node partitions, GC pauses, cross-AZ latency, snapshot failures), three reasons CP appears like AP (client cache, read paths, module separation), and five practical fixes plus diagnostic commands.

33 min read

How to Secure Wallet Funds at Billion‑Scale Through Reconciliation: Balance Checks, Channel Matching, and Auto‑Repair

In high‑throughput wallet systems, reconciliation—covering internal balance validation, channel‑level matching, and controlled auto‑repair—acts as the final safeguard against fund discrepancies caused by lost callbacks, out‑of‑order events, duplicate entries, or concurrency conflicts, ensuring financial safety even with billions of daily transactions.

8 min read

Is Splitting Data Across Machines Distributed? Understand Sharding vs Distributed Systems

The article explains that merely placing data on multiple machines constitutes sharding—a way to split data for capacity—but true distributed systems require coordinated nodes that communicate, replicate, and handle failures, illustrated with an e‑commerce warehouse analogy and guidance on choosing between sharding and distributed databases.

11 min read

Microservice Idempotency: 7 Production Patterns to Eliminate Duplicate Orders & Payments

This article presents seven production-ready idempotency patterns for microservices — frontend debounce, token mechanism, database unique indexes, state machine validation, Redis caching, MQ consumer deduplication, and distributed locks — organized as a layered defense from frontend to database, with code examples and a real duplicate-payment incident analysis.

15 min read

2026 China Database Technology Conference Launches: Data Fusion and AI Leadership

The 17th China Database Technology Conference (DTCC 2026) ran from August 20‑22 in Beijing, gathering top experts to discuss database kernel innovations, cloud‑native and distributed practices, AI‑driven data, vector databases, real‑time warehouses, and the emerging Agent era, while showcasing cutting‑edge solutions from Dameng, Tencent Cloud, Alibaba Cloud, OceanBase and GoldenDB.

18 min read

Building Distributed Rate Limiting with Spring Boot, Redis & Lua: Sliding Window, Token Bucket & Flash Sale Defense

This article details a production-ready distributed rate limiting system using Spring Boot AOP, Redis Sorted Sets, and atomic Lua scripts, covering sliding window and token bucket algorithms, multi-dimensional flash sale protection, and benchmark results showing 100% accuracy with minimal latency overhead.

6 min read

How Alipay Ensures Payment Idempotency in High‑Concurrency Systems

The article explains why idempotency is critical for Alipay’s high‑concurrency, high‑reliability payment platform and outlines four key reasons—funds safety, handling network uncertainty, user experience, and distributed architecture—followed by concrete solutions such as unique business identifiers, database unique constraints, state‑machine control, and idempotent API design.

21 min read

From Single‑Node to Distributed Monitoring Storage: Scaling TSDB for Million‑QPS

The article explains how a single‑machine Prometheus TSDB initially works well but eventually hits five scalability walls—capacity, single‑point failure, short retention, lack of global view, and throughput limits—and then details the step‑by‑step evolution to remote_write with object‑storage‑backed Thanos and finally to native distributed TSDBs such as Cortex, Mimir, and VictoriaMetrics, including their trade‑offs, costs, and practical selection guidance.

28 min read

Distributed Snowflake ID Generation in Java: Hutool and MyBatis-Plus Demo

This article walks through the Snowflake algorithm for distributed ID generation, detailing its timestamp, workerId and sequence fields, handling clock rollback and sequence overflow, and provides a complete Java implementation with integration examples for Hutool and MyBatis‑Plus, including configuration and test code.

36 min read

RabbitMQ vs Kafka vs RocketMQ: Complete MQ Selection Guide with Code & Interview Answers

This article provides a comprehensive comparison of RabbitMQ, Kafka, and RocketMQ across core features, performance, and use cases, with production-ready code for transactional messaging, idempotent consumption, and zero-loss configurations, plus solutions for seven common production pitfalls and interview answer templates.

11 min read

From a Naïve Scheduled Task to Scalable Delayed‑Task Solutions for 10M+ Orders

The article dissects a common interview question about automatically canceling unpaid orders, explains why a simple cron job fails at massive scale, and presents three robust designs—Redis expiration, Redis ZSet polling, and MQ/time‑wheel approaches—plus pitfalls and a ready‑to‑use answer template.

11 min read

TensorCast Cuts First‑Token Latency by Up to 93.2% with Unified Programmable Tensor Management

TensorCast introduces a unified, programmable tensor lifecycle layer for large‑model infrastructure, achieving up to a 93.2% reduction in first‑token latency, a 228.6× speed‑up in model startup, and performance comparable to specialized KV‑cache systems while simplifying development.