Skip to content
Viewing: all (31)
  1. Michaela Brown Ten Years in Tech, Seven BTFs In, and Staying Curious Digital strategyTechnical validation
  2. Barry Cumberlidge The question is the new keyword SEOContent strategyDigital strategyMarketing
  3. Barry Cumberlidge A contradiction costs more than a gap SEOContent strategyDigital strategyMarketing
  4. David Lowbridge The case for connected knowledge Brand automationContent strategyDigital strategy
  5. Barry Cumberlidge Nobody owns the topic yet SEOContent strategyDigital strategyMarketing
  6. Roger Whittlesea What does collaboration look like at the proposal stage? Digital strategyTechnical validationBrand automation
  7. Matthew Froggatt Internal work has no client Digital strategyMarketingContent strategy
  8. Barry Cumberlidge The gift of time Digital strategyBrand automationMarketing
  9. David Lowbridge From fixed values to behaviours Brand automationUX & UIDigital strategy
  10. Mike Leonard The web is fun Motion designUX & UITechnical validation
  11. Jara Santamaria Martinez Every year is a new brief PlatformsContent strategyTechnical validation
  12. Kristina Radonjic The work between the work Digital strategyMarketing
  13. Guanglun Wu Choosing the right tech stack Technical validationPlatformsDigital strategy
  14. Barry Cumberlidge Security deep dive Technical validationContent strategyDigital strategy
  15. David Lowbridge Startups are prototypes Digital strategyBrand automation
  16. Tara Heal Shapeshifting the Future UX & UIMarketing
  17. Tom Small The theme is the guardrail Brand automationPlatforms
  18. Barry Cumberlidge Your biggest asset in an RFP, your website SEOContent strategyDigital strategyMarketing
  19. Michael Gunner Cache Components: the right content at the right time PlatformsTechnical validationContent strategy
  20. David Lowbridge From static frames to a creative operating system Brand automationUX & UI
  21. Tom Small We build by leaving things out PlatformsDigital strategyUX & UI
  22. Michael Gunner Standardise the foundations, not the brand experience PlatformsBrand automation
  23. Charlie Clarke Letting type move Motion designUX & UI
  24. Andy Purbrick Putting video back where it belongs PlatformsTechnical validation
  25. Mike Leonard The cache that doubled as a coordinator PlatformsTechnical validation
  26. Andy Purbrick We test the revenue path Technical validationDigital strategy
  27. Mike Leonard Two months in Three.js, we started over Motion designTechnical validation
  28. Rhona Mackay The form we actually trust PlatformsTechnical validation
  29. Andy Purbrick The testbed nobody will see PlatformsTechnical validation
  30. Andy Purbrick Twenty-four modules, one wrapper PlatformsContent strategy
  31. Andy Purbrick We haven’t missed a Thursday in 33 weeks Content strategyMarketing

The cache that doubled as a coordinator

Mike Leonard 2 min read Platforms Technical validation

The rendering engine is what visitors see. The data layer feeds it, and keeping it stable under load was the less glamorous half of the build.

The cache that doubled as a coordinator

This is the second post in the ON Labs series. The first covered the WebGL engine: shaders, draw calls, the GPU-level stuff. This one is about what happens before a single pixel renders: fetching project data from an external API, caching it and making sure concurrent requests don’t trip over each other.

The original problem

Labs pulls project boards and media assets from Air.inc. Early on, every page request made a fresh API call. It worked fine in development and immediately hit rate limits in production. Multiple serverless instances spinning up at once meant dozens of identical requests hitting the same endpoints within seconds.

You can’t just “add a cache” when you don’t control how many instances are running or when they start.

One request rebuilds, the rest wait

The core idea is coordination: when the cache expires, only one instance rebuilds while the others wait. If the rebuild takes too long or fails entirely, stale data gets served instead of an error. A crashed process can’t hold the lock forever; it expires on its own.

One request rebuilds. The rest wait or serve stale. No stampede

It’s stale-while-revalidate implemented in application code, because the hosting layer doesn’t offer it natively for API-driven data. The storage layer doubles as both cache and coordination mechanism between instances that have no other way to communicate.

Cache versioning and the video pipeline

The cached payload carries a version number. When the data shape changes (new fields, restructured assets) the version bumps and every instance treats the old cache as expired. No manual purging, no deploy-time clears.

A separate store handles optimised video URLs. Each asset’s source maps to transcoded variants at different quality levels, cached per-asset with their own expiry. A concurrency limit keeps the transcoding lookups from overwhelming the provider.

Labs loads quickly. Transitions run smoothly. Filters respond without delay. Nobody sees lock negotiation or stale fallbacks or version checks. They see a portfolio that works.

What the data layer protects: a fast, reliable first impression

Why build this yourself

Most caching is straightforward: set a TTL, serve from cache, refresh when it expires. The complication is concurrency across serverless instances with no shared memory. Off-the-shelf HTTP caching doesn’t solve that. Coordination in a stateless environment means leaning on a shared store and building the locking yourself.

Not glamorous work. But without it, two people visiting at the same time could bring the whole thing down. That’s not hypothetical.