Google Cloud · Databases
Firestore
A serverless document database for web, mobile and server apps, with real-time listeners and offline sync.
On the Google Cloud Associate Cloud Engineer exam listKey-value storeServerless
What it is and what problem it solves
Firestore stores JSON-like documents in collections, scales automatically, and bills per operation and stored data, with no instances to size. Its client SDKs offer real-time listeners and offline persistence for mobile and web apps, protected by security rules. It runs in Native mode (and Datastore mode for older Datastore applications), in regional or multi-region locations.
When to use it
- Mobile and web app backends, especially with Firebase.
- User profiles, catalogues and app state with simple queries.
- Spiky traffic where serverless billing helps.
When to avoid it
- Complex joins and relational integrity: Cloud SQL or Spanner.
- Very high write throughput on time series: Bigtable.
- Analytics over the whole dataset: export to BigQuery.
Cost model
What you pay for
- Document reads, writes and deletes.
- Stored data and indexes; network egress.
Where it is cost-efficient
Apps reading targeted documents with good indexes.
Where costs grow
Queries reading many documents per page view, real-time listeners on large collections, unused indexes.
Cost controls and common surprises
Design data for the queries you run, paginate, and remove unneeded composite indexes.
Prices differ by Region and change over time; see the pricing page linked under Sources.
Security
Controls the service provides
Encryption at rest; IAM for server access; Firebase security rules for client access.
What you configure
Write and test security rules carefully (open rules expose data), use server SDKs with service accounts for back-end access.
Exam cues and common confusions
- Serverless document database for mobile/web, offline sync: Firestore.
- Large-scale wide-column, time series: Bigtable.
Related
Services, comparisons and patterns
- Bigtable · Service
- Spanner · Service
- Cloud Run · Service
- Cloud SQL vs AlloyDB vs Spanner vs Firestore · Comparison
- Event-driven order processing · Solution pattern
Sources
Independent study material, not affiliated with or endorsed by Google. Google Cloud and service names are trademarks of Google LLC.