Realtime Database Limits

The following are restrictions on data storage and operations in Firebase Realtime Database. To scale beyond any of these limits, use multiple databases.

Global

Operation Limit Description
Simultaneous connections 200,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 200,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.

*The Spark plan limit on simultaneous connections is 100.

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. This guidance is for sustained load, but the database can handle occasional higher bursts.
Number of Cloud Functions triggered by a single write 1000; or, for Cloud Functions v2, 500 per region 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, or 500 functions per region for Cloud Functions v2.

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 or 500-per-region limit).

Size of a single event triggered by a write 1 MB The size of an event consists of the following values:
  1. The existing data at the write location.
  2. The update value, or the delta in data necessary to write the new data to the location.
Write operations larger than 1MB succeed on the database, but they don't trigger a function invocation.
Data transfer to Cloud Functions 10MB/sec sustained The rate of event data that can be forwarded to Cloud Functions.

Data tree

Property Limit Description
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 new lines or any of the following characters:
. $ # [ ] / or any ASCII control characters (0x00 - 0x1F and 0x7F)
Maximum size of a string 10 MB Data is UTF-8 encoded.

Reads

Description Limit Notes
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.

Writes

Description Limit Notes
Write rate 1,000 writes/second The limit on write operations per second on a single database. While not a hard limit, if you sustain more than 1,000 writes per second, your write activity may be rate-limited.
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.