I have a website with over a million pages served from a varnish cache that sits behind nginx and every day I run a cron to invalidate all the pages (Don’t ask me why, it's complicated…). The website is behind Cloudflare and I am charged per DNS request.
What can I do to reduce the number of URL requests that are sent to Cloudfare? I thought of putting in a separate server prefix that bypasses Cloudflare but realized varnish’s key is the full FQDN+ trailing URL
Вы можете поместить nginx за лаком, чтобы он работал как backend loadbalancer, а затем приказал ему кэшировать разрешения DNS на более длительный срок. Таким образом, varnish будет просто передан 127.0.0.1, а nginx сможет обработать DNS от его имени.