Common misconception - CDNs can *only* cache images and videos ⚡

Arpit Bhayani

Arpit Bhayani

Aug 25, 2023 • 1 min read


Common misconception - CDNs can only cache images and videos ⚡

To be honest, CDNs do not care what they are getting from the origin servers. For them, it is just a stream of bytes that they can cache on edge servers for some time.

Because it is a transparent cache that sits between the user and the origin, you can use it to cache images, videos, JS bundles, and even API responses where the response is not supposed to change often, for example

  • Popular searches (semi-personalized)
  • Trending topics (semi-personalized)
  • Feed for specific cohorts of users (Hotstar, Prime, Netflix, etc.)

We always work with this assumption that if you are caching anything, you should be okay serving stale data to users.

⚡ I keep writing and sharing these engineering nuggets, so if you are keen on learning them, follow along.

youtube.com/c/ArpitBhayani

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses