Patterns and Paradigms for Scalable, Reliable Systems Using Kubernetes
Brendan Burns

#design_patterns
#Systems_engineer
#application_developer
🌐 هر سیستم توزیعشدهای دنبال پایداری، کارایی و کیفیت بالاست، اما ساختن چنین سیستمی سخته. داشتن مجموعهای از الگوهای طراحی باعث میشه دولوپرهای نرمافزار و معمارهای سیستم از یک زبان مشترک برای توصیف سیستمهاشون استفاده کنن و از الگوها و تجربههایی که بقیه توسعه دادن یاد بگیرن.
📦 محبوبیت کانتینرها و کوبرنتیز مسیر استفاده از الگوهای اصلی سیستمهای توزیعشده و کامپوننتهای کانتینریِ قابلاستفادهمجدد رو هموار کرده. این راهنمای عملی، مجموعهای از الگوهای تکرارشونده و عمومی ارائه میده تا سیستمهایی که میسازی رو با استفاده از الگوها و روشهای رایج گرفتهشده از بعضی از قدرتمندترین سیستمهای توزیعشدهی امروزی هدایت کنه. این الگوهای رایج باعث میشن سیستمهایی که میسازی خیلی قابلفهمتر و بهینهتر باشن، حتی اگر قبلاً هیچ سیستم توزیعشدهای نساخته باشی.
🧠 نویسنده، برندن برنز، نشون میده چطور میتونی الگوهای موجود طراحی نرمافزار رو برای طراحی و ساخت اپلیکیشنهای توزیعشدهی قابلاعتماد تطبیق بدی. مهندسهای سیستم و اپلیکیشن دولوپرها یاد میگیرن این الگوهای قدیمی و تثبیتشده چطور یک زبان مشترک و چارچوب فراهم میکنن که کیفیت سیستم رو بهشکل چشمگیری بالا میبره.
🚀 این ویرایش دوم که کاملاً بهروزرسانی شده، فصلهای جدیدی دربارهی استنتاج هوش مصنوعی، آموزش هوش مصنوعی و ساخت سیستمهای مقاوم برای دنیای واقعی داره.
🔹 یاد میگیری الگوها و کامپوننتهای قابلاستفادهمجدد چطور توسعهی سریع سیستمهای توزیعشدهی قابلاعتماد رو ممکن میکنن
🔹 از الگوهای سایدکار، آداپتر و امباسدور استفاده میکنی تا اپلیکیشنت رو به گروهی از کانتینرها روی یک ماشین تقسیم کنی
🔹 الگوهای توزیعشدهی چندنودی با اتصال ضعیف رو برای تکثیر، مقیاسپذیری و ارتباط بین کامپوننتها بررسی میکنی
🔹 الگوهای سیستمهای توزیعشده برای پردازش دادهی دستهای در مقیاس بزرگ رو یاد میگیری که شامل صفهای کاری، پردازش مبتنی بر رویداد و جریانکارهای هماهنگشده میشن
📚 فهرست مطالب
بخش اول: مفاهیم پایه
1. مقدمه
2. مفاهیم مهم سیستمهای توزیعشده
بخش دوم: الگوهای تکنودی
3. الگوی سایدکار
4. امباسدورها
5. آداپترها
بخش سوم: الگوهای سرویسدهی
6. سرویسهای تکثیرشده با توزیع بار
7. سرویسهای شاردشده
8. پراکندگی/جمعآوری
9. فانکشنها و پردازش مبتنی بر رویداد
10. انتخاب مالکیت
بخش چهارم: الگوهای پردازش محاسباتی دستهای
11. سیستمهای صف کاری
12. پردازش دستهای مبتنی بر رویداد
13. پردازش دستهای هماهنگشده
بخش پنجم: مفاهیم عمومی
14. الگوهای مانیتورینگ و مشاهدهپذیری
15. استنتاج و سرویسدهی هوش مصنوعی
16. الگوهای رایج Failure
🎯 چه کسانی باید این کتاب رو بخونن
📱 توی این دوره، تقریباً هر دولوپری یا سازندهی سیستمهای توزیعشدهست یا مصرفکنندهی اونها — یا هر دو. حتی اپلیکیشنهای موبایل نسبتاً ساده هم توسط APIهای ابری پشتیبانی میشن تا دادههاشون روی هر دستگاهی که کاربر استفاده میکنه در دسترس باشه. فرقی نمیکنه تازه وارد توسعهی سیستمهای توزیعشده شده باشی یا متخصصی باتجربه باشی که زخمهای این مسیر رو روی دستش داره؛ الگوها و کامپوننتهایی که توی این کتاب توضیح داده شدن میتونن توسعهی سیستمهای توزیعشده رو از یک هنر به یک علم تبدیل کنن. کامپوننتها و الگوهای قابلاستفادهمجدد برای سیستمهای توزیعشده بهت اجازه میدن روی جزئیات اصلی اپلیکیشنت تمرکز کنی. این کتاب کمک میکنه هر دولوپری در ساخت سیستمهای توزیعشده بهتر، سریعتر و بهینهتر عمل کنه.
✍️ چرا این کتاب رو نوشتم
💡 در طول دوران کاریم بهعنوان دولوپر انواع مختلفی از سیستمهای نرمافزاری، از جستجوی وب گرفته تا رایانش ابری، تعداد زیادی سیستم توزیعشدهی مقیاسپذیر و قابلاعتماد ساختم. هرکدوم از این سیستمها تقریباً از صفر ساخته شدن. بهطور کلی، این موضوع دربارهی همهی اپلیکیشنهای توزیعشده صدق میکنه. با اینکه خیلی از اونها مفاهیم مشابه و حتی گاهی منطق تقریباً یکسانی دارن، استفاده از الگوها یا استفادهی مجدد از کامپوننتها اغلب خیلی سخت و چالشبرانگیزه. این موضوع باعث شد زمان زیادی صرف پیادهسازی دوبارهی سیستمها کنم و در نهایت هر سیستم کمتر از چیزی که میتونست باشه، صیقلخورده و کامل شد. معرفی کانتینرها و ارکستریتورهای کانتینری، فضای توسعهی سیستمهای توزیعشده رو بهشکل اساسی تغییر داد. ناگهان ما یک شیء و رابط برای بیان الگوهای اصلی سیستمهای توزیعشده و ساخت کامپوننتهای کانتینریِ قابلاستفادهمجدد داشتیم. من این کتاب رو نوشتم تا همهی فعالهای حوزهی سیستمهای توزیعشده رو کنار هم بیارم و یک زبان مشترک و کتابخانهی استاندارد مشترک در اختیارمون بذارم تا همه بتونیم سریعتر سیستمهای بهتری بسازیم.
👤 درباره نویسنده
برندن برنز معاون ارشد مایکروسافت و مسئول مدیریت و حاکمیت Azure، Azure Arc، کوبرنتیز روی Azure، لینوکس روی Azure و پاورشل هست. قبل از مایکروسافت، در گوگل و روی Google Cloud Platform کار میکرد؛ جایی که یکی از بنیانگذارهای پروژهی کوبرنتیز بود و به ساخت APIهایی مثل Deployment Manager و Cloud DNS کمک کرد. قبل از فعالیت در حوزهی رایانش ابری هم روی زیرساخت جستجوی وب گوگل با تمرکز روی ایندکسگذاری کمتأخیر کار میکرد. او دکترای علوم کامپیوتر از دانشگاه University of Massachusetts Amherst با تخصص در حوزهی رباتیک داره. او همراه همسرش رابین سندرز، دو فرزندشون و گربهشون Mrs. Paws در سیاتل زندگی میکنه؛ گربهای که به گفتهی خودشون، با یک پنجهی آهنین روی خونه حکومت میکنه.
Every distributed system strives for reliability, performance, and quality, but building such a system is hard. Establishing a set of design patterns enables software developers and system architects to use a common language to describe their systems and learn from the patterns and practices developed by others.
The popularity of containers and Kubernetes paves the way for core distributed system patterns and reusable containerized components. This practical guide presents a collection of repeatable, generic patterns to help guide the systems you build using common patterns and practices drawn from some of the highest performing distributed systems in use today. These common patterns make the systems you build far more approachable and efficient, even if you've never built a distributed system before.
Author Brendan Burns demonstrates how you can adapt existing software design patterns for designing and building reliable distributed applications. Systems engineers and application developers will learn how these long-established patterns provide a common language and framework for dramatically increasing the quality of your system.
This fully updated second edition includes new chapters on AI inference, AI training, and building robust systems for the real world.
Table of Contents
Part I. Foundational Concepts
Chapter 1. Introduction
Chapter 2. Important Distributed System Concepts
Part II. Single-Node Patterns
Chapter 3. The Sidecar Pattern
Chapter 4. Ambassadors
Chapter 5. Adapters
Part III. Serving Patterns
Chapter 6. Replicated Load-Balanced Services
Chapter 7. Sharded Services
Chapter 8. Scatter/Gather
Chapter 9. Functions and Event-Driven Processing
Chapter 10. Ownership Election
Part IV. Batch Computational Patterns
Chapter 11. Work Queue Systems
Chapter 12. Event-Driven Batch Processing
Chapter 13. Coordinated Batch Processing
Part V. Universal Concepts
Chapter 14. Monitoring and Observability Patterns
Chapter 15. AI Inference and Serving
Chapter 16. Common Failure Patterns
Who Should Read
This Book At this point, nearly every developer is a developer or consumer (or both) of distributed systems. Even relatively simple mobile applications are backed with cloud APIs so that their data can be present on whatever device the customer happens to be using. Whether you are new to developing distributed systems or an expert with scars on your hands to prove it, the patterns and components described in this book can transform your development of distributed systems from art to science. Reusable components and patterns for distributed systems will enable you to focus on the core details of your application. This book will help any developer become better, faster, and more efficient at building distributed systems.
Why I Wrote This Book
Throughout my career as a developer of a variety of software systems, from web search to the cloud, I have built a large number of scalable, reliable distributed systems. Each of these systems was, by and large, built from scratch. In general, this is true of all distributed applications. Despite having many of the same concepts and even at times nearly identical logic, the ability to apply patterns or reuse components is often very, very challenging. This forced me to waste time reimplementing systems, and each system ended up less polished than it might have otherwise been.The recent introduction of containers and container orchestrators fundamentally changed the landscape of distributed system development. Suddenly we have an object and interface for expressing core distributed system patterns and building reusable containerized components. I wrote this book to bring together all of the practitioners of distributed systems, giving us a shared language and common standard library so that we can all build better systems more quickly.
Brendan Burns is Corporate Vice President at Microsoft responsible for Azure management and governance, Azure Arc, Kubernetes on Azure, Linux on Azure and PowerShell. Prior to Microsoft he worked at Google in the Google Cloud Platform, where he co-founded the Kubernetes project and helped build APIs like Deployment Manager and Cloud DNS. Before working on cloud, he worked on Google's web-search infrastructure, with a focus on low-latency indexing. He has a PhD in Computer Science from the University of Massachusetts Amherst with a specialty in Robotics. He lives in Seattle with his wife Robin Sanders, their two children and a cat Mrs. Paws, who rules over their household with an iron paw.









