Writing Files to Server

45 views
Skip to first unread message

Dennis Yurkevich

unread,
Aug 17, 2018, 1:16:19 PM8/17/18
to google-a...@googlegroups.com
Hello,

How does the scaling and distributed system work, for example if my server has and endpoint which I can hit to write a file with the data sent to it, my app is running on 2 instances, so my assumption is that the request hits just one instance and the file exists only on one?

Thanks!

Katayoon (Cloud Platform Support)

unread,
Aug 17, 2018, 6:23:48 PM8/17/18
to Google App Engine

Hi Dennis,


Each request will be routed to an instance and the data will be transmitted/addressed via the request, however you may use memcache which is a distributed RAM cache in which you can store transient data using a key-value model. For storing resident data, you may choose a storage option based on your use-case.

Dennis Yurkevich

unread,
Aug 18, 2018, 5:03:18 AM8/18/18
to google-a...@googlegroups.com
Thanks you Katayoon.

Just to confirm, if I write a file to my app, which is running on 2 instances using a POST requests to an express endpoint.

And in another request I try and fetch the same file - there is a 50% chance that the file will be found as it will reside on a single instance?

re-memcache, you mention transient, so the data here is stored just for a single user session?

On Fri, Aug 17, 2018 at 11:23 PM, 'Katayoon (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

Hi Dennis,


Each request will be routed to an instance and the data will be transmitted/addressed via the request, however you may use memcache which is a distributed RAM cache in which you can store transient data using a key-value model. For storing resident data, you may choose a storage option based on your use-case.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/9414102a-3e0f-4366-a208-079377d19e1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Katayoon (Cloud Platform Support)

unread,
Aug 20, 2018, 1:27:28 PM8/20/18
to google-a...@googlegroups.com

My assumption is that you want to update and read a hard-coded file in your app? If so, and if you have more than one instance of your app, there is no guarantee if you could fetch the same data (means your assumption is correct).


Note that the cache is global and is shared across the application's frontend, backend, and all of its services and versions. Session data is a good candidates for caching, however values can expire from the memcache at any time.


Dennis Yurkevich

unread,
Aug 21, 2018, 2:20:25 AM8/21/18
to google-a...@googlegroups.com
Thank you Katayoon.

On Mon, 20 Aug 2018 at 18:27, 'Katayoon (Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

My assumption is that you mean to update and read a hard-coded file in your app? If so, and if you have more than one instance of your app, there is no guarantee if you could fetch the same data (means your assumption is correct).


Note that the cache is global and is shared across the application's frontend, backend, and all of its services and versions. Session data is a good candidates for caching, however values can expire from the memcache at any time.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages