You are very correct, as described in the previously linked Stack Exchange answer, <https://serverfault.com/questions/873497/502-connection-refused-while-connecting-to-upstream-modify-nginx-upstream-on-g>nginx health checks are indeed the same health checks that are configurable via your app.yaml file <https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#health_checks>.
To clarify, each App Engine instance has its own nginx container running in it that monitors the health of its own instance. So starting more instances will not fix the issue for any single instance. As mentioned in the solutions provided in the previously linked Public Issue Tracker <https://b.corp.google.com/issues/36081250>, you could instead try increasing your instances' Resource Settings <https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#resource-settings> to make them more powerful. By increasing an instance's CPU, you are allowing your application code to finish faster, and in turn allow it to respond to nginx faster. Though as mentioned in the same Public Issue Tracker this is not the actual solution, and the solution is to code your application to handle async requests <https://blog.risingstack.com/node-hero-async-programming-in-node-js/>. By allowing a single instance to handle more than one request at a time, you are freeing up CPU time for health checks. Of course you can always completely turn off the nginx health checks <https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#health_checks>, but ideally you want to code your application for the Cloud to make it scalable and responsive. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/4ac15881-d3bd-49e3-a064-04be88bdc071%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
