0

I have a number of nodejs scripts that simply perform a couple of sql database queries and return the results to the user.

When running locally, they will take an average of 30ms to run, but on google app engine the average time is about 6s. Example: enter image description here

I have verified that this is not due to server start up time. Also, I know requests that run more frequently should be faster, and the server is not very busy, but 6s still seems a bit on the high side especially compared to the local run time.

What are some things that could generally contribute to the long running time.

Jeph
  • 1,738
  • 1
  • 9
  • 9
  • What kind of App Engine instance are you using? (flexible or standard), Sometimes performance issues are related to resources settings, what are the settings you are using on your local environment? – Harif Velarde Nov 20 '19 at 18:57
  • Potentially of interest: https://stackoverflow.com/a/47467355/4495081, https://stackoverflow.com/a/41390857/4495081 – Dan Cornilescu Nov 21 '19 at 04:17
  • @HarifVelarde, using the standard environment, F2 instance class. I'm not sure the specific settings you refer to though. Using a regular nodejs server locally to test. Default options. – Jeph Nov 21 '19 at 22:05
  • Sometimes this scenario is related to the zone where you app engine is deployed, is not the same have your instance deployed on us-central and your database located in asia, nevertheless, I suggest you check compare the resources used in your local environment vs the resources on your app engine, and check if your instance is not reaching the limit of memory. – Harif Velarde Nov 28 '19 at 18:42

0 Answers0