rasilvap
rasilvap

Reputation: 2179

How GAE from Gcp scales regarding the java virtual machine memory usage?

I am working in gcp and we have a large volume of data, my doubt is that I know that GAE scales horizontally creating new jvm instances and I suppose that Appserver instances are isolated and independent.There's no distributed shared memory or anything like that.

But I am using collections to do some operations and at the end of the execution I noticed that the collections end with the total of records that were processed, which is strange because it seems that the jvms are sharing memory in some way, allowing me to use collections to store all the records processed, and they are not creating a new collection per each gae (jvm instance).

Any ideas?

Upvotes: 2

Views: 46

Answers (1)

George
George

Reputation: 1516

Scaling has been implemented to keep your app's service up-to-speed with incoming requests. At any given time, your application can be running on one or many instances with requests being spread across all of them. There is no particular or special processing on one instance, differing from the other, as all of these spun up instances process requests. Your collections are processed as if by one and the only application, irrespective of how many instances are needed to run in parallel, to keep up with traffic. Related detail can be found on the "How Instances are Managed" documentation page.

Upvotes: 1

Related Questions