Caching integration
NGINX is superb at serving static content. It is designed to support over 100,000 simultaneous connections while using only minimal system resources. Integrating a dynamic web application into such a well-architected server may mean a performance hit for the server. We may not be able to support as many simultaneous connections, but that does not mean that we cannot still give our users a snappy web experience.
Caching was introduced in Chapter 5, Reverse Proxy Advanced Topics. In this section, we will take an in-depth look at integrating NGINX's caching mechanisms into a web application. Your web application may already cache to a certain extent. Perhaps it writes prerendered pages into a database so that an expensive rendering task does not have to be repeated at each page view. Or, even better, your application may write prerendered pages into the filesystem so that they can simply be served by NGINX's stellar static file performance. No matter the caching mechanism...