Reduce data warehouse read performance

In accordance with the new pricing scheme of Google App Engine, I get a table of price surprises, as shown below.

enter image description here

The culprit is that I get a huge increase in "Datastore Read Operations" in just a few hours, although there are only less than 50 calls to mine , DownloadServlet

DownloadServlet will simply read the blob (usually less than 1 MB) from the database and return it to the user. Is there anything I can do to optimize my code so that I won’t quickly remove the quota limit.

+7
source share
2 answers

You read a lot because you broke your files into 1MB pieces in the data warehouse. As a result, you have to do one reading per piece, but because you are not using key names or identifiers, you also make a request for each, which further destroys your quota.

Instead, save the data in block storage.

+9
source

If the data you are reading from the data warehouse is relatively static (for example, text for blog entries), you can consider caching data in memcache .

There is no guarantee on how long data can remain in memcache, so you need to regularly retrieve data from the data store if the data in memcache is invalid, but the savings on read operations of the data store will be quite significant.

+3
source

All Articles