The following are restrictions on data storage and operations in Firebase Realtime Database. To scale beyond any of these limits, use multiple databases.
|Simultaneous connections||100,000||A simultaneous connection is equivalent to one mobile device, browser tab,
or server app connected to the database.
This isn't the same as the total number of users of your app, because your users don't all connect at once. For example, apps with 10 million monthly active users usually have fewer than 100,000 simultaneous connections. Your max simultaneous connections depends on your total user count and the average time users spend in your app.
However, if you need to scale beyond this limit, try using multiple databases.
|Simultaneous responses sent from a single database.||~100,000/second||Responses include simultaneous broadcast and read operations sent by the server from a single database at a given time. The limit refers to the data packets that represent each individual read or broadcast operation, including push notifications, sent from the database.|
|Number of Cloud Functions triggered by a single write||1000||While there isn't a limit to how many read or write operations you can
trigger from a single function, a single database write operation can only
trigger 1000 functions, per individual write operation.
Cloud Functions can only be triggered by write operations, and each function can also trigger more write operations that trigger more functions (each with their own 1000-function limit).
|Size of database write that triggers a function||1 MB||The size of the write consists of the following values:
|Maximum depth of child nodes||32||Each path in your data tree must be less than 32 levels deep.|
|Length of a key||768 Bytes||Keys are UTF-8 encoded and can't contain the following characters:
. $ # [ ] / or ASCII control characters 0-31 or 127
|Maximum size of a string||10 MB||Data is UTF-8 encoded.|
|Size of a single response served by the database||256 MB||The size of data downloaded from the database at a single location should be
less than 256 MB for each read operation.
To perform a read operation at a larger location, try one of the following options:
|Total nodes in a path with listeners or queries on it||75 million*||You can't listen to or query paths with more than 75 million nodes,
cumulative. However, you can still listen to or query child nodes. Try drilling
down deeper into the path or creating separate listeners or queries for more
specific portions of the path.
*You can't view paths with more than 30,000 total nodes from the data viewer in the Firebase console.
|Length of time a single query can run||15 minutes*||A single query can run for up to 15 minutes before failing.
*A single query performed in the Firebase console can only run for up to 5 seconds before failing.
|Size of a single write request to the database||256 MB from the REST API; 16 MB from the SDKs.||The total data in each write operation should be less than 256 MB. Multi-path updates are subject to the same size limitation.|
|Bytes written||64 MB/minute||The total bytes written through simultaneous write operations on the database at any given time.|