Sitelet https://github.com/nodejs/node/issues/46606
Skip to content

Make it possible to set Response/Request highWaterMark on http.Server #46606

Description

@ronag

It would be helpful to have an option on http.createServer that sets the highWaterMark on all sockets created. The default highWaterMark is IMHO kind of low for most modern server hardware...

Activity

  1. added
    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
    httpIssues and PRs related to the http subsystem.
    feature requestIssues requesting new Node.js features.
    on Feb 10, 2023
  2. ronag commented on Feb 10, 2023

    @ronag
    MemberAuthor

    @nodejs/performance

  3. changed the title [-]Make it possible to set ServerResponse/Request high water mark on Server[/-] [+]Make it possible to set `ServerResponse/Request` `highWaterMark` on `http.Server`[/+] on Feb 10, 2023
  4. changed the title [-]Make it possible to set `ServerResponse/Request` `highWaterMark` on `http.Server`[/-] [+]Make it possible to set `Response/Request` `highWaterMark` on `http.Server`[/+] on Feb 10, 2023
  5. mcollina commented on Feb 10, 2023

    @mcollina
    SponsorMember

    I think we can safely increase it. Maybe bring it to 32KB both ways?

  6. ronag commented on Feb 10, 2023

    @ronag
    MemberAuthor

    I think we can safely increase it. Maybe bring it to 32KB both ways?

    #46608 does takes us some of the way but I think it's varies from case to case how high one can go, e.g a large amazon instance vs a raspberry pi.

  7. benjamingr commented on Feb 10, 2023

    @benjamingr
    Member

    Was about to repeat what Matteo said - can we just increase it?

    If we can't do it safely across all envs - can we just increase it based on some parameter of the system?

  8. ronag commented on Feb 10, 2023

    @ronag
    MemberAuthor

    Some push back in #46608

  9. HinataKah0 commented on Mar 22, 2023

    @HinataKah0
    Contributor

    Hi,
    I am interested to work on the changes.

    What I have tried,

    Option 1:

    1. Store the new opt in storeHTTPOptions
    2. Set it when calling IncomingMessage
    3. Set it when calling ServerResponse, similar to setting kUniqueHeaders

    Draft Commit

    Option 2:

    Set both (readable|writable)HighWaterMark when creating a new Socket.

    Draft Commit

    I'll open a PR. If this is no longer needed, please close it. 😄
    Thanks!

  10. moved this from Awaiting Triage to Done in Node.js feature requestson Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.httpIssues and PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions