How to reduce server response time for Google AppEngine

google-app-enginegoogle-cloud-platform

I have a Rails 5 app running on AppEngine. Everything works, except it's responding slowly according to PageSpeed Insights. Running on my own server I achieved a PageSpeed score of 100/100 for mobile and desktop, but when it's running on AppEngine it dings me for "Reduce server response time". I've tried increasing the instance type to F4, disabling threadsafe, been up and down the google results, and not sure what else to try.

Best Answer

Changing your instance type and threading configuration will only help in a situation where the instance cannot handle your application's resource needs.

You're not very clear on which requests are slow, and by how much. Using the developer mode of your browser (F12 in chrome) you can obtain traces that show you how long each request takes to complete so you can identify the ones that are excessively slow. On the GCP side you can use Cloud Trace to time the execution time of requests by your application and help you figure out where the issue lies.

This should give you a better idea of where to look for improvements.

Related Topic