Knowledge Hub

Cloudflare D1 icon
Cloudflare D1
vs
Firebase Realtime icon
Firebase Realtime

Performance Comparison

Database query times and total request latency measured from 15 global locations.
Tests run every hour through Cloudflare Workers. Lower numbers indicate better performance.

Location
Cloudflare D1Cloudflare D1
Firebase RealtimeFirebase Realtime
DB Query Time
Load
DB Query Time
Load
US flagus-west-1
US flagus-east-1
CA flagca-central-1
BR flagsa-east-1
DE flageu-central-1
GB flageu-west-2
FR flageu-west-3
SE flageu-north-1
IT flageu-south-1
ZA flagaf-south-1
SG flagap-southeast-1
JP flagap-northeast-1
HK flagap-east-1
AU flagap-southeast-2
KR flagap-northeast-2

FAQ

All primary databases are located in us-east-1 region.

Serverless Database features

Compare the features of the Serverless Database to help you choose the right one for your needs.

Feature
Cloudflare D1Cloudflare D1
Firebase RealtimeFirebase Realtime

Infrastructure, Underlying technology

Cloud Infrastructure, database system and underlying egine

Cloudflare infrastructure, SQLite

Nodejs, Google Cloud, Scala

Serverless Support

Serverless and Edge computing support

API

Cloudflare Workers runtime API interfaces, D1 Client API

REST API

Edge Functions

Serverless functions that run closer to the user, reducing latency and improving performance.

Cloudflare Workers runtime

Cloud functions

Developer Experience

Database type

OLTP

OLTP, OLAP

Data model

Databases store data in models, such as Relational, Columnar or Document based

Relational, SQL

Document based, NoSQL

CLI

Command Line Interface tools that allow developers to perform tasks and manage the tool via the command line.

Cloudflare Workers runtime

Firebase CLI

Languages, APIs

The languages supporting the database and API interface for inter-process communication

TypeScript, JavaScript inside Cloudflare worker functions

JavaScript, Swift, Kotlin, Java, C++, Objective-C

Query language

Supported query language such as SQL, MQL, PartiQL,

SQL

JSON

ACID compliant

ACID is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps
ACID compliant

Self-hosting

Support for self-hosted Database instance
Doesn't have support, Only for local development
Doesn't have support

Backups

Backups run every hour automatically. Stores backups of your database in R2

Security & Compliance Offerings

SOC2

Service Organization Control 2 compliance for managing customer data.
Apart from App indexing

Multi-factor authentication

Support of the cloud-histed database for multi-factor authentication

Encryption

Cryptographic security at rest and on transportation level
N/A

HTTPS, TLS

SSO

N/A
SAML-based SSO solution

Monitoring and analytics

Log retention

Query log retention usually keeps lofs of operations for debugging and replication purposes
N/A
Document level history 30 days retention

Statistics

Tools and APIs for analysing and monitoring of Database performance
N/A

Web based monitoring tools

Scalability

Replication and Partitioning

Distributed across Cloudflare Edge network

Region groups