Recommend increasing keepalive_requests in nginx config · Issue #22141 · dotnet/AspNetCore.Docs (original) (raw)
Our sample nginx configuration in https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0#configure-nginx does not configure a keepalive_requests to be higher than its default value of 1000: http://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests
In older versions of nginx, this defaulted to 100 leading to even worse perf. We should consider increasing this (to Int32.MaxValue?) in our sample config. It might be worth consulting with nginx experts about why the default is lower. But in YARP for example, there is no per-connection request limit by default.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: dcdd2c35-bf2b-2673-d150-303a8aaa54d2
- Version Independent ID: 815fe034-c9fc-aee3-a8b5-f2e860b30302
- Content: Host ASP.NET Core on Linux with Nginx
- Content Source: aspnetcore/host-and-deploy/linux-nginx.md
- Product: aspnet-core
- Technology: aspnetcore-hostdeploy
- GitHub Login: @Rick-Anderson
- Microsoft Alias: riande