douchunji1885 2015-11-26 07: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 08: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.

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

报告相同问题?

悬赏问题

  • ¥50 代码还没怎么运行但是需要代码功能调用数据
  • ¥15 vue请求不到数据,返回状态200,数据为html
  • ¥15 访问url时不会自动调用其 Servlet的doGet()
  • ¥15 用白鹭引擎开发棋牌游戏的前端为什么这么难找
  • ¥35 哪位专业人士知道这是什么原件吗?哪里可以买到?
  • ¥15 关于#c##的问题:treenode反序列化后获取不到上一节点和下一节点,Fullpath和Handle报错
  • ¥15 一部手机能否同时用不同的app进入不同的直播间?
  • ¥20 输入import torch显示Intel MKL FATAL ERROR,系统驱动1%,: Cannot load mkl_intel_thread.dll.
  • ¥15 点云密度大则包围盒小
  • ¥15 nginx使用nfs进行服务器的数据共享
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部