Can a single App Engine Standard Java 11/17 web process handle multiple concurrent requests?

348 views
Skip to first unread message

William Linna

unread,
Jul 28, 2022, 12:35:57 PM7/28/22
to Google App Engine
Hello,

I'm using App Engine Standard with Java 11. My app is packaged as a JAR and it doesn't use legacy bundled services. I have set manual scaling to 1. Now my question is can that one instance handle multiple concurrent requests? According to the documentation, it seems like it cannot.

https://cloud.google.com/appengine/docs/standard/java-gen2/how-requests-are-handled
  • 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.

Andrés Márquez

unread,
Aug 2, 2022, 4:25:00 PM8/2/22
to Google App Engine

William Linna

unread,
Aug 3, 2022, 10:16:11 AM8/3/22
to Google App Engine
Thanks for the people who responded.

It seems that the documentation has been fixed, and no longer states that each web server processes only one request at a time etc.

I no longer need help with this issue
Reply all
Reply to author
Forward
0 new messages