Preface

NGINX is one of the most widely used web servers on the Internet. The server is often named when one is looking to deliver better performance with the same hardware. The server has a state-of-the-art event-based architecture, which enables it to deliver hundreds of thousands of concurrent connections on standard hardware.

As a first step, adopting NGINX leads to better results. However, as with any piece of software, NGINX can also be optimized to serve content faster. This book provides ways to optimize NGINX for last-mile performance. It also aims to provide insights into the NGINX architecture for you to understand it better. The book is not an NGINX learning book and is intended for people with some experience with NGINX. The book only explains those parts of the NGINX configuration that have an impact on performance.

Besides NGINX optimization, the book also talks about the process of benchmarking and about baselines to quantify the gains made. This is an end-to-end book that helps you to tweak the NGINX server's performance.

What this book covers

Chapter 1, Working with NGINX, talks about NGINX's high-performance architecture. It also explains the various modules available in NGINX. The chapter lists details of the amenability of the server to customization. In the end, the chapter builds a simple configuration to deploy example web pages in NGINX.

Chapter 2, Benchmarking the Server, explains performance testing to generate baselines. Siege and JMeter are tools used to measure and benchmark the performance of your server. The chapter aims to generate metrics for the web pages deployed in Chapter 1, Working with NGINX, which can be compared to see performance changes.

Chapter 3, Tweaking NGINX Configuration, covers the parameters: Worker and Worker_process, the use method and multi_accept, Sendfile, directio and aio, tcp_nodely, and tcp_nopush.

Chapter 4, Controlling Buffers, Timeouts, and Compression, lists the features: keeplive, send timeouts, client buffers, gzip compression, and controlling logs.

Chapter 5, Configuring the Network Stack, lists details about tweaking the TCP options to achieve better network utilization. This chapter also talks about various server defaults that need to be customized.

Chapter 6, Using NGINX Cache, shows that NGINX can cache static content, as well as dynamic content. The server provides various directives to cache content. The chapter lists ways to use caches, namely FastCGI Cache, NGINX Proxy Cache, and Memcache, to render content.

Chapter 7, Extending NGINX, provides details of HttpLuaModule, which can be used to extend NGINX for all kinds of activities. The module enables support for Lua, which is a powerful, fast, lightweight, embeddable scripting language. The chapter aims to build an SEO check using Lua.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.97.187