http - 我的 Azure 网站在(监视器)门户中有一个奇怪的 "HTTP success"模式

标签 http azure azure-web-app-service

我在 Azure 网站中托管了一个网站,作为基本层网站。 我目前正处于开发阶段,但该网站已上线并可供外界访问(至少在基础级别),因此我想更好地了解 Azure 管理门户中的监视功能。

当我查看门户内的监控选项卡时,我看到 HTTP 成功 的奇怪模式。看看过去的60分钟(我个人并没有积极参与),HTTP成功是非常循环的,有80个连接,那么0,然后40,然后0,然后重复。

Azure portal - Monitor

有谁能告诉我如何找出 8040 连接是什么。我的代码中当然没有任何定时事件,因此除非有人实际访问该网站,否则不应进行任何调用。

更新:

我设置了一个临时服务器并阻止了除我自己的 IP 之外的所有传入流量。因此,相同的代码可以运行,只是不需要外界访问。仅当我自己访问服务器时才会出现 HTTP success (如预期)。这表明我的网站可能受到外部机器人的攻击? 有人知道如何防止这种情况吗?或者至少诊断请求是否不合法等?

最佳答案

我想说正是这个设置导致了流量:

Always On. By default, websites are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the site loaded all the time. If your site runs continuous web jobs, you should enable Always On, or the web jobs may not run reliably

http://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/

这只是为了避免您或其他人每次访问您的网站时冷启动。

<强> Here's描述此行为的另一个引用:

What the always-on feature does is simply ping your site every now and then, to keep the application pool up and running.

Scott Gu says :

One of the other useful Web Site features that we are introducing today is a feature we call “Always On”. When Always On is enabled on a site, Windows Azure will automatically ping your Web Site regularly to ensure that the Web Site is always active and in a warm/running state. This is useful to ensure that a site is always responsive (and that the app domain or worker process has not paged out due to lack of external HTTP requests).

关于一般流量:首先,请求实际上只能来自 Microsoft,因为使用 Azure 网站时,任何类似的流量模式都会很快被自动检测到并阻止 - 您无法设置自己也像这样保持活力。其次,任何现代机器人都不会以这种规律定期 ping 特定页面,因为这一切都是显而易见的。任何现代数据中心安全设备都会捕获此类流量并阻止/忽略/取消路由。

至于您有关保护和安全的问题:Microsoft 无法保护您的代码免受您的侵害。然而,外围的一切都由 Microsoft 管理和处理。这是 Azure 的 USP 功能之一 - 防火墙、负载平衡、欺骗、反机器人和 DDOS 保护等。当然,任何公开的服务总会存在安全问题,但您可以专注于您的应用程序,而 Microsoft 则负责管理其余部分.

运行 Azure 网站时,您的应用程序范围之外的安全问题将由 Microsoft 负责。这是一件很棒的事情,但如果您确实希望能够使用其他安全措施,则必须设置虚拟机并从那里运行您的网站。

关于http - 我的 Azure 网站在(监视器)门户中有一个奇怪的 "HTTP success"模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27854237/

相关文章:

ubuntu - 使用现有的 Azure 安装作为 Vagrant 的框

azure - 日志分析用户定义函数返回 'Body of the callable expression cannot be empty'

azure - 我在 Azure Linux WebApp 上部署的 .netcore 2.1 MVC 中的通知

azure - 使用 IP 地址而不是主机名访问 azure 应用程序服务

iPhone HTTP 服务器

php - 无法从 Laravel 应用程序连接到 Azure MySQL

linux - "curl: (48) An unknown option was passed in to libcurl"

azure - 无需用户交互即可从 Azure 第一方应用程序获取访问 token

使用 Arduino ESP8266 SparkFun Shield 进行 HTTP POST

http - 我应该在我的 REST API 中使用 PATCH 还是 PUT?