【发布时间】:2018-12-12 04:53:14
【问题描述】:
我在 Azure 上部署的 MVC 应用服务遇到问题。 我的 MVC 操作方法接收请求并依赖查询字符串中的参数,它执行到外部 URL 的重定向。 通常的响应时间是毫秒,但有时有些请求的响应时间确实更长:
action方法很简单,没有太多逻辑,总结如下:
public ActionResult performRedirect(string id)
{
System.Diagnostics.Trace.TraceInformation("start");
if (id == "1")
return Redirect("http://URLA");
else if (id == "2")
return Redirect("http://URLB");
else
return Redirect("http://URLC");
}
我的应用程序使用 ApplicationInsights,因此我对其进行了分析,我发现每当有“慢”请求时,操作方法处理请求的时间与诊断跟踪“开始”之间存在某种延迟(最多 10 秒!)。
我的问题是:为什么会这样?是因为对无法管理的操作的请求增加,因此有一个传入队列要清空?我应该提高资源的性能吗(现在我使用的是带有 2 个实例的 S1)?
【问题讨论】:
标签: azure azure-application-insights throttling