Preface

You will learn how to notes problems before your boss calls you about some pages not loading. You will learn how to find those problems using logs and your usual Linux toolbox. You will also learn how to minimize the probability of problems happening again.

Nginx started as a web accelerator reverse proxy inside one of the big Russian web companies of the early 2000s. The main web server software was Apache 1.3, and it started to show architectural problems serving thousands of relatively slow clients using the old process-based model. Smart web engineers were already building two-tier systems of light frontends based on the mod_proxy Apache module or even used the squid caching proxy in the reverse proxy mode.

The early predecessor of Nginx was named mod_accel, and it was also implemented as an Apache module. The mod_accel module gained some popularity among the administrators of some of the busiest websites, but it is nothing compared with what Nginx later enjoyed. Both of them are built on the idea that the additional level of proxying on the server side of a busy website is a good thing, providing both the extra flexibility and separating the job of serving slow clients from the actual response generation.

Nginx took the idea of mod_proxy module to the extreme by being a self-sufficient separate HTTP server with a goal to solve the so-called C10K problem, that is, serving 10,000 concurrent connections. The numbers do not look impressive at all in 2016, but they did in 2007 when Nginx first claimed a significant share of 1% of the Web according to Netcraft.

Since that time, the share grew manifold while Nginx steadily gained new functionality and remained the ideal open source success story project with a single, talented developer devoting his genius to producing free quality software, which the whole Web could benefit from.

In 2011, a commercial enterprise named Nginx, Inc. was founded, which allowed even more freedom for the developers (now a team). The firm provides both support services and a special subscription-based extended version of the software named Nginx Plus. We will mention some of the Nginx Plus features in the sixth chapter.

In 2016, Nginx is a great tool many businesses are built upon. However, it is still just a tool which requires a master to show its full potential. If you want to understand what is going on in your web server, to be able to write correct Nginx configuration files and read Nginx logs, and if you want your web server to be very fast, you will have to become that master.

What this book covers

Chapter 1, Searching for Problems in Nginx Configuration, briefly describes the configuration language of Nginx and presents some of the corner cases and several techniques to search for problems.

Chapter 2, Searching for Problems in Log Files, describes the logging subsystem, log syntax, and what to look for when you troubleshoot. Nginx provides thorough logs of everything it does.

Chapter 3, Troubleshooting Functionality, the central chapter in this book, contains a list of steps you will make while investigating a problem. You will find the types of problems people generally encounter with their Nginx-powered web servers.

Chapter 4, Optimizing Website Performance, is dedicated to all things about performance. Starting with thorough explanation of the basic principles behind the Nginx event-driven processing model, it also touches on caching and even gives some advice on possible upstream optimization.

Chapter 5, Troubleshooting Rare Specific Problems, is devoted to studies of several real cases that you may face, from some of the simplest and easiest cases to fix to more problematic cases. The cases described might not be the most frequent, but they still provide valuable insight on the internals of the software and the methods of troubleshooting.

Chapter 6, Monitoring Nginx, is devoted to the abundance of tools available today that you may use for monitoring. No system is complete without good processes for the detection of emerging problems.

Chapter 7, Going Forward with Nginx, the short final chapter, provides a selection of directions you may choose for your further development as a specialist. The whole industry is very dynamic, and you should never settle.

Appendix, Rare Nginx Error Messages, provides a reference of interesting and not very common error messages that you might encounter in your log files.

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

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