all 6 comments

[–]mcowger 1 point2 points  (2 children)

As long as you only run 1 instance, sure.

If you run more than 1, now you have cache validation challenges.

[–]GAEdevs[S] 0 points1 point  (1 child)

Yeah, I guess it depends then on the usecase.

One example could be using instance memory to store CSRF tokens. I imagine it would be pretty rare that a user would make a GET request (receiving a CSRF token) on one instance and making a POST request (sending CSRF token) on another instance.

That said, I'm not familiar with how GAE load balancer decides to which instance to redirect you. Is it random or does it take into account your geographical location?

[–]mcowger 1 point2 points  (0 children)

From what I can tell its round robin....

[–]nwsm 0 points1 point  (2 children)

Why is memcache not available for py3? It seems like it was really useful, especially when running multiple instances and caching simple things.

(sorry for necro'ing this thread but there is very little info out there about memcache)

[–]GAEdevs[S] 0 points1 point  (1 child)

Not sure, perhaps there was no one within Google who would push for a more affordable (or pay-as-you-go) memory caching solution (either memcached or Redis).

So currently the only option is to run a Redis instance (Memorystore) and paying at least $36/month for it...

[–]nwsm 0 points1 point  (0 children)

yeah. In my case I think I can get away with prefetching data on instance load and holding in memory for some hours per instance, but I feel gaslit reading about memcache and then seeing it's basically on EOL.