Cloud Firestore Enterprise edition with MongoDB compatibility is now available! Learn more.

Understand reads and writes at scale

Relevant to Cloud Firestore Enterprise edition only.

Read this document to make informed decisions on architecting your applications for high performance and reliability. This document includes advanced Cloud Firestore topics. If you're just starting out with Cloud Firestore, see the quickstart guide instead. To make sure that your applications continue to perform well as your database size and traffic increase, it helps to understand the mechanics of reads and writes in the Firestore backend. You must also understand the interaction of your read and writes with the storage layer and the underlying constraints that may affect performance.

To learn about some best practices before architecting your application, read the following:

  • Understand the high level components of an API request.
  • All writes are handled as read-write transactions to ensure ACID properties. If a write involves multiple splits, it may require a two-phase commit process.
  • Reads, by default, are "strongly consistent" and use a timestamp-based approach to avoid locks.
  • To maintain high performance, you should avoid hotspots by distributing operations across the key range and keeping transactions small.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月31日 UTC.