Does Google App Engine support session_affinity in the java flexible environment?

I have enabled the

network:
  session_affinity: true

in my app.yaml but it doesn't work neither it's shown enabled when viewing the configuration by going to App Engine > Versions > Config > View.

Here is what I get there:

runtime: java

api_version: '1.0'

env: flexible

threadsafe: true

handlers:

  - url: /.*

    script: 'this field is required, but ignored'

automatic_scaling:

  min_num_instances: 2

  max_num_instances: 20

  cpu_utilization:

    target_utilization: 0.5

network: {}

resources:

  cpu: 1

  memory_gb: 4

  disk_size_gb: 10

I'm using Spring Boot 2.1 btw.


Solution 1:

Session affinity is a Beta feature. In order to use this feature you need to deploy with the beta command.

gcloud beta app deploy

After the deployment completes, you should see the below line in your config view.

network: session_affinity: true