Gusts92
Gusts927mo ago

Blew over file bandwidth free limit and am confused as how to handle it

Hi, please ping me for my account email (not going to disclose it publicly, I fear spam), but I recently uploaded some 2-10mb videos to my free account for an app I'm building, and - in one day of only me and my fiancée testing it - we blew over 1gb of file bandwidth, going up to 3.6gb. This feels like an absurd thing, to be taxed by bandwidth. All of my users are supposed to have those videos, so I can see my costs skyrocketing for something silly like this, which is crazy and feels scummy on an otherwise amazing product. I'll of course remove those files and use uploadthing or some other thing that doesn't charge me per bandwidth. Please, contact me and help me understand how I could've better handled this situation. The way I see it, the only way to avoid it is to NOT use convex for file storage, which feels bad.
3 Replies
ballingt
ballingt7mo ago
Hey @Gusts92, yeah this is frustrating. How you playing these videos, in the browser? Does the bandwidth seem right, i.e. if you check your browser network requests are they requesting an amount that adds up back-of-the-envelope to 3GB? Using a different service that offers CDN-like features is a good idea. Cloudflare, AWS S3 + CloudFront, and Fastly are good options. UploadThing not charging for bandwidth sounds amazing. Re-encoding uploaded videos is a big way to save bandwidth. I've heard great things about Mux for a CDN specifically for video that handles things like re-encoding for you. If it's a just a few videos that aren't changing a ton, you can encode/compress them yourself and use a normal CDN to host. But if users are uploading video you probably want something like Mux. Convex charges (approximately, plus some margin, plus some wiggle room to make up for things we don't charge for) what the bandwidth costs us. At 20 cents / GB, especially without CDN controls, image compression, video compression etc. this can get expensive if you're pushing a lot of data. Personally when I need to push a lot of data I use S3 and Cloudfront.
Video streaming APIs, Data, and Players | Mux
The most cost-effective video infrastructure for businesses of all scale. From startups to the World Cup, modern software teams use Mux products to stream billions of minutes of video every day.
ballingt
ballingt7mo ago
For small projects AWS works well because transfer rates out are free for the first 100GB per user account. So that doesn't help when you get bigger, but at first it's real cheap. And Cloudflare is always free (!) for egress so you're just paying for the read operations. @Gusts92 would love to hear what you end up with. Re
The way I see it, the only way to avoid it is to NOT use convex for file storage, which feels bad.
I agree that if you're using a bunch of bandwidth to serve video (especially if you fit in a free tier for a big cloud provider) and you're trying to stay on a free tier plan you shouldn't use Convex to serve this video. If you were uploading user profile photos it'd be different. It doesn't feel so bad to me because serving video is hard; making a video sharing app is not a winning game, the costs are huge for e.g. YouTube. The direction Convex is going is more one where you make API requests to Mux from Convex to deal with video for you; video serving is specialized and hard and it's not something we're tackling anytime soon.
Gusts92
Gusts92OP7mo ago
wow, thank you so much for such a thorough answer! If you don't mind me DM-ing you to better explain the context I'm into, I would love to

Did you find this page helpful?