Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
App Engine offers two data storage options with different reliability and consistency guarantees:
This page compares the two options and describes how to specify one of them for your application.
The High Replication Datastore (HRD) is a highly available, highly reliable storage solution that remains available for reads and writes during routine maintenance and unplanned events, and is extremely resilient in the face of catastrophic failure. The Master/Slave Datastore, by contrast, is suitable only for a limited class of applications that
In the HRD, all strongly consistent operations (such as get by key or put) occur within a transaction. Entity groups are a unit of consistency as well as of transactionality: queries that require strongly consistent results must contain an ancestor filter, which restricts the results to a single entity group. Queries that span multiple entity groups are not guaranteed to return up-to-date results. For more information about using ancestor queries in this context, see Using the High Replication Datastore.
The following table summarizes the differences between the High-Resolution and Master/Slave Datastores:
High Replication | Master/Slave | |
---|---|---|
Performance | ||
Put/delete latency | 1/2x–1x | 1x |
Get latency | 1x | 1x |
Query latency | 1x | 1x |
Consistency | ||
Put/get/delete | Strong | Strong |
Most queries | Eventual | Strong |
Ancestor queries | Strong | Strong |
Occasional planned read-only period | ||
No | Yes | |
Unplanned downtime | ||
Extremely rare; no data loss. | Rare; possible to lose a small % of writes occurring near downtime (recoverable after event) |
The HRD is the default for all new applications. Existing applications must migrate to the HRD by copying entities to a new application. If you prefer to use the Master/Slave Datastore, you can select it as follows:
Warning! This option is irreversible; if you choose the Master/Slave Datastore and later want to migrate to the HRD, you'll need to create a new application and copy your current Datastore to the new application.
Note: Datastore copy is currently available only for Python applications. Java developers will need to perform some additional configuration steps. See A Note for Java Developers for more information.