Back to the log
2026in progress

HTTP Caching Proxy

A mini CDN built in C — a caching reverse proxy I'm running on a Raspberry Pi 5 to see how much real throughput a cache actually buys you.

  • C
  • HTTP
  • Raspberry Pi
  • Sockets

I wanted to understand what actually happens between a browser and a server — the layer that CDNs and reverse proxies quietly handle — so I'm building one from scratch in C: an HTTP caching proxy that sits in front of an origin server, caches responses, and serves repeat requests itself.

The interesting question isn't just whether it works, but how much it helps. I'm running it on a Raspberry Pi 5 and measuring throughput with and without the cache, so the payoff is a real number on real hardware rather than a hand-wave about caching being 'faster.'

Working this close to the metal in C — managing sockets, parsing HTTP by hand, deciding what's safe to cache and for how long — is teaching me the things the higher-level tools usually hide.