What is "prepaid" meaning for storage?
Quick question
Docs mention that storage for images is "prepaid" in $5 per 100K images stored.
Does one have to manually buy them or does it just mean it will charge in $5 intervals (for lack of a better word).
I ask because there's hard limit mentioned and if app would get popular overnight users might be denied to upload until new 100k is bought which is kind of not great.
Solution:Jump to solution
Postpaid means you pay for your usage at the end of the month. Prepaid means you pay ahead for what you want to use.
For Images, this means you pay for an amount you can use (see screenshot), and you can't go over without manually upgrading the amount.
if app would get popular overnight users might be denied to upload until new 100k is bought which is kind of not great.Could always use R2 which is postpaid for storage & cheaper if you don't need any of the other images features like variants and resizing, and even if you do, can use Image Resizing with R2 seperately...
3 Replies
Solution
Postpaid means you pay for your usage at the end of the month. Prepaid means you pay ahead for what you want to use.
For Images, this means you pay for an amount you can use (see screenshot), and you can't go over without manually upgrading the amount.
if app would get popular overnight users might be denied to upload until new 100k is bought which is kind of not great.Could always use R2 which is postpaid for storage & cheaper if you don't need any of the other images features like variants and resizing, and even if you do, can use Image Resizing with R2 seperately
Thank you @Chaika.
Idea of solution might be to have prepaid amount (say 200k prepaid images)
then have a worker that would catch "over quota" error and send excess images to R2 and Image Resizing.
(So a dual setup.)
This would serve the spike in traffic till one would upgrade Images amount.
If anyone is interested, serving 2 transformations with R2+Image Resizing, is cost comparable to Images storage and delivery.
Quick math with ratio of 1 image added per 100 views:
(2*$5/10,000+2*500KB*$0.015/(1GB)+2*$4.5/1e6+100*$0.36/1e6)/100)*1e5=1.06 US$
vs
(($5/1e5+100*$1/1e5)/100)*1e5= 1.05 US$