In my project I‘m using the realtime database as well as the Firestore database. My cloud functions triggers when a document is added to a specific collection inside my Firestore database. The function then writes to my realtime database to update some statistics. I noticed that even if no user is connected to my realtime database, the count of concurrent connections increases when the cloud function writes to the realtime database. Does this mean that my cloud functions count as concurrent connections and will decrease the amount of users that can connect to my realtime database at once as there is a limit of 100k concurrent connections?
1 Answers
2
votes
You'll incur one connection for each server instance running your functions. It is not one per individual function invocation. So, if it only requires one server instance to run your function, then it will only cost one connection. When a server instance is automatically deallocated from your project, its connection will go away.
You will need an extremely busy set of functions in order to make a real dent in your 100K concurrent connection cap for Realtime Database. I wouldn't worry about it.