Google App engine latency issue

474 views
Skip to first unread message

vaishnavesh shukla

unread,
Aug 10, 2016, 3:31:22 AM8/10/16
to Google App Engine
I am executing a blank PHP file and looked into trace. It takes approximately 25MS to 33MS. I want this upto 2MS. Please let me know can I reduce this server execution time.
I am using instance class "B8".

Nicholas (Google Cloud Support)

unread,
Aug 10, 2016, 10:41:12 AM8/10/16
to Google App Engine
While I can appreciate the desire to accelerate response times for one's application, 2 milliseconds is hardly enough time for an HTTP request to hit the Google Front End, traverse the internal network infrastructure, GAE front end, GAE load balancer, an instance of your application, be responded to and have the HTTP response head back to the requester.

25-33ms response time is very appropriate for any managed server executing an empty PHP script.  If you really need to cut that down further, you may be able to reduce to this somewhat using a compiled language like Golang or Java and also ensuring the instances are ready to serve prior to receiving requests.  Though published in 2013, this talk about golang shows how Go on App Engine really shines for performance critical applications.

Please note that an empty PHP script is not a very effective benchmark for evaluating performance.  The class of the instance will not affect the performance with such a use case.  I would strongly suggest defining specific tasks that need to be performed by your application handling an HTTP request, implementing them in a few runtimes, testing locally and then testing on the platform.  This may provide more useful insight.

If you don't mind me asking, what requires your application to have 2ms response time or what service boasts such a response time?

Qi Ke

unread,
Aug 10, 2016, 5:11:25 PM8/10/16
to Google App Engine
Is this the latency for the first request or average? The first request is usually slower because it needs to wait for GAE to spin up new instance to serve your request.
Reply all
Reply to author
Forward
0 new messages