Reputation: 13
If I'm using a cloud database like mLab or Firebase, will my application's bandwidth double? Say a user uploads an image on the front end, that would send a post request with the image to my server, which would then send the image to the cloud based database, effectively doubling upload size. Am I understanding this correctly?
Upvotes: 0
Views: 172
Reputation: 598718
With Firebase, the idea is that your client code talks directly to the back-end services, without requiring any custom server-side code. So in your scenario of uploading an image, your client would use the Firebase SDK to write the file directly to Cloud Storage. This means that there's only one transfer being performance, the one from the client to Cloud Storage.
If you on the other hand choose to upload from the client-side code to a custom server, and from there to Cloud Storage, you'll indeed be doubling the total bandwidth that is used.
So it's not the choice of using a cloud based data storage that determines bandwidth usage, but whether you need (or choose) to use custom server-side code that sits between the client that uploads the image, and the final destination where you want to store the image.
Upvotes: 1