Cost of storing a file in Datastore vs Blobstore

2019-03-18 18:39发布

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)?

2条回答
姐就是有狂的资本
2楼-- · 2019-03-18 19:05

Blobstore is more cheaper than datastore , it's read/write ops it not count , and free

查看更多
甜甜的少女心
3楼-- · 2019-03-18 19:22

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.

查看更多
登录 后发表回答