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: add "SETTINGS_NO_RFC7540_PRIORITIES" #69917

Open
Colduction opened this issue Oct 16, 2024 · 7 comments
Open

proposal: x/net/http2: add "SETTINGS_NO_RFC7540_PRIORITIES" #69917

Colduction opened this issue Oct 16, 2024 · 7 comments
Labels
Milestone

Comments

@Colduction
Copy link

Colduction commented Oct 16, 2024

Proposal Details

According to RFC 9217: Section 2, P1, the SETTINGS_NO_RFC7540_PRIORITIES is now a known setting in SETTINGS frame.

It is also used in Firefox 132.0-b8 (Dev channel), if you could add it in net/http2 for devs who have experimental usages, that would be awesome.

Like listing it's ID beside other settings here:

// A SettingID is an HTTP/2 setting as defined in
// https://httpwg.org/specs/rfc7540.html#iana-settings
type SettingID uint16

const (
	SettingHeaderTableSize      SettingID = 0x1
	SettingEnablePush           SettingID = 0x2
	SettingMaxConcurrentStreams SettingID = 0x3
	SettingInitialWindowSize    SettingID = 0x4
	SettingMaxFrameSize         SettingID = 0x5
	SettingMaxHeaderListSize    SettingID = 0x6
        SettingNoRFC7540Priorities  SettingID = 0x9
)

var settingName = map[SettingID]string{
	SettingHeaderTableSize:      "HEADER_TABLE_SIZE",
	SettingEnablePush:           "ENABLE_PUSH",
	SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS",
	SettingInitialWindowSize:    "INITIAL_WINDOW_SIZE",
	SettingMaxFrameSize:         "MAX_FRAME_SIZE",
	SettingMaxHeaderListSize:    "MAX_HEADER_LIST_SIZE",
        SettingNoRFC7540Priorities:  "NO_RFC7540_PRIORITIES",
}

Thanks to Go team!

@gopherbot gopherbot added this to the Proposal milestone Oct 16, 2024
@seankhliao seankhliao changed the title proposal: net/http2: add "SETTINGS_NO_RFC7540_PRIORITIES" proposal: x/net/http2: add "SETTINGS_NO_RFC7540_PRIORITIES" Oct 16, 2024
@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Oct 17, 2024
@ianlancetaylor
Copy link
Contributor

CC @neild

@neild
Copy link
Contributor

neild commented Oct 17, 2024

I have no objection to adding the field to the enum. I don't think we really should be in the business of providing an enumeration of HTTP/2 settings ids, but given that we already have one there doesn't seem to be any harm in staying up to date.

@Colduction
Copy link
Author

In fact I didn't mean just adding it's ID, I meant it would be great to make it easier to configure and use this setting like other SETTING frame's settings for ease of use for custom/experimental usages.

Also thanks for your replies.

@neild
Copy link
Contributor

neild commented Oct 17, 2024

x/net/http2 currently doesn't support RFC 7540 stream prioritization by default.

We have http2.NewPriorityWriteScheduler, but this is known to be buggy (see https://go.dev/issue/58804), we have no evidence that it's useful (https://go.dev/issue/58804#issuecomment-1470330633), RFC 7540 prioritization is deprecated (https://www.rfc-editor.org/rfc/rfc9113.html#section-5.3), and we have a proposal to deprecate the x/net/http2 WriteScheduler interface entirely (https://go.dev/issue/67817).

So I think the only reasonable thing x/net/http2 could do with SETTINGS_NO_RFC7540_PRIORITIES is to unilaterally send it with a value of '1'.

@Colduction
Copy link
Author

Yes, that would be great to send this (SETTINGS_NO_RFC7540_PRIORITIES) SETTING frame's setting with a default value of '1'.

I hope the Go community adds this feature for the next x/net/http2 update.

Thanks in advance!

@neild
Copy link
Contributor

neild commented Oct 17, 2024

I have no objection to sending SETTINGS_NO_RFC7530_PRIORITIES=1 when using the default WriteScheduler. (And always, if/when we drop WriteScheduler support someday.)

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/621175 mentions this issue: http2: support SETTINGS_NO_RFC7540_PRIORITIES

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

4 participants