Why does the latency of my GAE application support static files so high?

I tested the performance of my Go application on GAE, and I thought the response time to the static file was pretty high (183 ms). It? Why is this? What can i do with this?

64.103.25.105 - - [07/Feb/2013:04:10:03 -0800] "GET /css/bootstrap-responsive.css HTTP/1.1" 200 21752 - "Go http package" "example.com" ms=183 cpu_ms=0 
+4
source share
3 answers

A β€œnormal” 200 ms seems to be on the high side of things for static files. I am serving a static version of the same "bootstrap-responsive.css" from my application, and I see two types of responses:

  • 50-100 ms (most of the time)
  • 150-500 ms (sometimes)

Since I have a roundtrip ping of more or less 50 ms for the Google App Engine, it seems the file usually arrives within 50 ms or so.

I would suggest that the response time of 150-300 ms is associated with the external interface of the Google application server, the "cold cache". I suggested that retrieving a file from some persistent storage is associated with higher latencies than if it is in the frontend cache server.

I also suggest that you can hit different frontend servers and get sporadic higher latencies.

Finally, the total perceived latency in the browser should be closely approximated: (tc) ping round trip + tcp / http queue / buffering on the frontend server + file submission time (as shown in your Google application logs) + time to transfer the file.

If the external server is not overloaded and the file is small, the wait time should be close to ping + maintenance time.

In my case, 50 ms (ping) + 35 ms (maintenance) = 85 ms, pretty close to what I see in my browser 95 ms.

Finally, if your application is serving a lot of requests, they may be queued, representing a delay that is not β€œvisible” in the application logs.

+1
source

For comparison, I tested the site using tools.pingdom.com

Pingdom reported a loading time of 218ms

Here is the result from the logs:

 2013-02-11 22:28:26.773 /stylesheets/bootstrap.min.css 200 35ms 45kb 

Another test, the result of which is 238ms from Pingdom and 2ms in the logs.

Therefore, I would say that your 183ms seems relatively good. There are so many factors in the game:

  • Your server location
  • Is the server serving the resource overloaded?

You can try serving files using a Go instance instead of a static App Engine file server. I tested this a while ago, the results were occasionally faster, but the speed was less consistent. Response time also increases under load, because the App Engine instance is limited to 10 concurrent requests . Not to mention the fact that you will be billed for the time of participation.

Edit:

For comparison with other Cloud / CDN providers, see Cedexis - Free Country Reports

+1
source
0
source

All Articles