---
id: "google-firestore-datastore-mode"
type: "component"
kind: "nosql-database"
provider: "gcp"
category: "data"
aliases: "Cloud Datastore"
docs: "https://cloud.google.com/datastore/docs/concepts/overview"
url: "https://localhost:3000/catalogue/components/google-firestore-datastore-mode"
---

# Firestore in Datastore mode

Datastore entity API served by Firestore with strongly consistent queries.

| | |
|---|---|
| Provider | [gcp](https://localhost:3000/catalogue?provider=gcp) |
| Kind | [NoSQL database](https://localhost:3000/catalogue/kinds/nosql-database) |
| Category | Data |
| Official docs | [https://cloud.google.com/datastore/docs/concepts/overview](https://cloud.google.com/datastore/docs/concepts/overview) |
| Also known as | Cloud Datastore |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `backupEnabled` | boolean | — | no | false | **false** |
| `backupRetentionDays` | integer | — | no | — | inherited |
| `bucketing` (advanced) | boolean | — | no | false | inherited |
| `conflictResolution` | enum | `none`, `last-writer-wins`, `vector-clock`, `app-merge` | no | — | **"none"** |
| `consistency` | enum | `eventual`, `tunable`, `strong` | no | "eventual" | **"strong"** |
| `encryptionAtRest` | boolean | — | no | false | **true** |
| `instances` | integer | — | no | — | inherited |
| `locationType` | enum | `region`, `multi-region` | no | "region" | inherited |
| `managed` | boolean | — | no | false | **true** |
| `model` | enum | `key-value`, `wide-column`, `document` | yes | — | **"document"** |
| `partitionKey` | string | — | no | — | inherited |
| `pointInTimeRecovery` | boolean | — | no | false | inherited |
| `quorumReads` (advanced) | integer | — | no | — | inherited |
| `quorumWrites` (advanced) | integer | — | no | — | inherited |
| `replication` | enum | `single-region`, `multi-region-single-leader`, `multi-region-multi-leader`, `leaderless` | no | "single-region" | **"single-region"** |
| `replicationFactor` | integer | — | no | — | inherited |
| `tombstoneTtlDays` (advanced) | integer | — | no | — | inherited |

Bold values are the ones this component pins.

## Rules that apply · 2

### Multi-leader store without a conflict policy `multi-leader-store-without-conflict-policy` (warning)

- Page: https://localhost:3000/catalogue/rules/multi-leader-store-without-conflict-policy.md
- Why: Multi-leader replication accepts concurrent writes in several regions. With no conflict resolution policy declared, divergent replicas are reconciled by accident rather than by design.
- Applies to: every node of kind nosql-database
- Message: Store '{{node.id}}' is multi-leader across regions with no conflict resolution policy. Declare last-writer-wins, vector-clock or app-merge.

It fires when:

- all of these hold:
  - the node's `replication` is "multi-region-multi-leader"
  - any of these hold:
    - the node's `conflictResolution` has no value
    - the node's `conflictResolution` is "none"

### Read-heavy datastore without a cache `read-heavy-path-without-cache` (warning)

- Page: https://localhost:3000/catalogue/rules/read-heavy-path-without-cache.md
- Why: The design states a read-heavy workload and application servers read this datastore directly, yet the design has no cache anywhere. Every read pays a database round trip.
- Applies to: every node of kind sql-database or nosql-database
- Message: Datastore '{{node.id}}' serves a read-heavy workload directly from application servers and the design has no cache.

It fires when:

- all of these hold:
  - the design requirement `traffic.readWriteRatio` is a number greater than 10
  - the node has at least one synchronous incoming edge from an app-server
  - this does not hold:
    - the design contains a node of kind cache

## Other products of the same kind · 46

- [ApsaraDB for HBase](https://localhost:3000/catalogue/components/alibaba-apsaradb-hbase.md) `alibaba-apsaradb-hbase` — alibabacloud
- [ApsaraDB for MongoDB](https://localhost:3000/catalogue/components/alibaba-apsaradb-mongodb.md) `alibaba-apsaradb-mongodb` — alibabacloud
- [Lindorm](https://localhost:3000/catalogue/components/alibaba-lindorm.md) `alibaba-lindorm` — alibabacloud
- [Tablestore](https://localhost:3000/catalogue/components/alibaba-tablestore.md) `alibaba-tablestore` — alibabacloud
- [Amazon CloudFront KeyValueStore](https://localhost:3000/catalogue/components/aws-cloudfront-keyvaluestore.md) `aws-cloudfront-keyvaluestore` — aws
- [Amazon Cognito Sync](https://localhost:3000/catalogue/components/aws-cognito-sync.md) `aws-cognito-sync` — aws
- [Amazon DocumentDB](https://localhost:3000/catalogue/components/aws-documentdb.md) `aws-documentdb` — aws
- [AWS HealthLake](https://localhost:3000/catalogue/components/aws-healthlake.md) `aws-healthlake` — aws
- [Amazon Keyspaces (for Apache Cassandra)](https://localhost:3000/catalogue/components/aws-keyspaces.md) `aws-keyspaces` — aws
- [Amazon DynamoDB](https://localhost:3000/catalogue/components/dynamodb.md) `dynamodb` — aws
- [Azure Cosmos DB](https://localhost:3000/catalogue/components/azure-cosmos-db.md) `azure-cosmos-db` — azure
- [Azure DocumentDB](https://localhost:3000/catalogue/components/azure-documentdb.md) `azure-documentdb` — azure
- [Azure Health Data Services](https://localhost:3000/catalogue/components/azure-health-data-services.md) `azure-health-data-services` — azure
- [Azure Managed Instance for Apache Cassandra](https://localhost:3000/catalogue/components/azure-managed-cassandra.md) `azure-managed-cassandra` — azure
- [Azure Table Storage](https://localhost:3000/catalogue/components/azure-table-storage.md) `azure-table-storage` — azure
- [Workers KV](https://localhost:3000/catalogue/components/cloudflare-workers-kv.md) `cloudflare-workers-kv` — cloudflare
- [Apache Accumulo](https://localhost:3000/catalogue/components/accumulo.md) `accumulo` — default
- [Aerospike Database](https://localhost:3000/catalogue/components/aerospike.md) `aerospike` — default
- [Apache Cassandra](https://localhost:3000/catalogue/components/cassandra.md) `cassandra` — default
- [Couchbase](https://localhost:3000/catalogue/components/couchbase.md) `couchbase` — default
- [Apache CouchDB](https://localhost:3000/catalogue/components/couchdb.md) `couchdb` — default
- [DataStax Enterprise](https://localhost:3000/catalogue/components/datastax-enterprise.md) `datastax-enterprise` — default
- [FoundationDB](https://localhost:3000/catalogue/components/foundationdb.md) `foundationdb` — default
- [Apache HBase](https://localhost:3000/catalogue/components/hbase.md) `hbase` — default
- [MarkLogic Server](https://localhost:3000/catalogue/components/marklogic.md) `marklogic` — default
- [MongoDB](https://localhost:3000/catalogue/components/mongodb.md) `mongodb` — default
- [MongoDB Atlas](https://localhost:3000/catalogue/components/mongodb-atlas.md) `mongodb-atlas` — default
- [Generic NoSQL database](https://localhost:3000/catalogue/components/nosql-database.md) `nosql-database` — default
- [NoSQL store](https://localhost:3000/catalogue/components/nosql-store.md) `nosql-store` — default
- [OrientDB](https://localhost:3000/catalogue/components/orientdb.md) `orientdb` — default
- [RavenDB](https://localhost:3000/catalogue/components/ravendb.md) `ravendb` — default
- [RethinkDB](https://localhost:3000/catalogue/components/rethinkdb.md) `rethinkdb` — default
- [Riak KV](https://localhost:3000/catalogue/components/riak.md) `riak` — default
- [ScyllaDB](https://localhost:3000/catalogue/components/scylladb.md) `scylladb` — default
- [TiKV](https://localhost:3000/catalogue/components/tikv.md) `tikv` — default
- [YDB](https://localhost:3000/catalogue/components/ydb.md) `ydb` — default
- [Google Cloud Bigtable](https://localhost:3000/catalogue/components/bigtable.md) `bigtable` — gcp
- [Google Cloud Firestore](https://localhost:3000/catalogue/components/firestore.md) `firestore` — gcp
- [Cloud Healthcare API](https://localhost:3000/catalogue/components/google-cloud-healthcare-api.md) `google-cloud-healthcare-api` — gcp
- [Firebase Realtime Database](https://localhost:3000/catalogue/components/google-firebase-realtime-database.md) `google-firebase-realtime-database` — gcp
- and 6 more: https://localhost:3000/catalogue/kinds/nosql-database.md

## Use it in a design

```yaml
nodes:
  - { id: "google-firestore-datastore-mode", component: "google-firestore-datastore-mode" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Firestore in Datastore mode: the Datastore entity API served by Firestore. "Datastore
# overview" states that all queries are strongly consistent and that data is encrypted
# automatically before it is written to disk; backups and point-in-time recovery are opt-in.
schemaVersion: "1"
type: "component"
id: "google-firestore-datastore-mode"
kind: "nosql-database"
provider: "gcp"
docs: "https://cloud.google.com/datastore/docs/concepts/overview"
aliases: ["Cloud Datastore"]
defaults:
  model: "document"
  consistency: "strong"
  replication: "single-region"
  conflictResolution: "none"
  encryptionAtRest: true
  backupEnabled: false
  managed: true
properties:
  locationType:
    type: "enum"
    values: ["region", "multi-region"]
    default: "region"
  pointInTimeRecovery:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/google-firestore-datastore-mode
