Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/net/http2: deprecate WriteScheduler #67817

Open
Tracked by #67810
neild opened this issue Jun 4, 2024 · 0 comments
Open
Tracked by #67810

proposal: x/net/http2: deprecate WriteScheduler #67817

neild opened this issue Jun 4, 2024 · 0 comments
Labels
Milestone

Comments

@neild
Copy link
Contributor

neild commented Jun 4, 2024

This issue is part of a project to move x/net/http2 into std: #67810

The http2.WriteScheduler interface type defines a scheduler used to select the order in which data is written to HTTP/2 streams. The Server.NewWriteScheduler configuration setting selects a write scheduler to use for server connections. Client connections do not permit configuring the write scheduler.

The package includes three implementations of this interface: Round robin (the default), random, and priority. The priority write scheduler is known to be buggy and the HTTP/2 stream prioritization scheme it implements is deprecated; see #58804 (comment).

Support for user-defined write schedulers is used seldom, if ever, and substantially constrains the HTTP/2 implementation.

Users should not need to configure the HTTP/2 implementation at this level. Of the current set of scheduler options, there is a clear correct choice: The round robin scheduler outperforms the random scheduler, and the priority scheduler is buggy and we have no plans to fix it. If we come up with a better scheduler, we should just make it the default. If we do discover a reason for users to configure this, we can and should provide a simpler configuration setting than what exists now.

I propose deprecating the write scheduler selection mechanism, consisting of the following types and functions:

  • FrameWriteRequest
  • NewPriorityWriteScheduler
  • NewRandomWriteScheduler
  • OpenStreamOptions
  • PriorityWriteSchedulerConfig
  • Server.NewWriteScheduler
  • WriteScheduler

I propose that we add a deprecation notice to these types and functions today, and remove support for them in one year. After removing support, servers will ignore the value of the NewWriteScheduler field.

@gopherbot gopherbot added this to the Proposal milestone Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Incoming
Development

No branches or pull requests

2 participants