1

Memcache backs the OOTB session store for App Engine Standard Environment, yet App Engine Memcache does not work with Flexible Environment.

Documentation for configuring Flex Env says nothing about sessions.

Of course I could implement this myself, but sessions stores are basic to most fully functional application servers, including GAE Standard Environment. Can I get a session-store with some configuration and no coding?

Joshua Fox
  • 18,704
  • 23
  • 87
  • 147

2 Answers2

1

For session-store you could use Cloud Memorystore, which is a fully managed Redis service for GCP. Check how to set up and connect App Engine Flex with Memorystore.

As per documentation, Memcache service is currently not available for App Engine flexible environment, but you can apply for an early access alpha here.

In the same documentation are provided also two third party memcache services which you can configure and use with App Engine flexible environment:

  1. Redis Labs Memcache
  2. Redis Labs Redis
komarkovich
  • 2,223
  • 10
  • 20
  • Thnx. Right, i know that GAE Memcache doesn't work with Flex and others can be plugged in. But my question is whether there is an OOTB session store that works without any coding: configuration is ok. I.e., can I put objects in the session and they will be shared across instances automatically. – Joshua Fox Jun 04 '18 at 18:29
  • @JoshuaFox I edited my answer to better address your question. – komarkovich Jun 05 '18 at 07:32
  • Thank you. Could you please confirm that the session-store works when one has implemented Redis as you say? I ask because of the extreme lack of clarity around the session-store. It is not mentioned in the docs that you point to and even in discussion with the Google team the answers are unclear https://groups.google.com/d/msg/google-appengine/PmvpZyL7Cbw/GhmlspsnBgAJ – Joshua Fox Jun 05 '18 at 12:09
  • I can not confirm that it works since I haven't tested it out but in the documentations [here](https://cloud.google.com/memorystore/docs/redis/redis-overview#what_its_good_for) is stated, that it's used for session management. – komarkovich Jun 05 '18 at 12:51
  • Thank you. It says that Redis can be used for Session Mgmt, but not that it works this way OOTB. So, I guess we can make it work if we have to, but it would good to get that confirmation. Further, we'd want Session Mgmt to work cleanly with the same shared state across Flex *and* Standard Environment. – Joshua Fox Jun 05 '18 at 18:56
1

Out of the box session-store for App Engine Flex is currently not featured, as opposed to App Engine Standard which has this option when using Java, while Flex has the same behavior for all runtimes, with no expected differences between them.

Should you consider OOTB session-store for App Engine Flex a feature that should be added to its functionalities, please file a feature request by going through this link.

As @komarkovich pointed out, you can use Cloud Memorystore to manage sessions and perform session-store operations, however the OOTB functionality that you request is not present there either. Using DB backends such as Redis or Datastore can also manage

For a more integrated approach, you can use Firebase user session management to manage your sessions. I am not a Firebase expert myself, so I would not be able to help you further on that side, but there are good people on this community (such as Frank van Puffelen) that can help you should you have any doubts about using it.

Rodrigo C.
  • 1,114
  • 7
  • 13