Avoid showing user specific information by wrongful caching
Usually guests see some bits different then logged in users. A simple way to start with Varnish is to avoid all the caching logic for logged in users.
Usually guests see some bits different then logged in users. A simple way to start with Varnish is to avoid all the caching logic for logged in users.
Caching and everything else should work behind basic auth too.
That way we define one single source of truth for all business logic related to incoming requests, caching, header transformation, etc...
Handle as many redirects as possible outside of your application
If you have a Laravel or Symfony or Ruby or Python or Next.js application, or some fancy flavor of a CMS, then why do you need to allow wordpress requests coming in?
There are good bots, and then there are the others. And they can cause some trouble with aggressive peaks in traffic.
You can either scale horizontally OR you can optimize your nginx config for handling of missing files.