How to warm your CDN cache using warmer?
abhai
15 November 2022
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.
A CDN cache warmer in Rust
abhai
15 November 2022
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.
Use cloudflare to speed up your Drupal site and save money
abhai
26 June 2022
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.