| 1 Jun 2025 |
edef | as long as narinfo 404 is fast | 13:52:16 |
| BMG joined the room. | 15:29:29 |
Arian | In reply to @flokli:matrix.org We can also do the push through thing. So instead of hydra uploading to fastly or s3 directly, it'd send to a http daemon that uploads to both places I'm suggesting something way simpler.
We just have nix-serve running on hydra and serve its nix store.
We configure fastly to first fetch Hydra and on 404 fetch s3 | 17:41:24 |
Arian | Requires no big changes on hydra side | 17:41:36 |
edef | the narinfo 404 path is sacred, we cause a lot of user suffering if it isn't fast | 17:42:18 |
Arian | But it might be too simplistic. | 17:42:18 |
edef | whether this was a good design choice in the substitution mechanism is another matter | 17:42:40 |
edef | but this is the army we fight with, for now | 17:42:55 |
Arian | But it will just be slow for a single person. Afterwards it's cached | 17:43:02 |
edef | no | 17:43:08 |
Arian | :D | 17:43:09 |
edef | 404s aren't cacheable, since presence isn't immutable | 17:43:23 |
Arian | Aaaaaah | 17:43:33 |
edef | and 404s tend to be unique requests | 17:43:35 |
Arian | Yes. I see what you're getting at now | 17:43:45 |
edef | every nix build is bottlenecked on cno 404s | 17:43:48 |
edef | * every nix build is bottlenecked on c.n.o 404s | 17:43:52 |
Arian | We don't cache them at all? Because we DO cache 404s locally | 17:44:52 |
Arian | (found that out the hard way) | 17:44:57 |
edef | we cache them at most briefly, but this isn't the point | 17:45:30 |
edef | every derivation you build that isn't cached doesn't start building until it has been confirmed it 404s | 17:45:47 |
edef | approximately 100% of all nix derivations aren't in the cache | 17:46:02 |
edef | the caching is in the wrong direction | 17:46:29 |
edef | caching absences buys you essentially nothing | 17:46:42 |
edef | there are 1461501637330902918203684832716283019655932542976 (2^160) store paths, most of which are absent from the cache | 17:47:04 |
edef | we only have 2^28 or so present store paths | 17:47:31 |
edef | your 404 cache cannot fit 2^160 items | 17:47:41 |
Arian | Bloom Filter? | 17:48:01 |
Arian | Anyhow I digress. My idea definitely seems too simplistic | 17:48:12 |
edef | yes, a bloom filter works | 17:48:18 |