Advanced Recipes for High-Performance Load Balancing
Derek DeJonghe

#NGINX
#HTTP
#TCP
#UDP
#HTTP3
#HTTP5
#cookbook
#AWS
#Azure
#cloud
#WAF
🚀 NGINX یکی از پرکاربردترین وبسرورهای دنیاست؛ بخشی از این محبوبیت بهخاطر توانایی فوقالعادهاش بهعنوان Load Balancer و Reverse Proxy برای HTTP و سایر پروتکلهای شبکهست. این نسخهی بازبینیشده از کتاب NGINX Cookbook مجموعهای از مثالهای واقعی و کاربردی برای حل مشکلات دنیای واقعی در حوزهی Application Delivery ارائه میکنه. Recipeهای عملی کتاب کمکت میکنن چه از نسخهی Open Source و چه از نسخهی تجاری NGINX استفاده کنی تا سناریوهای مختلف رو مدیریت و پیادهسازی کنی.
🧠 اگر با معماریهای مدرن وب مثل n-tier یا Microservices و پروتکلهایی مثل TCP و HTTP آشنا باشی، این کتاب مجموعهای از راهکارهای اثباتشده برای امنیت، Software Load Balancing، مانیتورینگ و نگهداری پلتفرم Application Delivery در اختیارت قرار میده. همچنین ویژگیهای پیشرفتهی NGINX و NGINX Plus — نسخهی رایگان و لایسنسدار این سرور — رو هم بررسی میکنی.
⚡️ داخل کتاب Recipeهایی برای موضوعات زیر پیدا میکنی:
⚖️ Load Balancing با کارایی بالا برای HTTP، TCP و UDP
🔐 امنسازی دسترسیها با ترافیک رمزنگاریشده، لینکهای امن، HTTP Authentication Subrequest و موارد بیشتر
☁️ استقرار NGINX روی Google Cloud، AWS و Azure
🛠️ راهاندازی و پیکربندی NGINX Controller
🧩 نصب و پیکربندی ماژول NGINX App Protect
🛡️ فعالسازی WAF از طریق Controller ADC
📊 کار با NGINX Instance Manager، Service Mesh و ماژول njs
📑 فهرست مطالب
فصل ۱: مبانی
فصل ۲: Load Balancing با کارایی بالا
فصل ۳: مدیریت ترافیک
فصل ۴: کشینگ محتوا در مقیاس بسیار بزرگ
فصل ۵: برنامهپذیری و اتوماسیون
فصل ۶: احراز هویت
فصل ۷: کنترلهای امنیتی
فصل ۸: HTTP/2 و HTTP/3 (QUIC)
فصل ۹: استریم پیشرفتهی رسانه
فصل ۱۰: استقرار در فضای ابری
فصل ۱۱: Containerها و Microserviceها
فصل ۱۲: حالتهای استقرار با دسترسپذیری بالا (High Availability)
فصل ۱۳: مانیتورینگ پیشرفتهی فعالیتها
فصل ۱۴: Debug و عیبیابی با Access Log، Error Log و Request Tracing
فصل ۱۵: بهینهسازی Performance
📘 درباره کتاب
🧠 هدف اصلی NGINX Cookbook اینه که مثالهای ساده و قابلفهمی از مشکلات واقعی در Application Delivery ارائه بده. در طول کتاب، قابلیتهای مختلف NGINX و نحوهی استفاده از اونها رو یاد میگیری. این راهنما نسبتاً جامع طراحی شده و بیشتر قابلیتهای اصلی NGINX رو پوشش میده.
⚙️ کتاب ابتدا فرایند نصب NGINX و NGINX Plus رو توضیح میده و بعد چند مرحلهی ابتدایی برای شروع کار کاربران تازهکار ارائه میکنه. بعد از اون، مباحث مربوط به Load Balancing در حالتهای مختلف شروع میشن و فصلهایی دربارهی مدیریت ترافیک، کشینگ و اتوماسیون هم در ادامه قرار گرفتن.
🔐 فصل ششم یعنی Authentication بخش گستردهای از مفاهیم رو پوشش میده و دلیلش هم واضحه: NGINX معمولاً اولین نقطهی ورود ترافیک وب به اپلیکیشن توئه و اولین خط دفاعی در لایهی Application در برابر حملات و آسیبپذیریهای وب محسوب میشه.
🚀 چند فصل کتاب هم سراغ موضوعات Cutting-Edge میرن؛ مثل HTTP/3 (QUIC)، استریم رسانه، Cloud، SAML Authentication و محیطهای Container. در پایان هم موضوعات عملیاتی سنتیتر مثل مانیتورینگ، Debug، Performance و نکات عملیاتی بررسی میشن.
🛠️ نویسنده میگه خودش از NGINX مثل یک Multitool استفاده میکنه و معتقده این کتاب به تو هم کمک میکنه همین کار رو انجام بدی. نرمافزاری که واقعاً بهش باور داره و از کار کردن باهاش لذت میبره. هدفش اینه که این دانش رو منتقل کنه تا هنگام خوندن کتاب، Recipeها رو با سناریوهای واقعی خودت تطبیق بدی و از راهکارها در پروژههات استفاده کنی.
👨💻 درباره نویسنده
🌍 درک دارای مدرک Amazon Web Services Certified Professional هست و تخصصش روی سیستمها و وباپلیکیشنهای مبتنی بر Linux/Unix قرار داره. سابقهی کاریش در توسعهی وب، مدیریت سیستم و شبکه باعث شده به یک منبع ارزشمند در حوزهی Cloud تبدیل بشه.
⚙️ تمرکز اصلیش در سالهای اخیر روی Infrastructure Management، Configuration Management، Continuous Integration و توسعهی ابزارهای زیرساخت داینامیک در فضای DevOps بوده. همچنین مدیریت سیستمها، شبکهها و فرایند Deployment چندین سرویس SaaS چندمستاجری (Multi-Tenant SaaS) رو برعهده داره.
NGINX is one of the most widely used web servers available today, in part because of itscapabilities as a load balancer and reverse proxy server for HTTP and other network protocols. This revised cookbook provides easy-to-follow examples of real-world problems in application delivery. Practical recipes help you set up and use either the open source or commercial offering to solve problems in various use cases.
For professionals who understand modern web architectures, such as n-tier or microservice designs and common web protocols such as TCP and HTTP, these recipes provide proven solutions for security and software load balancing and for monitoring and maintaining NGINX's application delivery platform. You'll also explore advanced features of both NGINX and NGINX Plus, the free and licensed versions of this server.
You'll find recipes for:
Table of Contents
Chapter 1. Basics
Chapter 2. High-Performance Load Balancing
Chapter 3. Traffic Management
Chapter 4. Massively Scalable Content Caching
Chapter 5. Programmability and Automation
Chapter 6. Authentication
Chapter 7. Security Controls
Chapter 8. HTTP/2 and HTTP/3 (QUIC)
Chapter 9. Sophisticated Media Streaming
Chapter 10. Cloud Deployments
Chapter 11. Containers/Microservices
Chapter 12. High-Availability Deployment Modes
Chapter 13. Advanced Activity Monitoring
Chapter 14. Debugging and Troubleshooting with Access Logs, Error Logs, and Request Tracing
Chapter 15. Performance Tuning
The NGINX Cookbook aims to provide easy-to-follow examples of real-world problems in application delivery. Throughout this book, you will explore the many features of NGINX and how to use them. This guide is fairly comprehensive, and touches on most of the main capabilities of NGINX.
The book will begin by explaining the installation process of NGINX and NGINX Plus, as well as some basic getting-started steps for readers new to NGINX. From there, the sections will progress to load balancing in all forms, accompanied by chapters about traffic management, caching, and automation. Chapter 6, “Authentication”, covers a lot of ground, but it is important because NGINX is often the first point of entry for web traffic to your application, and the first line of application-layer defense against web attacks and vulnerabilities. There are a number of chapters that cover cutting-edge topics such as HTTP/3 (QUIC), media streaming, cloud, SAML Auth, and container environments—wrapping up with more traditional operational topics such as monitoring, debugging, performance, and operational tips.
I personally use NGINX as a multitool, and I believe this book will enable you to do the same. It’s software that I believe in and enjoy working with. I’m happy to share this knowledge with you, and I hope that as you read through this book you relate the recipes to your real-world scenarios and will employ these solutions.
Derek is an Amazon Web Services Certified Professional. He specializes in Linux/Unix based Systems and Web Applications. His background in Web Development, System Administration and Networking make him a valuable cloud resource. A lot of his focus lately has been Infrastructure Management, Configuration management, Continuous Integration and developing tools for a dynamic infrastructure (DevOps). He maintains the systems, networks and deployments of multiple multi-tenant SaaS offerings.



