Firebase Realtime Database

active

by Google (Firebase) · since 2012 · also known as RTDB, Firebase RTDB

Firebase's original JSON-tree database that syncs every change to connected clients in milliseconds.

documentkey-valuemanaged serviceproprietarymature

Overview

Firebase Realtime Database is a cloud-hosted JSON tree that pushes changes to every subscribed client over a persistent connection. The Firebase SDKs handle offline writes and reconnection, and Security Rules control access. It predates Firestore and still wins on raw sync latency, simplicity and pricing for small, chatty payloads such as presence, typing indicators or live game state. Its limits are real, though: each database is one regional instance with caps on concurrent connections and writes, queries filter on one key at a time, and Google labels Firestore as the preferred choice for new apps. It remains fully supported and is still updated in the Firebase SDKs.

Strengths & trade-offs

Strengths

  • +Lowest-latency client sync in the Firebase family
  • +Bandwidth-and-storage billing is cheap for many small writes
  • +Offline writes and automatic reconnection in every SDK
  • +Presence detection via onDisconnect handlers
  • +Very little to learn: it's a JSON tree with listeners

Trade-offs

  • −Queries can sort or filter on only one child key at a time
  • −A single instance has hard connection and write-throughput limits
  • −Deep JSON trees push you into denormalisation and fan-out writes
  • −Single-region, with no multi-region replication

Great for

  • +Presence, typing indicators and live cursors
  • +Multiplayer game state and lobbies
  • +Small realtime dashboards and chat

Think twice for

  • −Complex queries or reporting
  • −Large datasets with many access patterns (use Firestore)
  • −Apps needing multi-region availability

Capabilities

Native or official first-party support · 10 of 25 tracked

✓Transactions
✓Secondary indexes
✓JSON
✓Triggers
✓Pub/Sub
✓Durable persistence
✓Encryption at rest
✓Role-based access
✓Online schema changes
✓Offline sync
–Joins
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Stored procedures
–Materialized views
–TTL / expiry
–Columnar storage
–In-memory
–Compression
–Time travel
–Branching
–Streaming ingest
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
Manual
Multi-region
No
Transactions
Limited ACID
Consistency
Strong, Eventual
Schema
Schemaless
Architecture
Serverless, Single node
Query languages
Firebase query API (orderBy/equalTo/limit)

Each instance tops out around 200k concurrent connections and ~1k writes/s; scale by sharding data across multiple instances yourself.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

available on · Google Cloud

Ecosystem

apis & protocolsFirebase client SDKs (WebSocket), REST, Server-Sent Events streaming
client languagesJavaScript, Swift, Kotlin, Java, C++, Dart, Python, Go, C#

Alternatives to Firebase Realtime Database

Compare all→
Google Cloud FirestoreDocument49.1

Serverless document database with realtime listeners, offline SDKs and a new Enterprise edition.

firebase-realtime-database vs google-cloud-firestore →
SupabaseRelational54.3

Open-source Postgres backend platform: database, auth, storage, realtime and edge functions in one project.

firebase-realtime-database vs supabase →
ConvexDocument26.0

Reactive TypeScript backend with a transactional document database, server functions and live queries.

firebase-realtime-database vs convex →
PocketBaseRelational32.0

Open-source backend in one Go binary: SQLite database, auth, files, realtime and admin UI.

firebase-realtime-database vs pocketbase →
InstantDBGraph20.7

Realtime client-side database with relational queries, auth and permissions; cloud sunsets in 2027.

firebase-realtime-database vs instantdb →
FirebaseDocument65.4

Google's app platform: Firestore, Realtime Database and Data Connect, plus auth, functions and hosting.

firebase-realtime-database vs firebase →

Firebase Realtime Database FAQ

What is Firebase Realtime Database?

Firebase Realtime Database is a document database by Google (Firebase), first released in 2012. Firebase Realtime Database is a cloud-hosted JSON tree that pushes changes to every subscribed client over a persistent connection. The Firebase SDKs handle offline writes and reconnection, and Security Rules control access. It predates Firestore and still wins on raw sync latency, simplicity and pricing for small, chatty payloads such as presence, typing indicators or live game state. Its limits are real, though: each database is one regional instance with caps on concurrent connections and writes, queries filter on one key at a time, and Google labels Firestore as the preferred choice for new apps. It remains fully supported and is still updated in the Firebase SDKs.

Is Firebase Realtime Database open source?

No. Firebase Realtime Database is proprietary, closed-source software.

Does Firebase Realtime Database support ACID transactions?

Partly. Firebase Realtime Database offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong, eventual consistency.

Does Firebase Realtime Database scale horizontally?

Firebase Realtime Database has no built-in sharding; scaling out means partitioning data in your application. It is comfortable at small scale (≤ 100 GB).

How can I run Firebase Realtime Database?

You can use the vendor's managed cloud and run it serverless. It is available on Google Cloud.

What is Firebase Realtime Database best for?

Firebase Realtime Database is a strong fit for presence, typing indicators and live cursors; multiplayer game state and lobbies; and small realtime dashboards and chat. Think twice for complex queries or reporting.

What are the best alternatives to Firebase Realtime Database?

Common alternatives to Firebase Realtime Database include Google Cloud Firestore, Supabase, Convex, PocketBase and InstantDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Firebase Realtime Database?

Firebase Realtime Database ranks #113 of 844 databases on the WhichDB Score (26.4/100), and #11 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.