如何确定网站缓慢的原因?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (11)

I was asked this question once at an interview:

"Suppose you own a website where the server is at some remote location. One day, some user calls/emails you saying the site is abominably slow. How would you identify why the site is slow? Also, when you check the website yourself as any user would (using your browser), the site behaves just fine."

I could think of only one thing (which was shot down):

  • Check the server logs to analyse incoming traffic. Maybe a DoS attack or exceptionally high traffic. Interviewer told me to assume the server has normal traffic and no DoS.

I was kind of lost because I had never thought of this problem. I have almost no idea how running a server/website works. So if someone could highlight a few approaches, it would be nice.

在谷歌搜索时,我只能找到这篇相关的精彩文章。那篇文章现在对我来说太技术了,但我正在慢慢分解并理解它。

提问于
用户回答回答于

通常,用户将页面加载时间作为一种措施来发现站点很慢。但是如果你真的想知道花费最多时间的是什么,你可以按f12打开浏览器调试器。如果您的浏览器是Chrome,则单击网络并查看您的应用程序正在进行的调用以及哪些调用占用了最多时间。如果您使用的是Firefox,则需要安装firebug。如果你有,那么再次按f12并点击Net。

所属标签

可能回答问题的人

  • HKC

    红客学院 · 创始人 (已认证)

    26 粉丝7 提问5 回答
  • 西风

    renzha.net · 站长 (已认证)

    9 粉丝1 提问4 回答
  • Dingda

    Dingda · 站长 (已认证)

    4 粉丝0 提问3 回答
  • 螃蟹居

    1 粉丝0 提问2 回答

扫码关注云+社区

领取腾讯云代金券