google-app-engine - NDB 与 DB(在高复制数据存储上)的速度比较是什么?

标签 google-app-engine google-cloud-datastore app-engine-ndb

取自Python NDB Overview :

When the application reads an entity, that entity is automatically cached; this gives fast (and inexpensive) reads for frequently-read entities.

...

The NDB function that writes the data (for example, put()) returns after the cache invalidation; the Apply phase happens asynchronously.

在 Youtube 上观看,Google I/O 2011: More 9s Please: Under The Covers of the High Replication Datastore ,在 13:11 左右,平均延迟为:

Master/Slave:

  • Read: 15ms
  • Write: 20ms

High Replication:

  • Read: 15ms
  • Write: 45ms

从应用的角度来看,NDB 对这些速度的影响有多大?

编辑:特别好奇时间统计(以毫秒为单位)。

额外信用:我还听说 Nick Johnson 提到每个查询花费大约 160 毫秒(2009 年)[link] NDB 是否提供任何查询速度优势?

最佳答案

您必须自己进行基准测试——时间取决于许多因素,例如实体大小和复杂性:更多属性或重复属性中的更多项 -> 更复杂。

你引用的数字真的很旧,可能不再反射(reflect)现实;大多数用户的体验是,平均而言,HRD 并不比 M/S 慢(部分原因是 M/S 具有更高的可变性)。

这里有一些 NDB 基准测试:http://code.google.com/p/appengine-ndb-experiment/issues/detail?id=118 -- 但它不会将数字与旧数据库进行比较。

您可以使用 Appstats 在真实应用中快速执行一些操作计时。

关于google-app-engine - NDB 与 DB(在高复制数据存储上)的速度比较是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9953789/

相关文章:

google-app-engine - 为 App Engine NDB 模型指定 key_name 的最佳方法是什么?

google-app-engine - 如何正确导入 Golang 应用引擎?

java - 尝试从大数据集中获取数据

android - App Engine 已连接 Android : can't make sample project work properly

java - 如何使用jpa通过在GAE数据存储中查询子级来获取父级实体?

python - 如何使用具有不同项目 ID 的现有 Compute Engine 中的 Google Cloud Datastore?

python - 更改|为 Google App Engine Datastore 上的模型实例分配父级

amazon-web-services - 从 AWS 迁移 : dynamoDB+API gateway to Google: DataStore +?

python - 如何在GAE上处理大文件?

python - 数据存储。未找到对象属性,尽管它存在于数据存储区中