镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Update HTTP/2 server settings after .listen() #35353

Description

@szmarczak

Is your feature request related to a problem? Please describe.

Currently it is possible to create an HTTP/2 in the following way:

const server = http2.createSecureServer({
	settings: {
		maxConcurrentStreams: 1000
	},
	key,
	cert
});

Let's assume you're having a server and it detected it's low on resources. Limiting maxConcurrentStreams could have a positive impact. Unfortunately it's not possible at the moment.

Describe the solution you'd like

server.updateSettings({
	maxConcurrentStreams: 100
});

Describe alternatives you've considered

None yet.

Activity

  1. szmarczak commented on Sep 25, 2020

    @szmarczak
    ContributorAuthor

    A very sketchy workaround looks like this:

    	const kOptions = Object.getOwnPropertySymbols(server).find(x => x.toString() === 'Symbol(options)');
    	server[kOptions].settings = {maxConcurrentStreams: 100};
  2. added
    feature requestIssues requesting new Node.js features.
    http2Issues and PRs related to the http2 subsystem.
    on Sep 26, 2020
  3. grayparser commented on Sep 26, 2020

    @grayparser

    @ZYSzys I'll take this issue, if nobody is working on it

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.http2Issues and PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions