!CcTBuBritXGywOEGWJ:matrix.org

NixOS Binary Cache Self-Hosting

170 Members
About how to host a very large-scale binary cache and more58 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
5 Mar 2024
@nh2:matrix.orgnh2
In reply to @edef1c:matrix.org
so you should be viewing the backend requests as (key, start offset, end offset) triples moreso than full fetches
Will Fastly always chunk up the requests into small range requests, even if the user's Nix requests the whole NAR, or only if the end user requests a range?
04:41:58
@edef1c:matrix.orgedefeg it is a humongous pain in the rear to collect the narinfos, we basically have custom tools to rapid-fire pipelined S3 fetches04:42:04
@edef1c:matrix.orgedef
In reply to @nh2:matrix.org
Will Fastly always chunk up the requests into small range requests, even if the user's Nix requests the whole NAR, or only if the end user requests a range?
i don't recall right now, sorry
04:42:13
@nh2:matrix.orgnh2
In reply to @edef1c:matrix.org
i don't recall right now, sorry
Because that could indeed inflate the IOPS, though Ceph has readaheads of configurable size, so it could be worked around that way
04:43:07
@edef1c:matrix.orgedef

Fastly segmented caching docs (https://docs.fastly.com/en/guides/segmented-caching#how-segmented-caching-works)

When an end user makes a Range: request for a resource with Segmented Caching enabled and a cache miss occurs (that is, at least part of the range is not cached), Fastly will make the appropriate Range: requests back to origin. Segmented Caching will then ensure only the specific portions of the resource that have been requested by the end user (along with rounding based on object size) will be cached rather than the entire resource. Partial cache hits will result in having the cached portion served from cache and the missing pieces fetched from origin. (Requests for an entire resource would be treated as a byte Range: request from 0 to end of resource.)

04:43:09
@edef1c:matrix.orgedefcritical part being the final sentence04:43:23
@nh2:matrix.orgnh2
In reply to @edef1c:matrix.org
critical part being the final sentence

And the beginning of the paragraph:

When an end user makes a Range: request for a resource ...

This suggests "no range request by nix" => "no range request by Fastly to upstream"

04:45:12
@nh2:matrix.orgnh2So it should be a quite rare case04:45:32
@edef1c:matrix.orgedefout of ~1B 2xx responses, ~25% are 206 Partial Content responses, ~75% are 200 OKs04:46:45
@edef1c:matrix.orgedefso not that rare04:47:06
@nh2:matrix.orgnh2
In reply to @nh2:matrix.org
That is nice and large, should make it easy.
Sorry, I had misread that sentence: I thought you wrote "mean 16MiB, median 14MiB" for file size. But it was throughput.
04:47:48
@nh2:matrix.orgnh2
In reply to @edef1c:matrix.org
out of ~1B 2xx responses, ~25% are 206 Partial Content responses, ~75% are 200 OKs
Interesting, I wonder why it's that many, at least in my nix use it is very rare to interrupt downloads
04:48:21
@edef1c:matrix.orgedefwe have users like. everywhere04:48:35
@nh2:matrix.orgnh2 edef: Do you know total number of files? 04:48:39
@edef1c:matrix.orgedefi've seen countries i'd never even heard of in the fastly logs04:48:48

Show newer messages


Back to Room ListRoom Version: 10