Warm the cache but don’t raise too many DNS requests

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

0
задан 23 August 2017 в 21:51
1 ответ

Вы можете поместить nginx за лаком, чтобы он работал как backend loadbalancer, а затем приказал ему кэшировать разрешения DNS на более длительный срок. Таким образом, varnish будет просто передан 127.0.0.1, а nginx сможет обработать DNS от его имени.

0
ответ дан 5 December 2019 в 07:29

Теги

Похожие вопросы