Using a CDN with R2+S3 api

For Workers & Pages, what is the name of the domain?

no domain

What is the error number?

no errors

What is the issue or error you’re encountering

Suggestions needed

What steps have you taken to resolve the issue?

Hi all!
I am using R2 with its S3-compatibile API and so far it is working nicely - data is protected and everyone is happy.
The R2 bucket is in Europe, and I have noticed latencies for US and ASIA clients. Is there any way to use the Cloudflare CDN for this? I would to still keep the S3-compatibile interface but use the geo-proximity a CDN offers…
Thanks!!!
Luigi

If you use a custom domain with your R2 bucket, you can use the Cloudflare cache as normal…

Hi @sjr
thanks for the hint - will it work with S3 api from the client side? I can’t find this mentioned anywhere in the docs

thanks!

Do you mean, are responses cached if using the S3 api? If so, I’m not sure on that as it’s not something I do, but I would guess not as the caching is likely just built on the usual Cloudflare caching mechanism for HTTP requests.

1 Like