4
votes

I just can not figure out where the megabytes of downloaded data from FireBase RealTime DataBase come from, whereas I'm requesting a specific value in a particular line with a size of 10-20 characters. Values come. Requests for such values were not more than one hundred.

Value Request string

Firebase ref = new Firebase("https://XXXXXXXX.firebaseio.com/");
ref.child("city").child("street").addValueEventListener(new ValueEventListener() {  

...

String street = snapshot.getValue().toString();

Perhaps FireBase RealTime DataBase takes into account for downloading data viewing this data in the Developer Console?

1
Any clues on this topic would be much appreciated, I have no idea how to manage properly IO with Firebase... - Julien Leray
I am interested in this as well. My app doesn't download data at all, and I still have ~60 MB per day downloads. But even it it were the console, there's only a total of 400 KB stored in the database. Any hints? - Nicolas

1 Answers

4
votes

From: https://firebase.google.com/docs/database/usage/billing

Outbound traffic includes connection and encryption overhead from all database operations and data downloaded through database reads. Both database reads and writes can lead to connection costs on your bill. All traffic to and from your database, including operations denied by security rules, leads to billable costs.

And:

Firebase console data: Although this isn't usually a significant portion of Realtime Database costs, Firebase charges for data that you read and write from the Firebase console

And:

Protocol overhead: Some additional traffic between the server and clients is necessary to establish and maintain a session. Depending on the underlying protocol, this traffic might include: Firebase Realtime Database's realtime protocol overhead, WebSocket overhead, and HTTP header overhead. Each time a connection is established, this overhead, combined with any SSL encryption overhead, contributes to the connection costs. Although this isn't a lot of bandwidth for a single request, it can be a substantial part of your bill if your payloads are tiny or you make frequent, short connections.

I think my downloaded data comes frome many small writes to the database and the overhead associated with it. I have an IoT application - now I am not sure if Firebase is the right choice for this.