firebasegoogle-cloud-platformgoogle-cloud-firestoresimultaneous

When scaling up due to hitting the Firestore limit


As per the Google Firebase documentation, Firestore will support upto 1,000,000 simultaneous connections and 10,000 writes per second per database.

I know it`s far story, But what if that time comes? I always have been curious

Is it possible to further expand on Google Cloud? Beyond these limits?


Solution

  • As the documentation also states:

    Cloud Firestore does not stop you from exceeding this soft limit but doing so greatly affects latency and error rate.

    You can do more than those soft limits but it will affect the database performance. This makes sense if your app hits some spikes. You can go through this link for more information on limitations.

    If your app would need such a capacity in a constant time span you could create multiple projects per region or other grouping criteria. You can initialize multiple Firebase projects in the same app to use them.

    If you use the real-time database you can even create multiple of them in a single project. Firestore unfortunately doesn't support multiple databases in a single project.

    When it comes to such a big amount of connection it depends a lot from use cases to use cases if you should expand your Firebase usage or even move to another GCP solution (or other providers) that have greater scalability.

    Regarding the limitation of 10,000 writes per second, you can refer to this stackOverflow answer, which explains what you have to do if you think you might generate more sustained writes per second than Firestore allows