mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.2k stars 75 forks source link

Store disk chunks in Cloudflare R2 #288

Closed mihaip closed 9 months ago

mihaip commented 9 months ago

They're currently in Cloudflare Workers KV (because they're treated as files that wrangler deploy uploads). However, it's going to get expensive as the disk size grows (currently at ~3.3 GB, may be get significantly larger as more NeXTStep images are added for #121).

Workers KV pricing:

R2 pricing:

So I would be within the free tier for quite a while.

that-ben commented 9 months ago

Isn't 10 million reads kind of low though? I guess it depends on how quick IM popularity rises, but I feel like 10M reads per month can easily be surpassed.

mihaip commented 8 months ago

This appears to have resulted in a nice drop in CPU time (not that we were anywhere near the limits): Screenshot 2024-03-24 at 11 49 32@2x

And maybe a slight increase in wall time, but the correlation is not as clear Screenshot 2024-03-24 at 11 50 54@2x

mihaip commented 8 months ago

As far as cost, with March 3/4 done it's nowhere near the free read quota (class B operations), but it is approaching the end of the free storage tier:

Screenshot 2024-03-24 at 11 55 10@2x

that-ben commented 8 months ago

Well that's pretty good news. March is a good month of the year to check stats, since it's specifically quite a busy month of the year for retro Macintosh consumption (MARCHintosh). If your quota was not close to being exceeded this month, it's a good sign you'll do fine for the rest of the year. We usually see a ramp-up in March and April every year.

Screenshot 2024-03-24 at 3 08 06 PM