{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228/events","html_url":"https://github.com/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228","id":153140823,"number":228,"title":"Is it possible to programatically toggle on/off the session?","user":{"login":"aozarov","id":8921691,"avatar_url":"https://avatars.githubusercontent.com/u/8921691?v=3","gravatar_id":"","url":"https://api.github.com/users/aozarov","html_url":"https://github.com/aozarov","followers_url":"https://api.github.com/users/aozarov/followers","following_url":"https://api.github.com/users/aozarov/following{/other_user}","gists_url":"https://api.github.com/users/aozarov/gists{/gist_id}","starred_url":"https://api.github.com/users/aozarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aozarov/subscriptions","organizations_url":"https://api.github.com/users/aozarov/orgs","repos_url":"https://api.github.com/users/aozarov/repos","events_url":"https://api.github.com/users/aozarov/events{/privacy}","received_events_url":"https://api.github.com/users/aozarov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"janbartel","id":342406,"avatar_url":"https://avatars.githubusercontent.com/u/342406?v=3","gravatar_id":"","url":"https://api.github.com/users/janbartel","html_url":"https://github.com/janbartel","followers_url":"https://api.github.com/users/janbartel/followers","following_url":"https://api.github.com/users/janbartel/following{/other_user}","gists_url":"https://api.github.com/users/janbartel/gists{/gist_id}","starred_url":"https://api.github.com/users/janbartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janbartel/subscriptions","organizations_url":"https://api.github.com/users/janbartel/orgs","repos_url":"https://api.github.com/users/janbartel/repos","events_url":"https://api.github.com/users/janbartel/events{/privacy}","received_events_url":"https://api.github.com/users/janbartel/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-05-04T23:46:01Z","updated_at":"2016-05-09T06:30:18Z","closed_at":null,"body":"/cc @gregw "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/comments/217785634","html_url":"https://github.com/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228#issuecomment-217785634","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/appengine-java-vm-runtime/issues/228","id":217785634,"user":{"login":"janbartel","id":342406,"avatar_url":"https://avatars.githubusercontent.com/u/342406?v=3","gravatar_id":"","url":"https://api.github.com/users/janbartel","html_url":"https://github.com/janbartel","followers_url":"https://api.github.com/users/janbartel/followers","following_url":"https://api.github.com/users/janbartel/following{/other_user}","gists_url":"https://api.github.com/users/janbartel/gists{/gist_id}","starred_url":"https://api.github.com/users/janbartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janbartel/subscriptions","organizations_url":"https://api.github.com/users/janbartel/orgs","repos_url":"https://api.github.com/users/janbartel/repos","events_url":"https://api.github.com/users/janbartel/events{/privacy}","received_events_url":"https://api.github.com/users/janbartel/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T06:30:18Z","updated_at":"2016-05-09T06:30:18Z","body":"Both the backoff interval (50ms) and the backoff attempts (10) appear to have been hardcoded in the com/google/apphosting/runtime/jetty9/SessionManager.java \r\n\r\nThe SLAs for GCloudDataStore say a client should do a retry of max initial interval of 1 sec and backoff up to 32 sec - obviously for a webapp that uses sessions having the container potentially having to wait up to 32 sec for each each request to finish would be awful for latency and also eventually throughput.\r\n\r\nI should also mention that there is an async variant of the gcloud session data store: [DeferredDatastoreSessionStore.java](https://github.com/jetty-project/appengine-java-vm-runtime/blob/master/appengine-managed-runtime/src/main/java/com/google/apphosting/runtime/DeferredDatastoreSessionStore.java).  That appears to use a task queue to queue up session writes to the gcloud datastore. It appears to be enabled if appengine-web.xml contains asyncSessionPersistence=true, but I'm not sure if that is something that the user has to enable, or something that the infrastructure generates, or even if that api is still offered by the gcloud datastore.\r\n"}}