Original thread I posted on Discourse:

Improvements to cache.nixos.org (help test the new config!)

The NixOS binary cache (https://cache.nixos.org) is hosted by Fastly, and is currently used in production by thousands of users. Fastly fronts an Amazon S3 bucket containing ~150TB of binary objects, produced by Hydra. The current cache has been running for nearly a year (with some hiccups) and this project is mainly concerned with overhauling it, and performing deeper integration at the caching layer to boost performance, lower cost, and reduce latency.

<aside> 💡 Insight: The binary cache is almost an ideal case for doing this work: effectively 100% static content which can all be cached, highly performance/TTFB sensitive, in very high demand, and as an HTTP service is very simple. It should serve as an instructive case for integrating caching into https://nixos.org services in the future.

</aside>

The basic idea of the "v2" configuration I am working on is to rewrite almost everything in VCL, the configuration language for Varnish (which Fastly caching is based on). Writing everything in VCL isn't a traditional route for most users, but doing so gives an extremely high level of flexibility for us.


See also: the wiki page with technical details, and some other notes:

Maintainers: Fastly