Limit concurrent requests in Azure App Service

后端 未结 1 383
时光说笑
时光说笑 2021-01-16 02:48

Given the following

  • ASP.NET Web API application
  • Target: .NET Framework 4.6.1
  • Hosted as Azure App Service

I wish to restrict th

相关标签:
1条回答
  • 2021-01-16 03:30

    This is to avoid attacking a backend service in counterproductive ways.

    To avoid the attack, you could restrict the concurrent requests using Dynamic IP Restrictions. If the concurrent requests count is larger than the setting value, the IP address will be blocked.

    <system.webServer>
      <security>
        <dynamicIpSecurity>
          <denyByConcurrentRequests enabled="true" maxConcurrentRequests="30"/>
          <denyByRequestRate enabled="true" maxRequests="30" requestIntervalInMilliseconds="2000"/>
        </dynamicIpSecurity>
      </security>
    </system.webServer>
    

    For more information, link below is for your reference.

    Configuring Dynamic IP Address Restrictions in Windows Azure Web Sites

    0 讨论(0)
提交回复
热议问题