<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed Systems on YennJ12 Engineering Blog</title><link>https://yennj12.js.org/yennj12_blog_V4/tags/distributed-systems/</link><description>Recent content in Distributed Systems on YennJ12 Engineering Blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 08 Jun 2026 09:00:00 +0800</lastBuildDate><atom:link href="https://yennj12.js.org/yennj12_blog_V4/tags/distributed-systems/feed.xml" rel="self" type="application/rss+xml"/><item><title>FDE 面試指南 Part 43：跨國電商百萬級購物車 Agent 的分散式動態權限與狀態回復</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part43-async-cart-agent-zh/</link><pubDate>Mon, 08 Jun 2026 09:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/fde-interview-guide-part43-async-cart-agent-zh/</guid><description>大多數工程師看到「購物車 Agent」，第一反應是加一個 HTTP 呼叫。 資深工程師看到的是：200 萬個並發狀態機、隨時會蒸發的 Pod、以及絕不允許重複扣款的業務紅線。 前者寫了一個能示範的 Demo，後者設計了一個能活過黑五的系統。 差距不在代碼行數，在於你把「失敗」當作例外還是當作設計輸入。
面試情境 面試官提問（Staff FDE L6 考題）：
你的電商平台計劃在黑五期間為 200 萬名在線用戶 同時運行「自動購物車談判 Agent」。 Agent 必須在背景異步監控庫存、與供應鏈 Agent 協商折扣，並在完成後推送通知。 已知 GKE 節點在大促期間會因搶佔（Preemption）和 OOM 隨機重啟， 請問你如何設計這個系統的異步架構？ 當一個執行到第 5 輪反思循環（Reflection Loop）的 LangGraph Agent Pod 突然消失時， 你如何保證不遺失狀態、不重複通知、不重複扣款？
一、核心問題：為什麼同步 HTTP 在這裡是個死路 1.1 規模帶來的物理上限 200 萬在線用戶同時觸發購物車事件，假設每個 Agent 執行一次完整談判流程需要 8–15 秒（含多輪 LLM 推理、供應鏈 API 呼叫），同步模型意味著：
同步 HTTP 模型的致命算術 ───────────────────────────────────────────────────── 並發請求量 ：2,000,000 個用戶 × 黑五流量因子 3× = 6M req 平均持續時間 ：~12s（5 輪反思 × 2.</description></item><item><title>MySQL Sharding Strategies: A Comprehensive Guide to Horizontal Scaling, Partitioning Methods, and Implementation Patterns</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/mysql-sharding-strategies-comprehensive-guide/</link><pubDate>Mon, 29 Sep 2025 07:54:22 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/mysql-sharding-strategies-comprehensive-guide/</guid><description>🎯 Introduction Database sharding is a critical technique for achieving horizontal scalability in large-scale applications. As data volumes grow beyond what a single database instance can handle efficiently, sharding becomes essential for maintaining performance and availability. This comprehensive guide explores MySQL sharding strategies, comparing different approaches, implementation patterns, and real-world considerations.
Sharding involves distributing data across multiple database instances (shards), where each shard contains a subset of the total data. This approach enables applications to scale beyond the limitations of vertical scaling and provides better resource utilization across multiple servers.</description></item><item><title>Redis Sentinel: Complete High Availability Setup Guide with Java Integration and Monitoring</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/redis-sentinel-high-availability-setup-guide/</link><pubDate>Mon, 29 Sep 2025 07:54:22 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/redis-sentinel-high-availability-setup-guide/</guid><description>🎯 Introduction Redis Sentinel provides high availability and monitoring for Redis deployments. It&amp;rsquo;s a distributed system that monitors Redis master and replica instances, performs automatic failover, and acts as a configuration provider for clients. This comprehensive guide covers Redis Sentinel architecture, setup procedures, Java integration, and production best practices.
Redis Sentinel solves critical production challenges including automatic failover, service discovery, and configuration management, making it essential for mission-critical applications that require high availability and minimal downtime.</description></item><item><title>Building Resilient Systems: Handling Failure at Scale</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/building-resilient-systems/</link><pubDate>Sun, 10 Aug 2025 15:28:17 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/building-resilient-systems/</guid><description>How we built systems that gracefully handle failures and maintain service availability even when components fail.</description></item><item><title>Microservices Architecture Patterns: Lessons from Scale</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/microservices-architecture-patterns/</link><pubDate>Sun, 10 Aug 2025 15:28:17 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/microservices-architecture-patterns/</guid><description>Deep dive into proven microservices architecture patterns that help organizations scale their systems effectively while maintaining reliability and developer productivity.</description></item><item><title>Data Consistency Patterns in Java Enterprise Applications</title><link>https://yennj12.js.org/yennj12_blog_V4/posts/data-consistency-patterns-java-enterprise-applications/</link><pubDate>Tue, 28 Jan 2025 00:00:00 +0800</pubDate><guid>https://yennj12.js.org/yennj12_blog_V4/posts/data-consistency-patterns-java-enterprise-applications/</guid><description>🎯 Introduction Data consistency is one of the most critical challenges in modern Java enterprise applications. As systems scale and become distributed, maintaining data integrity while ensuring performance becomes increasingly complex. This comprehensive guide explores practical data consistency patterns implemented in real-world Java applications, complete with case studies, implementation details, and detailed trade-off analysis.
📊 The Data Consistency Challenge 🔍 Understanding Data Consistency Levels Data consistency refers to the guarantee that all nodes in a distributed system see the same data at the same time.</description></item></channel></rss>