
A chat screen, a shared shopping list or a delivery tracker all have the same requirement: when data changes in one place, every connected screen should show it within a moment, and the app should keep working when the phone loses signal. Building that on a traditional database means writing an API, a WebSocket layer, a local cache and the logic that reconciles them. Cloud Firestore is Google's document database that does that work for you: clients subscribe to data, receive changes as they happen, and sync their offline writes when they reconnect.
This article explains what Cloud Firestore is, how its data model, queries and offline sync work, where it fits, where it does not, and how it compares with other document databases.
What is Cloud Firestore?
Cloud Firestore is a fully managed, serverless NoSQL document database from Google. It stores data as documents grouped into collections, scales automatically, and can be used directly from iOS, Android, web and Flutter apps through the Firebase SDKs, or from servers through the Google Cloud client libraries.
Google announced Cloud Firestore in beta on 3 October 2017 as the successor to the Firebase Realtime Database, the product Firebase had started with. The Realtime Database keeps all data in one large JSON tree, which is fast but becomes hard to query and structure as an app grows. Firestore kept the real-time sync and offline support developers liked, and added a structured data model, richer queries and Google Cloud's multi-region infrastructure. It became generally available on 31 January 2019.
Firestore is also the next generation of Google Cloud Datastore: a database can run in Native mode, with real-time and mobile features, or in Datastore mode for server workloads. In 2025 Google added an Enterprise edition that can also be accessed through MongoDB-compatible drivers.
How Cloud Firestore works
Documents and collections. A document is a set of fields: strings, numbers, booleans, timestamps, geographic points, arrays and nested maps. Documents live in collections, and a document can hold subcollections of its own, such as users/{userId}/orders/{orderId}. There are no tables and no fixed schema; two documents in the same collection can have different fields. In the Standard edition a single document can hold up to 1 MiB.
Every query uses an index. Firestore indexes each field automatically, and you define composite indexes for queries that filter or sort on several fields. Because every query is served from an index, a query's speed depends on the size of the result, not the size of the database. The trade-off is that there are no joins: data that is read together is usually stored together, or duplicated where needed.
Real-time listeners. Instead of polling, a client can attach a listener to a document or a query. Firestore sends the initial result and then every change to it, so the screen stays in sync without extra code.
Offline first. The mobile and web SDKs keep a local cache. Reads are served from it when the network is down, writes are queued, and everything is synchronised when the device reconnects.
Transactions and consistency. Firestore is strongly consistent and supports ACID transactions and batched writes across multiple documents, so a transfer between two balances or an order and its stock update either both happen or neither does.
Security Rules or IAM. Apps that talk to Firestore directly are protected by Firebase Security Rules, evaluated on Google's servers for every request. Server code uses the Admin SDK or Google Cloud libraries, which are authorised with IAM instead.
Key features
- Real-time sync of documents and query results to every connected client.
- Offline persistence on mobile and web, with automatic sync on reconnect.
- Automatic scaling with no servers, capacity planning or sharding to manage.
- Multi-document ACID transactions and strong consistency.
- Regional and multi-region locations, with replication across zones or regions.
- Point-in-time recovery, scheduled backups and BigQuery export for operations and analytics.
- Tight Firebase integration: Authentication, Cloud Functions triggers and Security Rules work with it out of the box.
Where Cloud Firestore is used
- Chat and messaging features, where new messages must appear instantly.
- Collaborative apps: shared lists, boards and documents edited by several people.
- Mobile apps used in the field, where connectivity drops and the app has to keep working.
- User profiles, settings and content feeds in consumer and SaaS products.
- Live dashboards and status screens, for example order or delivery tracking.
- Game state and leaderboards that change constantly and are read by many players.
When to choose Cloud Firestore, and when not to
Choose Cloud Firestore when:
- The app is mobile-first or real-time, and offline support matters.
- Data is read as documents and the access patterns are known in advance.
- You want a database with no servers to run, and you are already on Firebase or Google Cloud.
- Traffic is unpredictable and you want scaling handled for you.
Look elsewhere when:
- You need ad-hoc queries, joins and reporting across many entities. A relational database such as PostgreSQL is built for that.
- Analytics is the main workload. Export to BigQuery or use a data warehouse instead of querying Firestore.
- Search relevance and fuzzy matching are central. A dedicated engine such as Elasticsearch does more.
- A single document is written many times per second, such as a global counter. Firestore limits the sustained write rate per document, so such data needs to be split across documents.
- Cost predictability matters more than convenience. Billing follows document reads, writes and deletes, so a data model that reads a lot costs a lot.
Cloud Firestore and its alternatives
| Database | Model | Real-time client sync | Best fit |
|---|---|---|---|
| Cloud Firestore | Documents and collections | Built in, with offline cache | Mobile and real-time apps on Google Cloud |
| Firebase Realtime Database | One JSON tree | Built in | Very simple, low-latency sync such as presence |
| MongoDB | Documents (BSON) | Change streams on the server | Rich queries and aggregation, any cloud or on-premise |
| Amazon DynamoDB | Key-value and documents | Streams on the server | High-scale workloads on AWS |
| Azure Cosmos DB | Multi-model documents | Change feed on the server | Global apps on Azure |
The closest relative is the Firebase Realtime Database, and Google recommends Firestore for most new projects. The Realtime Database is still useful for small, very frequent updates such as online presence.
MongoDB is the document database most teams compare it with. MongoDB offers richer queries, aggregation pipelines and the freedom to run anywhere, but you either operate it or pay for a managed service, and real-time delivery to clients is something you build yourself. Amazon DynamoDB and Azure Cosmos DB play a similar role on AWS and Azure.
How we use Cloud Firestore at Internative
We use Firestore for real-time and mobile-first projects where fast development, offline support and automatic scaling are critical. It lets us deliver responsive apps without carrying a heavy backend.
If you are planning a mobile or real-time product and want to choose its data layer carefully, our mobile application development and cloud-based application development teams can help.
Frequently asked questions
What is the difference between Cloud Firestore and Firebase?
Firebase is Google's app development platform: authentication, storage, functions, hosting, messaging and more. Cloud Firestore is the database inside it. You can use Firestore with the rest of Firebase, or on its own through Google Cloud.
Is Cloud Firestore the same as Firestore?
Yes. Google uses both names for the same database. "Cloud Firestore" is the name it launched with in Firebase, and Google Cloud documentation often just says "Firestore".
Is Firestore free?
Firestore has a free daily quota of reads, writes, deletes and storage, which covers development and small apps. Beyond that you pay for document operations, stored data and network traffic, so cost grows with how much the app reads and writes.
Is Firestore better than MySQL?
They solve different problems. Firestore is better for real-time, mobile and offline-first apps with document-shaped data and no servers to manage. MySQL, or another relational database, is better when data is highly relational and needs joins, complex queries and reporting.
Should I use Cloud Firestore or the Realtime Database?
For most new apps, Cloud Firestore. It has a structured data model, compound queries, transactions and multi-region availability. The Realtime Database remains a reasonable choice for very simple data that changes many times per second, such as presence indicators.
Related services
Where this topic becomes an engagement.
Keep reading
The articles that follow this one.



