在Datastore vs Blobstore中存储文件的成本 [英] Cost of storing a file in Datastore vs Blobstore

查看:167
本文介绍了在Datastore vs Blobstore中存储文件的成本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


由于blobstore中的每个文件都有一个关联的数据存储区中的BlobInfo实体,因此我是否会像其他任何数据存储区实体一样,为该实体的写入/读取负担费用?
$ b

背景:

我们在App Engine上存储了数百万张图片,我们目前正在将它们存储在数据存储实体中(图像小于1MB)。我想知道是否使用blobstore会降低我们的成本。我并不关心存储成本。真正的成本是写作和阅读的行为,所以这就是我想要减少的。现在我们支付数据存储实体的写入和读取,每个图像一个实体。



另一方面,对于blobstore来说,写入/读取似乎没有单独的成本(除了实例小时数),但每个blob都有数据存储中的特殊BlobInfo实体,可以在Blob上进行查询。从文档中不清楚的是,这些实体在成本方面是否像任何其他数据存储实体一样被对待(每个实体2个写入Ops +每个索引属性2个写入操作)?



如果您在开发服务器上运行应用程序,则可以在数据存储查看器中看到名为__ Blobinfo __的实体种类,其中详细列出了每个条目。它表明我有12个写作操作来存储每个实体。


Question: Since every file in the blobstore has an associated BlobInfo entity in the datastore, do I get charged the cost of write/read of that entity just like any other datastore entity?

Background:

We store millions of images on App Engine, and we're currently storing them in datastore entities (the images are smaller than 1MB). I'm wondering if using the blobstore would reduce our cost. I'm not concerned about the cost of storage. The real cost is the act of writing and reading, so that's what I'm trying to reduce. Right now we pay for the write and read of the datastore entities, one entity per image.

With the blobstore, on the other hand, there doesn't seem to be a separate cost to writing/reading (other than instance hours), but each blob has a special BlobInfo entity in the datastore that makes it possible to query on blobs. What's not clear from the documentation is whether these entities are treated like any other datastore entities in terms of cost (2 write Ops per entity + 2 write ops per each indexed property)?

解决方案

While I can't point to the documentation to say one way or another, in my experience, yes the Blobstore read and writes count towards datastore read/write ops.

If you run your app on the dev server, you can see an Entity kind in the Datastore Viewer named "__ Blobinfo __" which details each entry. It shows for me that there were 12 write ops taken to store each entity there.

这篇关于在Datastore vs Blobstore中存储文件的成本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆