You doubt about simultaneous connections in firebase

1

I have a question about the simultaneous connections in the free firebase plan.

I understand by simultaneous connection to a request that is made when there is another running.

In the firebase document, they say the following:

What is a "simultaneous connection to the database"?

A simultaneous connection refers to a mobile device, a browser tab or a server app that connects to the database. Firebase imposes strict limits on the number of simultaneous connections that your app's database can receive. These limits exist to protect both Firebase and our users from abuse.

The Spark plan limit is 100 and can not be increased. The Flame and Blaze plans have a limit of 100,000 simultaneous connections per database.

This limit is not the same as the total number of users of your app, since not all users connect at the same time. If you need more than 100,000 simultaneous connections, read the article How to scale with several databases

My specific question is : is it the same as having the app open ?, or just at the moment of launching it ?, that is, can the app have more than 100?

and if there are more than 100 users in the app and at the same time more than 100 make a query to the database, they are queued when it ends with the first 100 or the app shreds?

Thanks

    
asked by JhonArias 25.09.2018 в 18:58
source

2 answers

0

Simultaneous connections refers specifically to connections that are made at the same time.

You can have a number of users using the application but not all making the connection to the database, this is precisely what the documentation indicates:

  

A simultaneous connection refers to a mobile device, a   browser tab or a server app that connects to the base of   data. This is not the same as the total number of users of your   app, since not all users connect at the same time. For example,   apps with 10,000,000 active users per month have less than   100,000 simultaneous connections. The maximum number of connections   simulations depends on the total count of users and time   average that users spend in your app.

  

My specific question is: to connect at the same time is the same as having the app   open ?, or just at the moment of launching it ?, that is, they can have the   Open app more than 100?

Depends on what your application does , assuming two examples:

1) Your application only makes the connection to the database when accessing a certain Activity, but not when you start your application.

2) Your application is a chat that initiates a connection to the database when it starts.

In the first case we can not consider that the user will always find himself making a connection to the database, since it can not be guaranteed that he is always accessing the Activity that makes the connection to the database, while in the second case it will definitely be connected since the changes made by the other users connected to the chat must be synchronized in milliseconds.

  

if there are more than 100 users in the app and at the same time more than 100 perform   a query to the database, these are queued when finished   with the first 100 or the app chrasea?

First of all the "Spark Plan" would not allow you to make more than 100 simultaneous connections and no, they are not queued.

    
answered by 25.09.2018 / 23:46
source
0

Simultaneous connections are counted by user / app connected to firebase and in use at that precise moment, there could be 100 people using the app at that moment. When you exceed 100 simultaneous connections the first 100 to connect will remain working but from 101 onwards firebase simply will not respond to the requested data to the database and will return an error code, that does not mean that the user sees a crash, but if that will not be able to interact with the database. The error you can manage to show the user what you think is convenient. Either a connection error message, an empty screen, etc.

The most punctual response would be that 100 people can have the app open at the same time. The others will only receive error messages when they can not connect.

    
answered by 26.09.2018 в 01:16