I noticed something frustrating: while my Hugo frontend (hosted on Netlify’s Edge) was lightning fast, images and videos were lagging. Every time I opened a post, there was a noticeable “pop-in” delay for media — the text would render instantly, then the images would trickle in a second or two later.

The issue lies on my storage backend.

I recently migrated my assets to a MinIO instance running on a BuyVM storage slab in Switzerland 🇨🇭. I love it — 80GB SSD, full S3-compatible API, and the data privacy story is hard to beat. But physics doesn’t care about any of that. Switzerland is physically far from most of my readers, and every uncached image request had to make a full round trip there.

Here is how I fixed it using Cloudflare as a “Swiss Army Knife” for performance.


Understanding the Problem

Before throwing solutions at it, it’s worth understanding exactly what was slow and why.

My blog’s architecture looked like this:

Before-cdn

Netlify’s Edge CDN does a great job with static HTML because it’s tiny and globally replicated. But images and videos are large binary assets — Netlify doesn’t cache those from an external S3 origin by default. So every image request punched straight through to Zurich.

The latency breakdown for a user in, say, Singapore:

  • Singapore → Switzerland RTT: ~180ms
  • TLS handshake: add another ~180ms on first connection
  • Transfer time for a 500KB image at ~50 Mbps: ~80ms

That’s 440ms+ for a single image on first load. With multiple images per post, the pop-in was inevitable.

The Optimization Layer: Cloudflare Cache Reserve

The first thing I did was enable Cloudflare Cache Reserve.

To understand why Cache Reserve matters, you need to know how a standard CDN cache works. Normally, a CDN caches “hot” content — files that are requested frequently enough to justify keeping a copy at the edge. If a file hasn’t been requested recently, the CDN evicts it. The next visitor triggers a cache miss, and the CDN has to fetch the file from origin (Switzerland) again.

For a personal blog, almost every file is “cold” by CDN standards. A post from six months ago might only get a handful of hits per week — not enough to stay warm in a standard edge cache. So every new visitor to an older post was getting a cache miss, hitting Switzerland every time.

Cache Reserve changes this. Instead of keeping files only in volatile edge memory, it uses Cloudflare’s R2 object storage as a persistent backing layer. Once a file is fetched from origin, it’s written to R2 and stays there indefinitely — regardless of how often it’s requested. Future cache misses at any edge node are filled from R2 (within Cloudflare’s network) rather than going all the way back to Switzerland.

By using it, I ensured that once a file hits Cloudflare, it stays there. The results speak for themselves:

Screenshot2026-02-21at5.28.20PM

This means 9 out of 10 requests are served directly from Cloudflare’s global edge, never even touching my Swiss VPS😎.


The Final Polish: Fixing “Efficient Cache Lifetimes”

Even with a 90% hit ratio, I noticed Lighthouse was still flagging my site for “efficient cache lifetimes.” :(

I realized I had a gap in my logic. There are actually two types of “caching” happening here:

  1. Edge Cache (Cloudflare to Origin): Cloudflare has the file ready. This was working perfectly.
  2. Browser Cache (User to Cloudflare): The user’s browser didn’t know it was allowed to keep the file.

If the Browser Cache TTL is too short, the browser still has to “ask” Cloudflare if the file has changed every single time the page loads. That “ask” takes time (RTT).

The Fix:

I went into the Cloudflare Caching -> Configuration settings and adjusted the Browser Cache TTL to 7 day.

By doing this, I’m telling the visitor’s browser: “Hey, this video isn’t going to change for at least a week. Don’t even bother asking me for it again; just load it from your local disk.”Screenshot 2026-03-10 at 6.44.35 PM


After:

After-cdn


The Results

Moving my data to Switzerland felt like a performance trade-off at first. With these two changes, the blog loads faster than it ever did when everything was on a US VPS:

  • Media pop-in: gone
  • Origin bandwidth usage: down ~90%
  • Cost: Cache Reserve is $0.015/GB/month — for a personal blog, effectively free

The edge hit ratio staying above 90% also means my MinIO instance in Switzerland is mostly idle, which is fine — it’s there for storage and privacy, not serving traffic (Although it does offer 10Gbps bandwidth).

If you’re running a similar setup (static site generator + self-hosted S3-compatible storage), these two Cloudflare settings are the highest-leverage changes you can make. No code changes, no infrastructure changes — just two toggles in the Cloudflare dashboard.