Open rarkins opened 1 year ago
related:
So our goal here is:
If we can achieve this with reasonable cost efficiency, we could then default Containerbase to only use this host instead of the variety we have today.
Cloudflare's cache reserve is one approach to reducing requests to the origin server(s) and providing more resiliency for those which might have availability problems: https://developers.cloudflare.com/cache/advanced-configuration/cache-reserve/
I've registered containerbase.dev just now and propose we aim to use cdn.containerbase.dev
Originally posted by @rarkins in https://github.com/containerbase/base/issues/1507#issuecomment-1733586167
Update: cdn.containerbase.dev is now ready
I would like to make this opt-in via CONTAINERBASE_CDN=https://cdn.containerbase.dev
Setting this would result in all known hosts to be redirected without the need for the http from/to being all set individually
Just to clarify: setting CONTAINERBASE_CDN=https://cdn.containerbase.dev/
should transform requests like https://example.com/foo/bar
to the form like https://cdn.containerbase.dev/example.com/foo/bar
I was thinking that it would need to have an explicit list but I suppose you could add a general http rewrite rule? Might break if there's 30x responses though
Today's approach has some downsides:
Example of flakiness:
We should aim to have centralization and control of such dependencies where possible or necessary. I can think of two main possibilities:
Obviously either way we still can have flakiness if our host (GitHub or CDN) has flakiness, but at least it's centralized flakiness and likely less than we get today