DEV Community

Discussion on: I'm Junade Ali, author of multiple software books and working on a PhD in theoretical computer science. Ask me anything!

Collapse
 
joshuagilless profile image
Joshua Gilless • Edited

Thanks for doing this! I have a couple of questions:
What's the most commonly overlooked actions those of us using Cloudflare can take to increase our cache hit rate?
When you wrote your php book, how did you decide the order of topics to cover?

Collapse
 
icyapril profile image
Junade Ali

Cache Question

Funny you should ask:

In that case there were some behind the scenes tweaks I used to optimise the cache behaviour in a way that (unless you're running a JS CDN) wouldn't be necessary for most sites on Cloudflare. These included ignoring the Origin header in the Cache Key and customising the Cache Topology to optimise traffic routing for cache hits.

In terms of general advice:

First and foremost, get your cache control headers right and make sure content is actually being cached (see the CF-Cache-Status headers). Use something like Bypass Cache on Cookie to cache dynamic content (when the viewers are anonymous).

Secondly enable Argo, Tiered Caching will make sure the stuff you requests stays cached by failing over to other Cloudflare data centres when something isn't in a local cache (whilst optimising the path around the internet that the request takes).

Also check out Origin Cache-Control it's a really cool and powerful feature for cache management.

Then measure and test continuously to improve your cache configuration.

Book Question

Instead of ordering the book chronologically, I ordered it logically by the information someone would most likely need to understand before moving on to the next topic. Building up complexity incrementally also makes it easier for someone to follow your book, even where the learning curve is more steep.

Collapse
 
joshuagilless profile image
Joshua Gilless

Thank you very much!