douchunji1885 2015-11-26 15:50
浏览 74
已采纳

Appengine中的go语言太慢TTFB(延迟)

Check this ttfb

I'm testing go lang in appengine. But it's too slow response. I've checked with chrome and found that the problem is 'Waiting(TTFB)'

The source code is very simple and official example(https://github.com/GoogleCloudPlatform/appengine-try-go).

What's wrong? Is this normal?

  • 写回答

1条回答 默认 最新

  • dsdxlibt98300 2015-11-26 16:02
    关注

    Local test performance has nothing to do with production performance. There is nothing wrong with what you see.

    Usually first requests are slower than subsequent ones as the AppEngine SDK performs file system scans, compiling and first-time loading and execution of package init() functions of your application's code.

    What you see is a 1-second Waiting (TTFB) time, it stands for Time To First Byte (source):

    Time spent waiting for the initial response, also known as the Time To First Byte. This time captures the latency of a round trip to the server in addition to the time spent waiting for the server to deliver the response.

    This 1 second TTFB most likely includes all the tasks I listed above the SDK has to perform, which isn't so bad if you think about that.

    Don't worry, production environment runs "pre-compiled" native binary code, none of these have to be performed and you will see most likely a response time (TTFB) around 20-30 ms.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog