← All projects
Project record3 mentions
Originally shared on Hacker News

apt-cacher-ultra

This tool is a resilient apt repository caching proxy that snapshots repository metadata after verifying it and only promotes the snapshot if all checks pass. It can optionally track a list of 'hot' packages and include them in the snapshot calculation. It was built to reduce the impact of future Ubuntu archive DDoSes on development and staging processes and to be more reliable than apt-cacher-ng, which would regularly choke and require handholding.

Last shared For DevOps and sysadmins running apt caching for development and staging environments
01 / The problem

What it addresses

Ubuntu archive DDoSes disrupted dev and staging processes, and apt-cacher-ng provided no help and regularly choked.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. apt-cacher-ultra

    This tool is a resilient apt repository caching proxy that snapshots repository metadata after verifying it and only promotes the snapshot if all checks pass. It can optionally track a list of 'hot' packages and include them in the snapshot calculation. It was built to reduce the impact of future Ubuntu archive DDoSes on development and staging processes and to be more reliable than apt-cacher-ng, which would regularly choke and require handholding.

    Problem: Ubuntu archive DDoSes disrupted dev and staging processes, and apt-cacher-ng provided no help and regularly choked.

    Audience: DevOps and sysadmins running apt caching for development and staging environments

    Posted by @linsomniac · Original source ↗

    Source text · @linsomniac · · Source ↗

    apt-cacher-ultra: To help reduce the impact of future DDoSes of Ubuntu. Just released 1.0 yesterday after working on it a couple months.
  2. apt-cacher-ultra

    An apt cache service that snapshots and verifies the cache and only updates the snapshot when new metadata is available, updated commonly requested packages have been downloaded, and all metadata checks out. It can keep serving packages even when the upstream is unavailable or corrupt, and it is reliable enough to work with Internet access shut off; it has been running with ~200 clients, ~50 of which are reinstalled daily with full package updates and installs.

    Problem: Upstream package repositories can become unavailable or corrupt (as in last month's Ubuntu DDoS), so the cache must remain reliable and keep serving packages on its own.

    Audience: System administrators operating apt package caches for fleets of clients; tested with ~200 clients, ~50 of which are reinstalled daily

    Posted by @linsomniac · Original source ↗

    Source text · @linsomniac · · Source ↗

    https://github.com/linsomniac/apt-cacher-ultra The primary features I'm focusing on are: It can serve packages if the upstream is unavailable or corrupt, it is reliable. It snapshots and verifies the cache, and then only updates the snapshot when: a new metadata is available, it has downloaded updated packages that you commonly request, all the metadata checks out.
  3. apt-cacher-ultra

    An apt package cache designed to keep working as much as possible when upstream repositories are down. It checks repo metadata and maintains a list of "hot packages", pre-downloading them before switching the new metadata live to act as an effective snapshot. Packages that machines download regularly (re-installs, apt updates) remain available even during upstream outages like a DDoS, though never-before-downloaded packages cannot be fetched while upstream is down. It is in early development with a beta expected in about a week and is currently running in the author's dev cluster.

    Problem: Existing apt-cacher-ng failed to reduce the impact of the Ubuntu DDoS while also going out to lunch every few weeks or a month, leaving no reliable way to respin machines (e.g. if the data center caught fire) during an upstream outage.

    Posted by @linsomniac · Original source ↗

    Source text · @linsomniac · · Source ↗

    So I'm working on an apt-cacher that goes to lengths to keep working as much as possible when the upstream is down. It will check the repo metadata and keeps a list of your "hot packages", and will download those before flipping the new metadata to be live, effectively a snapshot. It won't allow you to download a package you've never downloaded before in the case of a DDoS, but packages that you do download regularly (machine re-installs, apt updates), it will ensure are available in the repo. I'm calling it apt-cacher-ultra.