Skip to main content

How to warm your CDN cache using warmer?

Download the binary:

wget https://github.com/codingsasi/warmer/releases/download/0.0.1-rc4/warmer

Usage:

# warmer http(s)://someurl.com/sitemap.xml interval
./warmer https://abh.ai/sitemap.xml 5 # interval of 5 seconds
./warmer https://abh.ai/sitemap.xml 1 # interval of 1 second

Set as a cronjob every day: 

crontab -e

Then add the following to it.

Tags

A CDN cache warmer in Rust

Cache Memory
While using CDN caches like Cloudflare or Akamai and even for http caches like Varnish, it is important to "warm the cache" after deployments when the caches are usually cleared. This means sometimes manually loading up all the important pages for the first time so that it is loaded into cache. What if this could be automated through the sitemap using a simple CDN cache warmer.

Tags

Use cloudflare to speed up your Drupal site and save money

Drupal + Cloudflare
If you're running a small Drupal site on limited space like I am, you'll probably not have more than 30 GB for hard disk space and maybe 2 vCPU and 2 GB RAM on your server. This could affect your Drupal site speed if there are a lot of images or even with time as the content grows, you'll have server load issues. I've optimized my site so much that the performance is 98-100 on most pages and still able to sustain a viewership of 250 - 500 views per day without the server freaking out.
Subscribe to Cache
x

Work

Therefore logo
80 Atlantic Ave, Toronto, ON Canada
Email: hello@therefore.ca
Call us: +1 4166405376
Linkedin

Let us know how we can help!