Skip to content

Allow for configuring worker_connections #3371

Open
@sjberman

Description

@sjberman
Collaborator

As an NGF user
I want to be able to configure the worker_connections directive
So that I can run NGF at scale without needing too many nginx replicas

worker_connections sets the number of simultaneous connections that can be opened by an nginx worker process. Our default value is 1024. Users at scale may see the error [warn] 1180#1180: 1024 worker_connections are not enough, reusing connections, and therefore need to increase the number of allowed connections.

A workaround for this is to scale nginx to more replicas, but at certain scales, it may be more resource-friendly to increase this value instead of scaling replicas.

Acceptance

  • allow users to configure the worker_connections directive
  • likely a new field in the NginxProxy resource, to be set in the main nginx config

Activity

mpstefan

mpstefan commented on May 19, 2025

@mpstefan
Member

Makes sense.

Under what specific circumstances is increasing this number better than increasing the number of replicas? Do we run into this right away with one/two replicas, or is it a specific edge case?

sjberman

sjberman commented on May 20, 2025

@sjberman
CollaboratorAuthor

Here's the original discussion: #3368

added this to the v2.1.0 milestone on May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mpstefan@sjberman

        Issue actions

          Allow for configuring worker_connections · Issue #3371 · nginx/nginx-gateway-fabric