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> 
   
<https://cloud.google.com/appengine/docs/standard/java/config/appref#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. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/87e34e4f-faa1-4246-afab-e731a69b5df1n%40googlegroups.com.

Reply via email to