Hi - I'm currently trialing GCP considering a lift and shift from AWS, with a POC being a Nest.JS app stateless HTTP talking to a Postgres instance hosted in Cloud SQL.
I've set up the same source code, same build on both Cloud Run and GAE Standard in the same region as the Cloud SQL isntance (australia-southeast1). In my testing I'm seeing my API calls being 3-5x slower on GAE than Cloud Run. After digging deeper the connection to Cloud SQL appears to be the culprit. When creating a controller that doesn't do any DB calls and simply does some complex CPU crunching stuff, the response time is basically identical once warm. I added logging to isolate the pure query time, and from the logs for my 'real' controllers that talk to Cloud SQL for a complex endpoint I am getting an average of 400ms on Cloud Run and 2100ms on GAE. Same endpoint + query, same DB, same build. Cloud SQL is set up as Private IP with a Serverless VPC that is set up in the correct region, and works nicely for Cloud Run. Given I'm on the free tier whilst trialing I tried chat support and the outcome was (verbatim) that cloud run "is design to handle data from api with cloud sql", whilst GAE "is recommended for webhosting". I'm assuming the above info is incorrect and that there's some sort of performance bottleneck going on here - any pointers as to what that could be? I haven't yet tried via Public IP but might repeat the test on both Cloud Run and GAE via Public to see if that makes any difference, but not keen to do that in Prod. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/a7dd55f2-81ba-4cef-b4af-180c718078d8n%40googlegroups.com.
