app engine - how can i increase the datastore item size limit - google-app-engine

how can i increase the datastore item size limit, which is now only 1 MB, in app engine?
if i buy more storage what will happen to this limit?
thanks

Not exactly. Enabling billing won't remove the 1MB entity size limit, however it will allow you to use the Blobstore API, where you can store blobs up to 2GB in size. These are typically uploaded files, but could just as easily be pickled python objects.
While each entity is limited to 1MB, HTTP requests and responses can be up to 10MB, so you can handle slightly larger files by spanning the blob contents across multiple entities, splitting the file on upload and stitching it back together on download.

You can use the Blobstore API to handles objects that are larger than 1 Mb.

I dont know what limit 1MB you exactly talking about but for GAE if you want to do anything above the free quota, enable billing for your application :)

Related

Maximum number if files per folder Google Cloud Storage

I want to setup Google Cloud Storage as my data lake and I'm using Pubsub + dataflow to save interactions into it. Dataflow creates a new file each 5 min to store it in a GCS folder. This will eventually lead to a lot of files inside the given folder. Is there any limit on the number of files that can be saved inside a GCS folder?
There is no practical limit. Bear in mind there are not even really "folders" in Cloud Storage. There are just objects with paths whose names look like folders, for the purpose of helping you organize and navigate all that content.
The limit is 5.2 pentillion, which would take many years to even create
We store some of our services as zero-compute JSON files with sub-folders in GCP buckets. I wanted to confirm we could store more than 4.2 billion folders in a bucket so we could access our files via ID just like we would in a database (currently we are up to over 100k files per folder - we basically use GCP buckets as a type of database that has a read:write ratio well-beyond 1m:1).
I asked our engineering team to open a ticket and confirm our usage was practical, and that passing 4.2 billion items was possible. Google Cloud support confirmed there are customers using Cloud Storage today that go well-beyond the 4.2 billion (32 bit) limit, into the trillions, and that the main index currently involves a 64 bit pointer, which may be the only limit.
64 bit is 5.2 pentillion, or 9,223,372,036,854,775,807 to be exact.
They do have other, related-limits like 1k writes/5k reads per second per bucket, which can auto-scale but has nuances, so if you think you may hit that limit, you may want to read about it here: https://cloud.google.com/storage/docs/request-rate.
For reference, here is there general storage quotas and limits: https://cloud.google.com/storage/quotas
...it does not describe the 64-bit / 5.2 pentillion item limitation, possibly because that limit would practically be impossible to reach, as it would take about a decade just to create the objects, after which time it would be 2032 and they would probably have engineered beyond 64-bit :)

Is there a cost to using google realtime api? What is the user limit? What is the cost to add users?

What is the cost to use google realtime api for a company?
Is there a cost if the number of users go up?
I think the Realtime API is free. However what you need to be aware of is its Size restrictions and best practices.
The Realtime API limits the maximum sizes of Realtime documents and
individual changes. These limits are:
Total Realtime document size: 10 MB (10*2^10 bytes) Maximum change
size: 500 KB
-Avoid storing large binary objects, like images, within the data model. Instead, you can link to files stored separately in Google
Drive, or on an external server.

How long are image serving URLs valid for with Google Cloud Storage/Blobstore? Is the storage cost redundant?

There's no expiration or storage details listed for image serving URLs on Google's Cloud platform:
https://cloud.google.com/appengine/docs/go/images/reference#ServingURL — This documentation is quite unclear. Is the image stored temporarily on a CDN or something, or is it stored in the Blobstore of the project indefinitely and we're paying for many multiples of storage? Or, does the URL expire after a set amount of time and that size of the image is discarded?
The reason I'm asking is because I've heard that calls to this function add latency, and I wanted to be sure to cache the response if possible and if this was the case. However, I need to know the cache expiration point, if ever, if so.
Any help or clarification would be appreciated.
Pricing and Caching
That is described a little better here:
You simply store a single copy of your original image in Blobstore, and then request a high-performance per-image URL.
As Paul said in his comment, you only pay for the storage space of 1 copy of the original image in the Blobstore, plus normal bandwidth charges when it is served. When you create URLs that serve the image at different sizes, it is up to Google whether they cache a copy of the image at that size or not; either way you will still only pay for the storage of the original image at the original size.
I have seen reports that serving URLs can work for days after deleting the original image, so obviously Google does some caching at least sometimes, but those details are not specified and could change case-by-case.
Expiration
The URL will never expire, unless you delete it or the original image explicitly.
Whether you store your images in Cloud Storage or Blobstore, the right way to stop an image from being publicly accessible through the serving URL is to call the image.DeleteServingURL function.
Performance
I cannot comment on how much latency could be added by serving a resized copy of an image. I assume the answer is "not enough to care about", but again, I don't know. If you experiment and find the added latency unacceptable, you could try creating multiple versions of the image to store in Blobstore yourself, to serve at their natural sizes. I cannot say whether that would actually increase performance or not. You would of course pay for storing each copy in that case. I suggest not worrying about that unless you see it becomes a problem.
Images are served with low latency from a highly optimized, cookieless infrastructure.
So I doubt you could gain much benefit from trying to optimize it more yourself.

Google App Engine - Quota Limit

The documentation of Google App Engine Says:
The number of times the application has been uploaded by a developer.
The current quota is 10,000 per day.
An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes. Additionally,
if the total size of all files for all versions exceeds the initial
free 1 gigabyte, then there will be a $0.13 per GB per month charge.
I am planning to make an application which will have files uploaded by the user. I hope this 10,000 uploaded files refers to the files uploaded by the developer only and will not count for the user generated static content.
I am a bit confused about this. Clarification will be very much appreciated.
Yes, the 10,000 files limit is for the files uploaded by the developer as part of your application files.
In terms of files uploaded by your users, you must be aware that you cannot write to files in GAE but instead look at storing uploaded data in the Datastore, Blob or even other Cloud Storage options like Cloud SQL, Google Cloud Storage or even Google Drive.

Reduce the size of Google app engine Datastore Stored Data

I'm using Google app engine and now the size of the "Datastore Stored Data" is near to exceed the free quota limit. so i want to reduce the size of the data in the Datastore by removing some entity elements.
I have tried deleting some entity elements that cost about 100MB (abt 10% from 1GB limit) , but it still shows the earlier usage and it still near to exceed the free quota limit.
Please advice me, how to reduce the data store size.
Thanks in advance.
Nalaka
To reduce the size in your case:
1) NDB can compress properties, so you can create an object for the non indexed properties and compress it: https://developers.google.com/appengine/docs/python/ndb/properties?hl=nl
2) I do not know your models. But an option is to distribute your models and create a webservice to fetch entities from the other appids.
3) If it is only one model, you keep the indexed properties in your primary appid and fetch the data from the secondary appid.
But of course, everything has a price. Performance, url fetches, CPU ... So it is easy to run from one bottleneck in another.

Resources