In the flexible environment, App Engine doesn't provide built-in support for distributed sessions like it does in the standard environment with Memcache.
So after migrating to Flex, I am unable to autoscale the application anymore as the user session cannot be routed from an instance to another like it was in Standard.
We should specify a Session Storage (eg: Redis) to have the user sessions shared between all the instances.
I looked at this google documentation https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml but it didn't helped me.
Any ideas ?
Spring Session makes it very simple !
Include the
spring-session-core&spring-session-data-redislibraries into yourpom.xmlfileConfigure your redis configuration. 2 ways exist here
Put the below into your
application.propertiesSpring will automatically create the session in redis instead of the memory store as shown below