Hilton Chain <hako@ultrarare.space> writes: > Hilton Chain <hako@ultrarare.space> writes: > >> Hilton Chain <hako@ultrarare.space> writes: >> [...] >>> So for best querying performance: >>> >>> a suitable mirror > Cloudflare (cached) > Cloudflare (uncached) >>> >>> Although Cloudflare might be better for downloading speed. >>> >>> Then the goal will be: deploy more mirrors for better coverage and use >>> Cloudflare as the default mirror for stable experience. >>> >>> To achieve the latter, performance of uncached requests should be improved, >>> then >>> there're two approaches: >>> >>> 1. Sync narinfo files to Cloudflare as well, making it similiar to a >>> full >>> mirror. There're low-latency storage choices but adding more expenses. >> >> Since it's included in the plan, I tried to move narinfo files into >> Cloudflare's >> key-value storage, making cache-cdn a full mirror. >> >> Performance on uncached lookups should be improved for all regions now, >> though >> at best a cached lookup takes 0.02s per request, while a suitable mirrors may >> take only 0.005s. > > > Found the issue, thanks to iyzsong! The reason of the low performance is that > Cloudflare Workers doesn't support the Keep-Alive header. So to improve the > performance, there're two approaches: > > 1. Support HTTP/2 in Guix side. > 2. Stop using Cloudflare Workers + KV, and use Cloudflare as a cache for the > head node. > > The fastest approach we can have is (2.). Since I have already set up a full > mirror on Cloudflare, it can be replicated again in the future when we have > HTTP/2 support.
I wonder how Nix performs if they are using CDN + object storage, as a result a search of "Nix + HTTP/2" leads me to the following commit: Enable HTTP/2 support https://github.com/NixOS/nix/commit/90ad02bf626b885a5dd8967894e2eafc953bdf92 --8<---------------cut here---------------start------------->8--- For example, downloading 802 .narinfo files from https://cache.nixos.org/, using a single TCP connection, takes 11.8s with HTTP/1.1, but only 0.61s with HTTP/2. --8<---------------cut here---------------end--------------->8--- They have a similiar performance before, this is definitely a direction of improvement.