R2 costing


Here’s my business use case -

I update about 200000 files on a daily basis the total size of which is 100GB as on today. This is expected to grow in the coming monthly at the rate of say 5 GB per month.

On a daily basis I update these files 3/4 times a day & will need to re-upload them every time after automation. I’ll connect my domain to this to serve a static website.

I am looking to understand the ball park monthly costing for this scenario. I’ve read the documentation around R2 and the 3 different classes you group data into. However, I’m not able to work out the costing. I’d truly appreciate any help here.

You can use the R2 Pricing Calculator by Ceru for simple cases, but your case may be slightly more complicated.

From the docs:

Storage is billed using gigabyte-month (GB-month) as the billing metric. A GB-month is calculated by recording the total bytes stored for the month.

Pricing is $0.015 / GB-month, with the first 10 GB-months free per month.

Class A Operations are any operation that involves making a change to the bucket(or a list operation, as they are comparatively expensive). In your case, a Class A operation would be used every time you uploaded a file, whether it is for the first time or you are updating a file already in your bucket.

Pricing for Class A operations is $4.50 / million requests, with 1 million requests/month free.

Class B operations read values from your bucket, like a user requesting an image. In your case, I do not believe you provided any data for this.

Pricing for Class B operations is $0.36 / million requests, with 10 million requests/month free.

Given the data you gave, your pricing for the first month would be as follows:
Storage Costs: (100 GB-m - 10 GB-m(free)) * 0.015 = $1.35
Class A Operations: 200,000 * 30(days) * 3.5(times a day updated) = 21,000,000
Class A Cost: (21,000,000 - 1,000,000(free)) * $0.0000045 = $90
Total Cost, first month: $91.35

Hope this helps you!


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.