Skip to content

Recommend increasing keepalive_requests in nginx config #22141

@halter73

Description

@halter73

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.

@sebastienros @Tratcher


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Labels

RRRick-Anderson needs to review this periodicallySource - Docs.msDocs Customer feedback via GitHub Issuedoc-bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions