2

Firebase CRUD action limits for production app

I was just reading the Firebase Pricing page and couldn't find information about what the physical limits for interacting with firebase is.

For example...

How many simultaneous "GET (or SET...etc) Request" can I make to my database before I need to change plan or get an error?

// Code example: 
// What happens if 1 million user call this at the same time
this.af.database.object('/items')

How many request per second (or minute or hour) can I make before something unexpected happens or I need to upgrade my plan?

// Code example: 
// What happens in the following bad code
for (var i = 0; i < 10000000; i++) {
    firebase.database().ref().update(updates)...
}

The question came up to me because I was implementing some search method. I could do it two ways

  1. Download the required branch and filter it at client side
  2. Query a firebase path at each key stroke (more request which leads to more cost???)
user172902
  • 3,541
  • 9
  • 32
  • 75
  • possible filtering in Firebase http://stackoverflow.com/questions/42249524/sorting-items-position-using-firebaserecycleradapter/42319463#42319463 – Khaledonia Mar 09 '17 at 08:34

2 Answers2

2

As mentioned before, according to the FAQ you can have 100,000 simultaneous connections per database. If you need more you can use their contact feature and you'll be helped on an individual basis (they might have to shard your db over multiple servers).

As for your loop. Also according to the Firebase FAQ, there is an approximate limit of around 1000 small writes per second. There is no mention of any limit on reads.

As far as the whole searching use case goes. Searching for certain substrings (comparable to an SQL LIKE query, assuming that's what you want) is impossible in a Firebase query unless you're looking for values that start with a certain substring. If you want better search functionality I would recommend looking into search APIs for Firebase. I've seen ElasticSearch mentioned a couple of times in relation to this, but I've never used it so you'll have to do a bit of research.

Hope this helps.

Here are the appropriate links:

Firebase Database limits

Firebase Simultaneous connections

Firebase LIKE query

Community
  • 1
  • 1
0

As far as I know that firebase-client opens a socket connection to firebase database. Google says that the limit of such connections are 10K simultaneous connection so if your projects exceeds that then open a support ticket to firebase and they will take care of the limit. hope that answers your question.