小编Tim*_*Tim的帖子

如何调试服务器响应时间慢?

使用此处描述的方法来测量服务器响应时间,我可以看到time_appconnecttime_pretransfer、 和time_starttransfer非常高,但仅限于通过 HTTPS 访问网站时。

相比之下,连接到 Google 的速度非常快。

curl -w "@curl-format.txt" -o /dev/null -s "https://www.google.com"
Run Code Online (Sandbox Code Playgroud)

回报

time_namelookup:     0.014433
time_connect:        0.117187
time_appconnect:     0.374567
time_pretransfer:    0.374779
time_redirect:       0.000000
time_starttransfer:  0.513398
                     ----------
        time_total:  0.514880
Run Code Online (Sandbox Code Playgroud)

通过 HTTP 连接到我们的网站也相当快:

curl -w "@curl-format.txt" -o /dev/null -s "http://environmentaldashboard.org"
Run Code Online (Sandbox Code Playgroud)

回报

time_namelookup:    0.004136
time_connect:       0.044469
time_appconnect:    0.000000
time_pretransfer:   0.044554
time_redirect:      0.000000
time_starttransfer: 0.166275
                  ----------
      time_total:  0.166404
Run Code Online (Sandbox Code Playgroud)

但是通过 HTTPS 连接非常慢:

curl -w "@curl-format.txt" -o /dev/null -s "https://environmentaldashboard.org"
Run Code Online (Sandbox Code Playgroud)

回报

time_namelookup:    0.005211
time_connect:       0.057697 …
Run Code Online (Sandbox Code Playgroud)

networking performance https response-time

5
推荐指数
1
解决办法
6003
查看次数

标签 统计

https ×1

networking ×1

performance ×1

response-time ×1