Learn about the problems we have, and learn about the problems we made up to solve them


The NixOS binary cache — located at https://cache.nixos.org and colloquially known as "the binary cache", or "The Cache" — is a web service used to assist the lovely users of the Nix package manager.

Nix is a very special package manager for a number of reasons. But it is very unique in one regard that matters here: conceptually, all Nix packages are built from source code, **like Gentoo Linux. But binary packages — like in Arch Linux — are used as a transparent optimization when they are available. The binary cache is a service that provides exactly this optimization — it just serves big binary packages to users over HTTP! Real easy.

The binary cache is service which pushes heavy amounts of data (TBs/month), receives millions of requests a month, and ultimately is a crucial cornerstone of the Nix ecosystem. Its smooth operation is pretty important! Again, "really easy".

<aside> 💡 Insight: a Nix binary cache — at a high level — is nothing more than a dumb HTTP server that serves static files out of a directory. However, in practice, running any high volume service isn't easy, and has a number of moving parts.

</aside>

<aside> 🔑 Pro-tip: Even if the binary cache is down — a severe problem — users can still build and deploy packages by compiling themselves, unlike most other distributions. Very cool! So, try to imagine Amazon going down, and maybe make a cool explosion sound in your head at the same time. Then try imagining your CPU and CI systems catching on fire soon after.

</aside>


How does it work?


Who runs it?

https://cache.nixos.org is a free service run by and for the Nix/NixOS community, under the Stichting NixOS Foundation, who supply the underlying storage. Bandwidth and CDN logic is provided by Fastly's Open Source and Non-profit program. Machines that run builds, package the results, and upload them into the cache are donated by Packet, donated by users, and run by the NixOS Foundation as well.

Currently, the technical operators for the cache are @Graham Christensen and @Austin Seipp.


Where can I learn more?

Right here! Just go back to the main page and click around. You'll find tons of stuff and learn how everything works!

The NixOS Binary Cache