I'm building a storage like service with pretty low write volume, for reads I want it to be extremely fast and it's acceptable to show stale state for some seconds, while for writes as long as it shows up instantly on the colo it writes from (so that writer won't assume their write failed) then it can take time propagate to other colos.
Currently I'm thinking:
- R2 to store the data.
- Worker checks cache API for a match and return instantly; if there isn't a match, pull from R2 and store it with cache API as immutable cache that lasts forever.
- When a write happens, uses CF API to purge that cache for all colo.
Problem is that CF API has a rate limit of 1k per minute (or lower?), so I'm thinking batching them with queues. 100 per batch is probably enough for the write volume I need to handle, but just want to see if it would become a problem later down the line.