Eugen is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
<p>I wonder if added a small random image-loading delay for newly-posted images, if it would improve the CDN cache hit rate. As soon as an image is posted, it gets loaded immediately in everyone's browsers, and I imagine a lot of those are CDN cache misses.</p>

@walfie oo-oh, that's an interesting theory!! but someone's gotta load it from cache first...

<p><span class="h-card"><a href="https://mastodon.social/@Gargron">@<span>Gargron</span></a></span> yeah, I guess the users who get the low random delay for that image get to be the ones who prime the CDN cache, and then everyone after that will get the cached version.</p><p>I don't actually know how practical that is, but dang, S3 bandwidth is more expensive than I initially imagined. whoops</p>
Eugen @Gargron

@walfie although - shouldn't the author prime the cache, by loading the uploaded thumbnail and then also with the home feed instant-add? S3 is definitely weird. Make sure to up your cloudflare edge cache from 4h to max

<p><span class="h-card"><a href="https://mastodon.social/@Gargron">@<span>Gargron</span></a></span> <span class="h-card"><a href="https://kirakiratter.com/@walfie">@<span>walfie</span></a></span> caches are stored/fetched separately between several different regions, aren't they?</p>
<p><span class="h-card"><a href="https://kirakiratter.com/@lae">@<span>lae</span></a></span> <span class="h-card"><a href="https://mastodon.social/@Gargron">@<span>Gargron</span></a></span> yeah. maybe I need to stick something between s3 and cloudflare... caching is hard</p>
<p><span class="h-card"><a href="https://mastodon.social/@Gargron">@<span>Gargron</span></a></span> oh hmm, that is probably true. but I guess it would only prime one of the edge caches, and cloudflare has a ton of edge nodes.</p><p>yeah I upped the edge cache TTL to 1 month a few days ago and it definitely helped</p>