Lamport Clocks provide a lightweight logical timestamp mechanism that captures the 'happens‑before' relationship between events, enabling causal ordering across distributed replicas, supporting versioned keys, MVCC storage, partial ordering, and highlighting both practical applications and inherent limitations in real‑world systems.
The article presents Ant Group’s Ray‑based Ragent framework, detailing its background, motivation behind unified AI serving, and the four core modules—Profile, Memory, Planning, and Action—that together enable large‑language‑model agents for financial applications.
This article introduces Ant Group’s Ragent, a Ray‑based distributed AI agent framework, covering its background, motivation in the large‑model era, and a four‑module design (Profile, Memory, Planning, Action) that enables scalable LLM‑driven agents.
This article introduces Ant Group’s new Ray‑based distributed agent framework Ragent, outlines its background and motivation, and details the four core modules—Profile, Memory, Planning, and Action—that together enable sophisticated LLM‑driven AI agents for large‑scale applications.
This article introduces Ant Group’s Ragent, a Ray‑based distributed AI‑agent framework, covering its background, motivation, design and implementation, and detailing the four core modules—Profile, Memory, Planning, and Action—that enable large‑language‑model agents at massive scale.
This article explores ten practical use‑cases for message queues—covering system decoupling, asynchronous processing, traffic shaping, data synchronization, log collection, broadcast updates, ordered and delayed messages, retry mechanisms, and transactional messaging—illustrated with Java code examples and architectural diagrams.
This article introduces Ant Group’s Ray‑based distributed agent framework Ragent, outlines its background, motivation, and design, and details the four essential modules—Profile, Memory, Planning, and Action—that power large‑language‑model agents in large‑scale AI serving.
This article walks developers through the evolution of distributed system architectures—from single‑machine deployments to master‑slave, same‑city active‑active, and finally true multi‑active setups—explaining core concepts, replication strategies, conflict resolution, fault detection, switch mechanisms, recovery methods, and interview tips for high‑availability design.
This article analyzes the multi‑dimensional challenges of building high‑availability systems—covering applications, databases, caches, message queues, containers, GC, and more—by sharing real JD engineering scenarios, common failure patterns, and concrete mitigation strategies to help engineers design more resilient services.
This article walks through the challenges of building high‑availability systems—covering applications, databases, caches, message queues, containers, GC, and more—using JD’s production experiences to highlight common pitfalls, root‑cause analyses, and practical mitigation strategies for engineers seeking resilient architecture.
This article introduces Ant Group’s Ray‑based distributed agent framework Ragent, outlines its background, motivation, and design, and breaks down the four essential modules—Profile, Memory, Planning, and Action—that enable large‑language‑model agents to operate in real‑world scenarios.
The article walks through a detailed Java interview simulation where the candidate designs a high‑performance, microservice‑based e‑commerce transaction and fulfillment system, covering architecture decomposition, caching, concurrency control, distributed transactions, observability, AI‑driven recommendation, and a concrete career roadmap.
This article explains the smooth weighted round robin algorithm, contrasts it with the non‑smooth version, walks through step‑by‑step examples for a 5:1:1 server weight scenario, and provides mathematical proofs of both weight correctness and smoothness, including references to the original source.
At DTCC2025 in Beijing, industry leaders showcased AI-driven innovations, vector database advances, RAG techniques, and distributed database performance breakthroughs, illustrating how databases are evolving from passive data stores into intelligent, autonomous systems that boost efficiency, scalability, and business value across sectors.
This article explains the essential components of software architecture—elements, structure, and connections—while presenting fifteen universal design principles, practical guidelines for monolithic, distributed, and microservice systems, and six common architectural mistakes to avoid, helping teams build scalable, reliable, and maintainable solutions.
This article explains the core concept of software architecture as elements, structure, and connections, distinguishes systems, subsystems, modules, components and frameworks, compares architecture classifications, describes the evolution from monolithic to distributed and microservice designs, presents fifteen practical design principles, and warns about six typical architectural pitfalls.
A leading financial platform suffered a six‑hour outage and $170 million loss when its Nacos service‑registry cluster entered a split‑brain state due to network partition, exposing flaws in AP‑mode deployment, monitoring gaps, and cascading failures that were later resolved through Raft migration, multi‑active architecture, and client‑side resilience.
This article explains the roles of StarRocks FE and BE nodes, details the metadata stored in FE, describes the leader‑follower‑observer architecture, and shows how BDB JE replication, journal logs, and checkpoint mechanisms ensure metadata synchronization and durability even after node failures.
LinkedIn, the creator of Kafka, has largely abandoned Kafka in favor of a new log storage system called Northguard, whose design mirrors Apache Pulsar with features like storage‑compute separation, log striping, and a multi‑layer data model, offering superior scalability, operability, consistency, and durability for massive data streams.
This guide explains how to replace traditional session‑based captcha authentication with a Redis‑backed, token‑driven solution using the high‑performance PHP Webman framework and the tinywan/captcha plugin, covering architecture, generation and verification flows, installation steps, and code examples.
This article examines how single‑value objects encounter data‑value conflicts in multi‑leader replication architectures, explains the role of causal ordering versus concurrent writes, and outlines the need for global clocks, versioning, and broadcast mechanisms to resolve such conflicts.
This guide walks you through the core Kafka commands for starting and stopping the service, creating, listing, describing, and deleting topics, as well as producing and consuming messages, while explaining key parameters such as Zookeeper, partitions, and replication factors.
This article examines the challenges of distributed ID generation, compares common solutions like UUID and Snowflake, and presents a custom approach that combines MySQL segment tables, Redis caching, and Nacos switches to achieve high‑performance, strictly incremental IDs with automatic failover.
This article examines write conflicts in single-leader replication, comparing exclusive and shared data, exploring uniqueness constraints, async replication delays, and various conflict‑resolution techniques such as unique indexes, bitmap mapping, LWW ordering, and multi‑version control for collaborative editing.
HUATUO, Didi's open‑source cloud‑native observability project, leverages BPF‑based low‑overhead kernel tracing, unified metric and event frameworks, automatic flame‑graph generation, and seamless integration with Prometheus, Grafana and Elasticsearch to provide panoramic, zero‑intrusive monitoring and continuous performance profiling for complex production environments.
This article introduces Easy-Cache, a Spring‑AOP based caching framework that eliminates repetitive cache code by offering annotation‑driven operations, multi‑level Redis and local caches, dynamic upgrade/downgrade, elastic expiration, and Lua‑script‑backed consistency mechanisms for high‑availability distributed systems.
This article explains the challenges of implementing causal consistency, compares it with linear and sequential consistency, describes how order guarantees are enforced in leader‑based replication, introduces Lamport timestamps and total‑order broadcast, and outlines practical approaches for achieving causal consistency in distributed systems.
This article explains InfiniFS's cache organization for directory metadata, its optimistic cache usage, and the lazy invalidation mechanism that broadcasts rename updates to a few metadata servers, enabling scalable and efficient metadata services in large‑scale distributed file systems.
This article examines why multi‑leader and leaderless replication models struggle to provide linear consistency, explores write‑conflict handling, quorum‑based NWR mechanisms, sloppy quorum and hinted‑handoff techniques, and summarizes the trade‑offs involved in achieving strong consistency across distributed data centers.
This article explains what RPC is, why RPC frameworks are needed, the underlying principles and technologies such as dynamic proxies, serialization, NIO communication, service registration, governance and routing, and walks through a simple hand‑crafted RPC implementation with a comparison of popular frameworks.
This article explores high‑concurrency flash‑sale scenarios, demonstrates why naïve @Transactional and lock usage can still cause overselling, and presents seven concrete implementations—including improved lock, AOP lock, two pessimistic‑lock variants, optimistic lock, a blocking queue, and a Disruptor queue—complete with SpringBoot code, JMeter testing results, and performance analysis.
Alibaba introduces the ali‑langengine‑dflow framework, a hybrid distributed‑agent architecture that moves core intelligence to the cloud while keeping execution reachable on heterogeneous client devices, addressing data‑isolation, latency and security issues of existing cloud‑VM and local‑agent solutions for 2C internet services.
This article shares ten frequent microservice problems—from improper service splitting and distributed transaction failures to configuration chaos, logging fragmentation, database sharing, API incompatibility, CI bottlenecks, missing monitoring, and team collaboration issues—offering concrete solutions, best‑practice principles, and code examples to help engineers build robust, maintainable microservice systems.
This article examines eventual and linear consistency in leader‑based replication, explains read‑your‑writes and shared‑data scenarios, discusses replication lag, failover trade‑offs, multi‑data‑center risks, and shows how consensus systems like ZooKeeper and etcd implement true linear consistency.
The article explains the fixed‑window rate‑limiting algorithm, details a thread‑safe Java implementation, shows how to realize distributed limiting with Redis Lua scripts, compares advantages and drawbacks, provides performance benchmarks, and offers practical usage scenarios and production recommendations.
This article details the design and evolution of DHPS, Kuaishou's load‑balanced, RDMA‑based high‑performance service architecture, explaining its network, storage, and traffic‑scheduling innovations that deliver over 270% query‑throughput improvement, lower latency, reduced CPU usage, and near‑five‑nine availability for large‑scale AI inference workloads.
This article explores multiple techniques—including bitmap indexing, Bloom filters, external sorting, Spark, and layered bitmap structures—to efficiently remove duplicate QQ numbers from a dataset of up to one billion entries while keeping memory usage below a gigabyte and maintaining high accuracy.
This article explores the purpose of database transactions, the various failure scenarios they guard against, the nuances of consistency across ACID, replica and CAP models, and how atomic commit and consensus mechanisms ensure reliable distributed data processing.
Discover why improper retry logic can cause massive financial losses, learn eight practical retry solutions—from simple loops to advanced Resilience4j and distributed lock techniques—and see how to avoid retry storms, ensure idempotency, and protect resources in high‑traffic backend services.
Understanding system design trade‑offs is crucial for building robust software; this article examines ten common compromises—from vertical vs. horizontal scaling and SQL vs. NoSQL to CAP theorem, consistency models, REST vs. GraphQL, stateful vs. stateless architectures, caching strategies, and synchronous vs. asynchronous processing—highlighting their benefits and drawbacks.
This article examines Alibaba's extensive cloud‑native technology stack—including distributed computing, storage, middleware, real‑time data processing, AI platforms, performance engineering, and security—revealing how its architects design systems that handle massive transaction volumes during events like Double 11.
This comprehensive guide explains the concept of idempotency, why it is essential in distributed and micro‑service architectures, and provides practical patterns, code examples, and best‑practice recommendations for HTTP, databases, messaging, caching, and service‑mesh implementations.
The article explores why architects at leading tech firms command six‑figure salaries while those in traditional companies earn far less, highlighting gaps in technical depth, massive data handling, performance optimization, business insight, continuous learning, and the scarcity of true senior architects.
This article explains the purpose of retry mechanisms, why exponential backoff is crucial for handling transient failures, compares common backoff strategies, details key parameters such as base delay, max delay, multiplier and jitter, and provides a Java example that demonstrates their practical effects.
This comprehensive course teaches developers how to design and implement a high‑throughput, scalable search engine for e‑commerce platforms using Elasticsearch and SpringBoot, covering architecture, data modeling, performance tuning, and advanced features such as autocomplete, fuzzy correction, price filtering, and sales reporting.
This article explores the concept of consistency in distributed systems, breaking down various consistency models—including linear, sequential, causal, and eventual—explaining their definitions, practical implications, and how they guide the design of high‑availability architectures and data replication strategies.
Microservices have become the standard architecture for large internet companies, offering superior scalability, maintainability, and team autonomy compared to monolithic systems, while demanding a broad tech stack—including service discovery, API gateways, container orchestration, and distributed transaction handling—making expertise in this area highly lucrative.
This article analyzes high availability construction for financial application systems, covering application cluster perspectives, business transaction analysis, infrastructure redundancy, and deployment architectures from single data center to multi-region disaster recovery, with specific RTO/RPO targets and technology choices like Nacos, Kafka, and distributed databases.
This comprehensive guide explains what Protocol Buffers are, why they outperform JSON and XML, how to install and configure the library, the supported data types, code generation for multiple languages, practical C++ examples, and typical scenarios such as distributed systems, storage, and network communication.
This article explores the pain points of a 700‑million‑row MySQL order table, presents vertical and horizontal sharding strategies, introduces gene‑based Snowflake IDs, details routing logic, migration steps, common pitfalls, and shows performance gains after applying the final architecture.
A recent production incident revealed duplicate order IDs caused by a flawed custom Snowflake generator, prompting a deep dive into the standard algorithm, the mistakes in the bespoke version, and practical recommendations for using proven implementations and proper machine‑ID configuration.
This article deeply explores Apache RocketMQ's retry mechanisms, detailing producer and consumer retry strategies, flow control handling, dead‑letter queue management, advanced configurations, best practices, and comparisons with Kafka and RabbitMQ, providing practical code examples and monitoring recommendations for building highly reliable distributed systems.
This article systematically breaks down RocketMQ's core mechanisms—covering message roles, disk storage, push/pull delivery, expiration handling, retry queues, and cluster failover—so developers can understand every stage a message undergoes from creation to cleanup and ensure reliable, high‑performance messaging.
This article presents a comprehensive set of RocketMQ usage guidelines—including topic and tag conventions, producer and consumer group naming, key handling, logging, retry mechanisms, and cluster deployment recommendations—to help engineers build stable, high‑performance, and observable messaging systems in production environments.
This article explains what Chaos Engineering is, why it matters for modern distributed systems, outlines a step‑by‑step approach to designing and running effective chaos experiments, describes platform features, and shares a real‑world case study of a pre‑launch blind test.
This article explains how RocketMQ’s CommitLog architecture—sequential writes, mmap zero‑copy, PageCache acceleration, fixed‑size log files, flexible flushing strategies, and efficient ConsumeQueue indexing—enables the system to sustain million‑level QPS with high reliability and low latency.
The article explains the drawbacks of traditional random UUIDs as primary keys, introduces the time‑ordered design of UUIDv7, compares it with earlier versions, and provides practical Java code and SQL examples for generating and using UUIDv7 in databases.
This article explains the principles of leader‑based and multi‑leader replication, compares synchronous and asynchronous modes, discusses consistency trade‑offs, conflict resolution strategies, and architectural variations for single‑ and multi‑data‑center deployments.
This article explains why traditional polling fails for large‑scale delayed tasks, compares built‑in Java, RocketMQ, and RabbitMQ delay queues, and provides a detailed Redis‑based design with architecture diagrams, message structures, and a 2.0 version that uses real‑time locking for low‑latency delivery.
This tutorial explains the definitions of faults and failures in distributed systems, explores their types and root causes, and presents fault‑tolerance mechanisms such as replication, checkpointing, redundancy, error detection, load balancing, and consensus algorithms to build resilient architectures.
This article introduces Dubbo, Alibaba’s high‑performance Java RPC framework, and provides a detailed examination of its client‑side load‑balancing mechanisms, covering the default Random strategy and the alternatives RoundRobin, LeastActive, and ConsistentHash, along with their principles, advantages, and drawbacks.
This article explores a supply‑chain consistency framework that tackles distributed transaction challenges by using eventual consistency, detailing its theoretical models, architecture, core components, async execution, retry mechanisms, and a practical code example for Spring‑Boot applications.
This article examines the theory and practice of shared memory in multi‑agent systems, tracing its evolution from classic blackboard models to modern solutions like Mem0.ai, Open Memory, and A‑MEM, and provides concrete design patterns, integration strategies, and future research directions for LangGraph users.
This article explains RocketMQ’s architecture, the roles of NameServer, Broker, Producer, Consumer, and how each component ensures reliable message delivery—covering synchronous, asynchronous, and one‑way sending, storage mechanisms, consumer retries, dead‑letter queues, installation steps, and Java client integration with code examples.
This article revisits RocketMQ's Name Server, detailing its core components, how it registers brokers, maintains routing information, handles client queries, and uses heartbeat mechanisms to ensure high availability and dynamic scaling in distributed messaging systems.
In 2024, China's six largest state-owned banks collectively invested over 125 billion yuan in fintech, prioritizing large language models, self-controlled cloud platforms, and distributed core system migrations while growing tech headcounts.
This article explains why Zookeeper's watch mechanism triggers only once, outlines the performance, reliability, and design reasons behind it, describes its asynchronous eventual consistency, and provides Java code examples for basic watches, manual re‑registration, and using the Curator framework for persistent listeners.
This article explains how to integrate WebSocket into a Spring Boot project to create a lightweight instant‑messaging system, covering dependency setup, configuration classes, core server implementation, required modules, common deployment issues, and practical solutions with complete code examples.
This article explains how to extend a single‑process Human‑in‑the‑Loop (HITL) agent to a distributed, multi‑user API service using FastAPI, detailing session management, interrupt handling, client and server fault‑recovery strategies, and providing concrete code snippets and architectural diagrams.
To replace long UUIDs with short, sequential numeric account IDs, the article explores the limitations of Snowflake’s 64‑bit IDs, evaluates MySQL auto‑increment and REPLACE INTO approaches, identifies deadlock issues, and ultimately proposes a segmented free‑ID table with batch allocation to achieve compact, ordered IDs.
This article explains the role of consensus algorithms in achieving high‑availability through redundancy and automatic failover, clarifies distributed consistency, explores the CAP theorem and its C component, and introduces the BASE theory as a practical complement for eventual consistency in modern distributed systems.
The article examines the challenges of generating short, user‑friendly numeric account IDs, evaluates Snowflake and MySQL auto‑increment approaches, discusses deadlock issues with REPLACE INTO, and presents a final segment‑based solution that allocates ID blocks per login server while avoiding waste and concurrency problems.
Chaos engineering, a scientific method for improving system resilience, is explored through an overview of leading tools such as Gremlin, ChaosBlade, Chaos Mesh, Chaos Toolkit, and ChaosMeta, alongside core concepts, real-world case studies, common misconceptions, and the practical value of controlled fault injection in distributed systems.
This article explores how to build fault‑tolerant distributed systems by formalizing consensus, outlines its core properties, explains the FLP impossibility theorem, and shows how algorithms like Raft sidestep its limits through timing constraints and recovery mechanisms.
Chaos engineering is a discipline that deliberately injects faults into distributed systems to test and improve resilience, tracing its evolution from Netflix's Chaos Monkey to modern platforms, outlining its operational workflow, benefits, and core principles for reliable system design.
This article explains the Cookie + Session mechanism for maintaining user state, discusses its limitations such as size, performance and security, examines challenges in distributed environments, and reviews common solutions including session replication, sticky load balancing, centralized storage, and the use of ThreadLocal for small‑scale backend applications.
This article dissects the classic Eight Fallacies of Distributed Computing, explaining each mistaken assumption about network reliability, latency, bandwidth, security, topology, administration, cost, and homogeneity, and provides real‑world case studies and practical recommendations to help engineers design more resilient distributed systems.
The article examines the 60‑year coding career of OceanBase founder Yang Zhenkun, outlining five concrete strategies—deep technical focus, embracing change, building soft‑skill influence, maintaining health, and proactive career planning—that enable programmers to sustain relevance and vitality in a fast‑moving industry.
Mooncake, an open‑source large‑model inference platform, introduces a KVCache‑centric architecture that dramatically improves throughput, reduces latency and cuts inference costs by up to 20%, while integrating with frameworks like SGLang and vLLM and leveraging Alibaba Cloud’s eRDMA and GPUDirect technologies for scalable, high‑performance deployments.
This article explores how fencing tokens can provide safety and liveness guarantees in distributed lock services, illustrating fault scenarios, token-based conflict resolution, and abstract system models that help engineers prioritize correctness while tolerating temporary unavailability.
Distributed systems suffer from network unreliability—including packet loss, out‑of‑order delivery, variable latency, and ambiguous node failures—making timeout settings and fault detection challenging, and this article explains these issues, compares synchronous and asynchronous networks, and discusses strategies to balance latency and resource utilization.
This article examines the unreliability of physical clocks in distributed systems, compares synchronous and asynchronous network timing, explains the roles of wall and monotonic clocks, and explores logical clocks, snapshot isolation, and practical solutions such as Google Spanner's TrueTime to ensure data consistency.
This article explains major distributed transaction algorithms including two-phase commit (2PC), three-phase commit (3PC), Saga pattern, and TCC, comparing their consistency guarantees, complexity, and trade-offs, while also covering CAP theorem and BASE theory for distributed system design decisions.
This article explains how to import 1 billion 1 KB log records stored in HDFS or S3 into MySQL by analyzing single‑table limits, using batch inserts, choosing storage engines, sharding, optimizing file‑reading methods, and coordinating distributed tasks with Redis, Redisson, and Zookeeper to ensure ordered, reliable, and high‑throughput data loading.
This article examines six different leaderboard implementation strategies—from simple database sorting and cache‑plus‑scheduled tasks to Redis sorted sets, sharded Redis clusters, pre‑computed layered caches, and real‑time stream processing with Flink—detailing their suitable scenarios, advantages, disadvantages, and architectural diagrams to help engineers choose the most appropriate solution.
This article explains how to use SLF4J's MDC with Logback to assign a unique trace ID to each request, propagate it across threads and services, and configure log patterns so that logs become fully traceable for easier debugging in distributed systems.
The article explains how the Agricultural Bank of China successfully shut down its IBM mainframe, detailing the mainframe's high‑performance architecture, redundancy features, software ecosystem, and why its replacement with a distributed micro‑service core using TDSQL marks a significant shift for banking IT infrastructure.
This article examines how unreliable physical clocks—both wall and monotonic—affect distributed systems, compares synchronous and asynchronous network timing, illustrates conflicts caused by timestamp drift, and presents logical clocks and Google’s TrueTime as robust solutions for achieving consistent ordering and data reliability.
This article explains the motivation, design choices, and implementation details of a custom distributed job scheduling framework, covering its architecture, load‑balancing strategy, message‑queue handling, persistence mechanisms, and key code snippets, while comparing it to existing solutions like Quartz, XXL‑Job, and PowerJob.
This article compiles essential interview questions covering TCP connection termination, multi‑port listening, page load workflow, Redis data structures, Kafka consumer sizing and at‑most‑once semantics, the CAP theorem, Singleton usage, C++ map complexity, and a doubly linked list reversal algorithm, providing concise explanations and code examples.
Microservices are independently deployable services modeled around business domains, offering benefits like smaller deployments, reduced risk, faster release cycles, and clear data ownership, while also introducing challenges such as distributed system complexity, operational overhead, and data consistency, requiring careful design of communication and scaling strategies.
The article examines China's rapid shift toward domestic databases across finance, government, and energy sectors, highlighting how DBAs must upgrade from reactive fire‑fighting to strategic architects by mastering distributed systems, AI‑driven automation, cloud‑native tools, and open‑source community collaboration.
This article explains RocketMQ's transactional message mechanism, covering half‑message storage, three transaction states, status‑check procedures, key APIs, storage reliability, and the two‑phase commit process that guarantees eventual consistency in distributed systems.
The article examines the Agricultural Bank of China's successful shutdown of its IBM mainframe, detailing the z14's specifications, redundancy and virtualization features, the shift to a high‑concurrency distributed micro‑service architecture with TDSQL, and the broader impact on banking and IBM’s presence in China.
This article details Tencent Cloud's approach to migrating large-scale bank core systems to cloud-native architectures, covering distributed design patterns, data sharding strategies, microservices governance, multi-active disaster recovery, and a phased migration roadmap from infrastructure cloudification to intelligent cloud-native operations.
This article critically examines the popular claims surrounding microservices, tracing their historical roots, debunking each touted benefit, exposing distributed‑computing fallacies, and highlighting the real organizational challenges, ultimately concluding that microservices are simply modular components rather than a revolutionary architecture.