Nix's Substituter List Is Not a Routing Table

30 points by abhin4v


0x2ba22e11

Two ideas pop into my head about how it might be possible for clients to reduce the load placed on the caching servers:

  1. if every cache server published a periodically-updating bloom filter of all the derivation hashes it contains, you could query that locally to avoid sending any traffic to all but one of the cache servers. You'd still have to query all of them in the event that none of your local bloom filters says the server has the file you need. You could just update the bloom filter for each server in the background occasionally and implement etags for it so you'll get 304 responses for most requests.

  2. silly option: take all the inputs to each derivation and train a very small neural network to guess which server is most likely to have each derivation.

stapelberg

https://github.com/notashelf/ncro is a 404? No longer online / not yet?

ariaaaa

there should exist MassQuery / want-mass-query, which i think is meant to collapse this into one request per substituter so long as you aren't using IFD, but I can't find where it's actually implemented, so don't know the details

might run this in my homelab, thanks