Hacker News new | ask | show | jobs
by zebracanevra 1508 days ago
I wonder how feasible it would be to keep cold assets on Backblaze B2 and automatically move them to R2 if they get hot enough.

Better yet, seeing as how you get free transfers between Backblaze and Cloudflare, I wonder if the 10ms cpu limit on free workers (or 50ms paid) would be enough to do the entire process on CF's servers.

2 comments

The blog post seems to indicate that there will be an automatic way to move assets to R2 from a S3 compatible service. I haven't gotten access to R2 yet so no idea what settings they have.

"To make this easy for you, without requiring you to change any of your tooling, Cloudflare R2 will include automatic migration from other S3-compatible cloud storage services. Migrations are designed to be dead simple. After specifying an existing storage bucket, R2 will serve requests for objects from the existing bucket, egressing the object only once before copying and serving from R2."

I believe this was called "slurp mode" when they first announced the product
> or 50ms paid

It's actually 30 seconds these days (for Workers Unbound pricing model).

> do the entire process on CF's servers.

Entire process of what, exactly? If you are just streaming the bytes through, that takes negligible CPU time, so yes, you could do it on the free plan.

Yes, very true. I think sometimes you may have to do extra work like calculating hashes, but that can likely be taken from the B2 response if it's compatible with R2 or calculated beforehand.

Couple that with the low latency KV and it all shouldn't be too hard to get going! On that note, I hope the overall latency of R2 isn't too bad. I assume it'll all work with CF caching though. B2 was never too good in regard to latency.

I wonder... would the TOS allow storing a huge video on B2, proxying it on the fly to R2, redirecting the user to that, then deleting it afterwards? It does say you'd be charged by gb-month stored...