Hello,

By going through the details you provided and relevant documentation for 
the settings [1,2], I believe the configuration for both are same. During 
my research, I am yet to find any reason to believe that App Engine takes 
more time for the connection. Just wondering, are you able to test it using 
the public IP? Did you find any connection drop from App Engine in the 
logs?    

[1] 
https://cloud.google.com/sql/docs/postgres/connect-app-engine-standard#configuring
[2] https://cloud.google.com/sql/docs/postgres/connect-run#configuring

On Thursday, October 29, 2020 at 10:20:22 AM UTC-4 jonmiddl...@gmail.com 
wrote:

> Is it expected that AppEngine Standard performs significantly slower than 
> Cloud Run when a connection to Cloud SQL (Postgres) is involved?
>
> Testing whether to move away from AWS and which GCP solution to move to 
> and have fired up instances of Cloud Run and AppEngine to test a NestJS API.
> Having added logging to isolate just the time taken to query the DB as 
> part of an API call, the same GET request that takes 400ms query time on 
> average in Cloud Run takes 2100ms in AppEngine.
> To clarify this is the same source, same build deployed to both and these 
> are the times once warm so I'm excluding the first few requests.
>
> For any code not talking to my Cloud SQL instance, i.e. a dummy javascript 
> method to chew up some CPU time, the performance is more or less identical
>
> Cloud SQL, AppEngine and Cloud Run are all set up in the same region 
> (australia-southeast1), and connection from GAE and Cloud Run to Cloud SQL 
> is for both via Private IP and Serverless VPC.
>
> Since I'm in free tier whilst trialing my options, I tried chat support 
> and basically got down to (verbatim) "cloud run is design to handle data 
> from apis with cloud sql" while "app engine is recommended for webhosting".
>
> I'm assuming this is wrong and and a 3-5x slower query performance to 
> Cloud SQL from GAE isn't an expectation? Any pointers in terms of where 
> this may be failing?
> I haven't yet tried via Public IP and wasn't keen to but I will likely 
> repeat my tests on both to see if that makes any difference and post my 
> updates here.
>
>

-- 
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/8d0554cf-8cc3-4ac9-a9a3-7ed31d32a5d5n%40googlegroups.com.

Reply via email to