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 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办