I’m running an experiment that potentially can store up to 4TB of data in KV. I’d like to be able to reason on the usage in realtime and have a good estimate of the pricing that will affect the bill at the end of the month. What’s the best way to do it? I’m aware of the /namespaces
page but this is update infrequently, especially in regards to the storage
taken. Any ideas on making the bill predictable on daily (or even hourly basis)?
You can query an estimate of the current storage usage with the Workers KV Stored Data Analytics API endpoint. This is the same API used by the dashboard, but you may be able to query more accurate information by hand.
Not counting reads and writes, storing 4,000 GB in Workers KV for a month would incur a charge of $2,000. Another example, assuming 1 month = 30 days = 720 hours
, storing 4,000 GB for eight hours would be 4000 GB * 8 hours = 32000 GB-hours = 44.44 GB-months
. This would incur a charge of 44.44 GB-months * $0.50/GB-month = $22.22
. See Pricing · Cloudflare Workers docs for pricing information.
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.