The basic principle of content caching is to offload repetitive work from the upstream servers.When the first user requests an item of content on the website (illustrated by the blue icon and blue lines), his or her HTTP request is forwarded to NGINX, and from there onto the upstream server in gray on the right‑hand side.
Proxycacheusestale updating Adult sex dating free emailing zimbabwe
lets imagine we have a simple I configured the app with my own path/uri and to look for upstream server on port 6677 so you need to change it if you are using different settings. Lets add caching, for this we will need to add nginx frontend config.
In most cases i create a single nginx config for each server in sites-available directory and symlink it in sites-enabled (like apache do by default).
With ruby and rails we often want to have caching of static content so we will try to reduce requests that has to come through rails stack when possible.
Nginx in front is a great tool and we can use its abilities to add caching easy.
Today, Owen is going to talk about how can you apply powerful caching mechanisms in NGINX to free your application from the burden of generating repetitive content over and over again.