firebase / geofire-js

GeoFire for JavaScript - Realtime location queries with Firebase
MIT License
1.44k stars 345 forks source link

What is the Pricing logic for Geo Queries? #192

Closed aytunch closed 4 years ago

aytunch commented 4 years ago

Let's say I have 100,000 locations saved in the DB. And I make a radius query which returns 5 locations. Will I be charged for 100,000 document reads or 5? In the background do we download the unused results too?

Also while listening to a query result in real time, If a location changes which is out of bounds of my query, does that still count as a read?

abbasali-io commented 4 years ago

I guess Firebase forums would be the better avenue for such questions! it is more like Firebase pricing rather than Geofire price, GeoFire does not charge for the services, its the underlying platform i.e. Firebase.

However, Firebase's Real Time Database is not charged on per reads, it is charged on the data being transmitted, so if you get 5 locations, the charges would probably be for the data that has been transmitted for 5 locations, no matter about the document reads. its Firestore that charges for document Reads!!

aytunch commented 4 years ago

@abbasali-io Thanks for your input. Some one answered my question in one of the sibling repos: https://github.com/firebase/geofire-java/issues/162