Skip to main content
Lark enforces the same limits as Firebase Realtime Database, with one exception: there are no rate limits on volatile writes or events.

Data tree

Keys

Keys are the path segments that identify children in the JSON tree.
ConstraintLimit
Max length768 UTF-8 bytes
Forbidden characters. $ # [ ] / newlines
Control charactersASCII 0x00–0x1F and 0x7F are not allowed
Reserved prefixKeys starting with . are reserved for internal use (.priority, .value, .sv)
Max depth32 levels — each path must be fewer than 32 levels deep
Characters like . and $ are common in many systems (email addresses, MongoDB field names, template strings) but are forbidden in Lark keys. If you need to store an email as a key, encode it first — for example, replace . with , or use a hash.

Values

ConstraintLimit
Max string size10 MB (UTF-8 encoded)

Data types

Lark stores JSON. The supported value types are:
TypeExample
String"hello"
Number42, 3.14, -1
Booleantrue, false
Object{ "key": "value" }
Nullnull (deletes the node)
Writing null to a path deletes it. There’s no separate “delete” wire operation — a null write and a remove are the same thing.

A note on arrays

Lark doesn’t have a native array type. If you write a JSON array, Lark converts it to an object with integer keys:
// You write this:
await db.ref('items').set(['apple', 'banana', 'cherry']);

// Lark stores this:
// { "0": "apple", "1": "banana", "2": "cherry" }
This works, but it’s fragile. If two clients modify the array at the same time, they’ll overwrite each other’s changes. For lists that multiple clients might modify, use push to generate unique keys instead.

Reads

ConstraintLimit
Max single response size256 MB
Max nodes in a listened/queried path75 million (cumulative)
Max query duration15 minutes
If you need to read data larger than 256 MB at a single location, paginate with a query or use shallow reads. For paths with more than 75 million nodes, listen to or query more specific child paths instead of the entire subtree.

Writes

ConstraintLimit
Write rate1,000 writes/second per database
Volatile write rateNo limit
Max write payload (SDK)16 MB (JSON-encoded)
Max write payload (REST API)256 MB
Bytes written64 MB/minute per database
Volatile write max size2 KB
The write payload limit applies to the entire JSON body of a single write operation — including set, update, and push. Multi-path updates are subject to the same limit across all paths combined.
The 16 MB limit is on the JSON-encoded payload, not the in-memory size. JSON encoding adds overhead for keys, quotes, and structural characters, so the effective data limit is somewhat less than 16 MB.

Volatile exceptions

Volatile paths have no rate limit on writes per second or events per second. The 1,000 writes/second and 64 MB/minute limits apply only to regular (persisted) writes. The 2 KB per-write size limit still applies to volatile writes.

Connections

ConstraintLimit
Simultaneous connections200,000 per database
A simultaneous connection is one mobile device, browser tab, or server app connected to the database. This isn’t the same as your total user count — users don’t all connect at once. An app with millions of monthly users typically has far fewer simultaneous connections. To scale beyond 200,000 connections, use multiple databases. See database routing for patterns on splitting data across databases.

Summary

CategoryConstraintLimit
KeysMax length768 UTF-8 bytes
KeysForbidden characters. $ # [ ] / newlines, control chars
KeysMax depth32 levels
ValuesMax string size10 MB
ReadsMax response size256 MB
ReadsMax nodes in queried path75 million
ReadsMax query duration15 minutes
WritesWrite rate1,000/sec per database
WritesMax payload (SDK)16 MB
WritesMax payload (REST)256 MB
WritesBytes written64 MB/min per database
WritesVolatile max size2 KB
WritesVolatile rate limitNone
ConnectionsSimultaneous200,000 per database

What’s next