Reputation: 4026
I noticed when looking at my usage and billing today in Firebase Firestore that I have incurred some fees. I am a bit confused as to where this is coming from. I've only once exceeded the daily free limits of Reads/Writes and it was by only a few hundred operations. It appears all the cost is from "Bandwidth". Is anyone able to explain to me where this "Bandwidth" is from, and why, when my reads/writes are very low, less than 1k daily, that the bandwidth charge seems to remain. I've attached a screenshot for reference as to what I am seeing. Any insight on this matter would be greatly appreciated. Thanks in advance.
See below a sample JSON of the session-details object.
Note: Every time a user swipes on an item, it is added to the swiped_titles
array, so you can imagine this becoming quite a large array:
{
"id" : 1202193,
"hostUid" : "kasdnjadkjlnaASD",
"uids": [
"kasdnjadkjlnaASD",
"nasduhASafafafdf"
],
"created": "{TIMESTAMP HERE}",
"last_updated": "{TIMESTAMP HERE}",
"swiped_titles": [
{
"id": 09234,
"backdropPath": "URL_HERE",
"posterPath": "URL_HERE",
"tilte": "Dim Sum Koi",
"overview": "The best dim sum in the city. Authentic, delicious. made to order.",
"category": "dine-in",
"voteAverage": 7.3,
"voteCount": 219,
"uids-that-liked": [
"kasdnjadkjlnaASD",
"nasduhASafafafdf"
],
"uids-that-swiped": [
"kasdnjadkjlnaASD",
"nasduhASafafafdf"
]
},
{
"id": 08123,
"backdropPath": "URL_HERE",
"posterPath": "URL_HERE",
"tilte": "That's Italian Ristorante",
"overview": "The best fine dining italian experience in town. Delicious, family-style.",
"category": "dine-in",
"voteAverage": 8.3,
"voteCount": 180,
"uids-that-liked": [
"nasduhASafafafdf"
],
"uids-that-swiped": [
"kasdnjadkjlnaASD",
"nasduhASafafafdf"
]
}
]
}
Upvotes: 2
Views: 1843
Reputation: 50840
As mentioned by @Frank, Firestore also charges for bandwidth along with reads. The pricing is described in detailed here.
When you use Firestore, you are charged for the following:
The number of documents you read, write, and delete. The amount of storage that your database uses, including overhead for metadata and indexes. The amount of network bandwidth that you use. Storage and bandwidth usage are calculated in gigabytes (GiB), where 1 GiB = 230 bytes. All charges accrue daily.
Internet Egress pricing can be found in detail here.
The $0.04
charge on reads suggests you have around 60K reads over the free quota so if your documents are fairly large, let's say 650 KB then that roughly estimates around 39 GB of bandwidth (out of which 10 GB is free). That still totals around not more than 4 USD. If your docs are even large then that may be possible. If not, you should head for Firebase support.
Upvotes: 3
Reputation: 598827
Firestore charges both for read operations, as well as for the bandwidth consumed by those operations. So any time an SDK (or the console) reads a document from the server, you're charged for the read operation and the bytes sent over the wire.
Apparently in your case the bandwidth consumed was the majority of the cost. That is not the usual case with Firestore, but it's definitely possible, for example: if your documents are all quite large.
If you think this is not the case, reach out to Firebase support for personalized help in troubleshooting. They can check your project for more information, something nobody else here can do.
Upvotes: 0