- By default, each web server processes only one request at a time. To dispatch
multiple requests to each web server in parallel, mark your application as
threadsafe by adding a <threadsafe>true</threadsafe>
element to your appengine-web.xml file.
However, that appengine-web.xml only appears in examples with legacy bundled services. I haven't seen any documentation on how to set up appengine-web.xml for JAR-packaged apps, only for WAR-packaged apps. manual_scaling doesn't allow setting max_concurrent_requests either. app.yaml doesn't support threadsafe-setting.
This is different from envs such as PHP and Go where docs explicitly state that "An instance can handle multiple requests
concurrently.".
What should I do? I can't use multiple instances, because I depend on a little bit of state, which is what manual scaling is supposed to afford me.
- Instances remain in memory and state is preserved across requests.