Firebase db on web server, how many concurrent connections?

210
January 05, 2018, at 04:01 AM

Firebase has limitations of concurrent connections to database. This is what I understand if we are talking about clients.

Now imagine this: static hosting of web app (firebase hosting) + "nodejs server" (in reality firebase cloud functions). The web app (running on server) uses firebase database. It only read data from database and inject them into web page. There are no data transfer from db to client. Client only shows the web page from server.

How many connections are used in this situation? I suppose only one connection as the web app is running non-paralel, only singleton.

Is my assumption right?

Answer 1

If you're using Cloud Functions, your assumption is not correct. Cloud Functions will spin up as many server instances as needed to handle the load on the functions deployed to your project. There will be at least one connection for each instance that it spins up, for each function that you define. Since you have no control over how this happens, you should expect there could be anywhere between 0 and N connections where N is the number of server instances that Cloud Functions needs to serve your functions.

Rent Charter Buses Company
READ ALSO
Which NAN API is the “correct” one to use — namespace or macro?

Which NAN API is the “correct” one to use — namespace or macro?

It's unclear if one should use, for example, "Nan::SetMethod" or "NAN_EXPORT"These do the same thing, but in different ways -- which is the "correct" way?

207
How to change config variable based on the url

How to change config variable based on the url

I have two websites, websiteEN and websiteDEThey are both hosted on EC2 on their own instance

251
Rollup can't see named export from commonjs module

Rollup can't see named export from commonjs module

I have a simple AWS Lambda function (state-infots) which I am tree-shaking with Rollup and it is giving me the following error:

286