One of the most common questions we are asked at section.io is “how long does it take to (select your favourite term) “clear”, “purge”, “evict”, or “ban” an item the cache?” Our answer has been “near real time” as we built section.io to instantly purge cache globally.
We monitor every cache purge on our platform and I thought it might be interesting to review the results and put some hard numbers against the time to clear cache on section.io.
How to Clear Cache on section.io
As a bit of background, users of section.io can clear their cache in a number of ways to achieve any cache clearing outcome they may desire, from very granular clearing to a broad dump of the section.io cache globally:
1. Purge particular URLs
You can remove particular URLs from the cache by entering the URL and clicking Purge URL. This form accepts wildcards in the form of * so entering /assets/images followed by a star will purge all URLs starting with /assets/images.
2. Empty the entire cache
This will remove everything we have cached for your site. Use this if the cache is completely out of date and it needs to be refreshed. NOTE: This may cause increased load on your origin server until we are able to refill the cache.
3. Custom Varnish Cache ban expression
Our cache is an instance of Varnish Cache so you can use ban expressions to prevent objects from being served from the cache. To learn how to use bans, see the Varnish Cache documentation.
4. Clearing Pagespeed Cache
For users of Google’s Pagespeed module on section.io, clearing the Pagespeed cache is simple as there is only one option: empty the entire cache. To do this, all you need to do is click the red button labeled Empty the entire cache.
5. Magento plugins
Users of section.io’s Magento 2 plugin will have their Magento 2 website already hooked up to section.io’s platform so, for example, if you update a product on your Magento 2 install it will clear the cache on section.io of that product image automatically. Magento 2 users can also clear different parts of the section.io cache within the extension. Magento 1 users can launch cache evicitions from the Magento 1 application by installing our Varnish version which supports the Turpentine extension.
Time to Clear Cache on section.io
section.io’s platform is a globally distributed Docker container platform. A cache evicition instruction can be launched from our console as described above, directly against our API gateway or from a Magento instance. Regardless of the trigger point, a cache clear instruction will hit our API gateway and then be distributed out to your Docker containers running whatever version of Varnish Cache or Pagespeed (or both) that you have running on section.io.
How long does this take?
End to end, a cache purge on section.io takes 180 milliseconds.
I just grabbed the following data describing the median and 95th percentile cache clear times from the section.io platform globally over the last hour:
I have heard other content delivery solutions talk about cache clearing in minutes or seconds. It’s not fast enough unless we are talking milliseconds. And the time to apply a ban on the section.io platform?
45 milliseconds (median obsevation from following graph):
How did we measure?
So we log the ban time for every ban (see following representation of the log in Kibana) and roll them up from there. This particular example was a Magento 2 initiated ban:
Try out containerized Content Delivery
To try section.io’s content delivery solution and developer workflow please get in touch and we’d be happy to give you a demo and a free 14 day trial of our system and reverse proxies such as Varnish Cache, Pagespeed FEO, and Threat X.