From Vercel to R2: Optimizing Video Delivery Costs

Vercel informed me that my blob data transfer has reached 7.x GB out of the 10 GB free monthly quota. This is due to the landing video I host on Vercel Blob. Streaming and downloading the video contribute to blob transfer, so with, say, 1000 views of a 3 MB video, it would use 3 GB, making it quite costly.

So I decided to switch to Cloudflare R2. Cloudflare R2 doesn't charge for video egress, meaning downloading or streaming videos is free, but it does charge for upload or download requests. This means it charges based on operations rather than the size of the data transferred. For Class B operations (get), there are 10 million free requests, which translates to about 3 million free visits if you assume 3 operations per video viewing. This is sufficient for a new startup.

Further, you can set video preload='none' and autoload='false' to prevent auto-loading until the user plays it. This is what most people do to avoid heavy loading and saving.

Note that R2 is blocked in China. If you want to make it available to Chinese, you can consider cloudinary which has more free storage and bandwidth support: 25GB compared to Vercel's 10GB.