You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2022/12/06 16:21:14 UTC
HTTP/2 priorities
Hi all,
I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
how that goes, I may back-port the changes.
Given the difficulties we have in prioritizing creation of responses, I
plan to continue the current approach of prioritizing the sending of
data when the connection window size is smaller than the currently
active streams have collectively requested.
My rough plan at this stage, which is likely to change as I work through
the implementation, is:
- remove all the code that supports the current priority tree approach
- include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
- implement the new priority scheme - expected to be a much simpler
algorithm in Http2UpgradeHandler.allocate()
Mark
[1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Mark Thomas <ma...@apache.org>.
On 06/12/2022 17:11, Christopher Schultz wrote:
> Mark,
>
> On 12/6/22 11:21, Mark Thomas wrote:
>> Hi all,
>>
>> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
>> how that goes, I may back-port the changes.
>>
>> Given the difficulties we have in prioritizing creation of responses,
>> I plan to continue the current approach of prioritizing the sending of
>> data when the connection window size is smaller than the currently
>> active streams have collectively requested.
>>
>> My rough plan at this stage, which is likely to change as I work
>> through the implementation, is:
>>
>> - remove all the code that supports the current priority tree approach
>> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
>> - implement the new priority scheme - expected to be a much simpler
>> algorithm in Http2UpgradeHandler.allocate()
>
> +1
>
> I didn't realize we had any prioritization code in Tomcat at all at this
> point. Why would the new implementation be simpler? Because we've been
> given a very straightforward set of rules by the RFC which will be
> replacing an ad-hoc heuristic implementation?
The scheme described in RFC 9218 is simpler than the one described in
RFC 7540. How you apply the priorities is still our problem, but the
data we have to work with is a lot simpler.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,
On 12/6/22 11:21, Mark Thomas wrote:
> Hi all,
>
> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
> how that goes, I may back-port the changes.
>
> Given the difficulties we have in prioritizing creation of responses, I
> plan to continue the current approach of prioritizing the sending of
> data when the connection window size is smaller than the currently
> active streams have collectively requested.
>
> My rough plan at this stage, which is likely to change as I work through
> the implementation, is:
>
> - remove all the code that supports the current priority tree approach
> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
> - implement the new priority scheme - expected to be a much simpler
> algorithm in Http2UpgradeHandler.allocate()
+1
I didn't realize we had any prioritization code in Tomcat at all at this
point. Why would the new implementation be simpler? Because we've been
given a very straightforward set of rules by the RFC which will be
replacing an ad-hoc heuristic implementation?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Rémy Maucherat <re...@apache.org>.
On Tue, Dec 6, 2022 at 5:21 PM Mark Thomas <ma...@apache.org> wrote:
>
> Hi all,
>
> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
> how that goes, I may back-port the changes.
>
> Given the difficulties we have in prioritizing creation of responses, I
> plan to continue the current approach of prioritizing the sending of
> data when the connection window size is smaller than the currently
> active streams have collectively requested.
>
> My rough plan at this stage, which is likely to change as I work through
> the implementation, is:
>
> - remove all the code that supports the current priority tree approach
I read the spec and this does sound interesting:
https://www.rfc-editor.org/rfc/rfc9218.html#name-incremental
This would solve the stream concurrency issue which heavily degrades
performance and had to be limited using maxConcurrentStreamExecution.
Rémy
> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
> - implement the new priority scheme - expected to be a much simpler
> algorithm in Http2UpgradeHandler.allocate()
>
> Mark
>
>
> [1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Christopher Schultz <ch...@christopherschultz.net>.
On 12/7/22 10:03, Rémy Maucherat wrote:
> On Wed, Dec 7, 2022 at 2:57 PM Mark Thomas <ma...@apache.org> wrote:
>>
>> On 06/12/2022 18:19, Konstantin Kolinko wrote:
>>> вт, 6 дек. 2022 г. в 19:21, Mark Thomas <ma...@apache.org>:
>>>>
>>>> Hi all,
>>>>
>>>> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
>>>> how that goes, I may back-port the changes.
>>>>
>>>> Given the difficulties we have in prioritizing creation of responses, I
>>>> plan to continue the current approach of prioritizing the sending of
>>>> data when the connection window size is smaller than the currently
>>>> active streams have collectively requested.
>>>>
>>>> My rough plan at this stage, which is likely to change as I work through
>>>> the implementation, is:
>>>>
>>>> - remove all the code that supports the current priority tree approach
>>>> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
>>>> - implement the new priority scheme - expected to be a much simpler
>>>> algorithm in Http2UpgradeHandler.allocate()
>>>>
>>>> Mark
>>>> [1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
>>>
>>> +1
>>> Sounds reasonable.
>>>
>>> I added a link to [1] to our Specifications page on the wiki,
>>> https://cwiki.apache.org/confluence/display/TOMCAT/Specifications
>>
>> Tx.
>>
>> It appears I have hit a distraction.
>>
>> RFC 9218 (HTTP priorities) defines the Priority header in terms of RFC
>> 8941 (structured fields).
>>
>> From what I have seen on the IETF HTTP WG mailing list and from the
>> HTTP workshop I attended in November, HTTP is moving towards using
>> structured fields for everything. I think a generic structured field
>> parser is something worth having. I'm going to work on that first and
>> then come back to HTTP priorities.
>
> +1
> Had a look and that's an interesting spec. The intro is very accurate
> as all the important headers have their own funny syntax and lack of
> parsing strictness. At least new headers would be better ;)
Obligatory xkcd:
https://xkcd.com/927/
A classic.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Rémy Maucherat <re...@apache.org>.
On Wed, Dec 7, 2022 at 2:57 PM Mark Thomas <ma...@apache.org> wrote:
>
> On 06/12/2022 18:19, Konstantin Kolinko wrote:
> > вт, 6 дек. 2022 г. в 19:21, Mark Thomas <ma...@apache.org>:
> >>
> >> Hi all,
> >>
> >> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
> >> how that goes, I may back-port the changes.
> >>
> >> Given the difficulties we have in prioritizing creation of responses, I
> >> plan to continue the current approach of prioritizing the sending of
> >> data when the connection window size is smaller than the currently
> >> active streams have collectively requested.
> >>
> >> My rough plan at this stage, which is likely to change as I work through
> >> the implementation, is:
> >>
> >> - remove all the code that supports the current priority tree approach
> >> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
> >> - implement the new priority scheme - expected to be a much simpler
> >> algorithm in Http2UpgradeHandler.allocate()
> >>
> >> Mark
> >> [1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
> >
> > +1
> > Sounds reasonable.
> >
> > I added a link to [1] to our Specifications page on the wiki,
> > https://cwiki.apache.org/confluence/display/TOMCAT/Specifications
>
> Tx.
>
> It appears I have hit a distraction.
>
> RFC 9218 (HTTP priorities) defines the Priority header in terms of RFC
> 8941 (structured fields).
>
> From what I have seen on the IETF HTTP WG mailing list and from the
> HTTP workshop I attended in November, HTTP is moving towards using
> structured fields for everything. I think a generic structured field
> parser is something worth having. I'm going to work on that first and
> then come back to HTTP priorities.
+1
Had a look and that's an interesting spec. The intro is very accurate
as all the important headers have their own funny syntax and lack of
parsing strictness. At least new headers would be better ;)
Rémy
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Mark Thomas <ma...@apache.org>.
On 06/12/2022 18:19, Konstantin Kolinko wrote:
> вт, 6 дек. 2022 г. в 19:21, Mark Thomas <ma...@apache.org>:
>>
>> Hi all,
>>
>> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
>> how that goes, I may back-port the changes.
>>
>> Given the difficulties we have in prioritizing creation of responses, I
>> plan to continue the current approach of prioritizing the sending of
>> data when the connection window size is smaller than the currently
>> active streams have collectively requested.
>>
>> My rough plan at this stage, which is likely to change as I work through
>> the implementation, is:
>>
>> - remove all the code that supports the current priority tree approach
>> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
>> - implement the new priority scheme - expected to be a much simpler
>> algorithm in Http2UpgradeHandler.allocate()
>>
>> Mark
>> [1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
>
> +1
> Sounds reasonable.
>
> I added a link to [1] to our Specifications page on the wiki,
> https://cwiki.apache.org/confluence/display/TOMCAT/Specifications
Tx.
It appears I have hit a distraction.
RFC 9218 (HTTP priorities) defines the Priority header in terms of RFC
8941 (structured fields).
From what I have seen on the IETF HTTP WG mailing list and from the
HTTP workshop I attended in November, HTTP is moving towards using
structured fields for everything. I think a generic structured field
parser is something worth having. I'm going to work on that first and
then come back to HTTP priorities.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: HTTP/2 priorities
Posted by Konstantin Kolinko <kn...@gmail.com>.
вт, 6 дек. 2022 г. в 19:21, Mark Thomas <ma...@apache.org>:
>
> Hi all,
>
> I plan to implement RFC 9218 [1] for HTTP/2 in Tomcat 11. Depending on
> how that goes, I may back-port the changes.
>
> Given the difficulties we have in prioritizing creation of responses, I
> plan to continue the current approach of prioritizing the sending of
> data when the connection window size is smaller than the currently
> active streams have collectively requested.
>
> My rough plan at this stage, which is likely to change as I work through
> the implementation, is:
>
> - remove all the code that supports the current priority tree approach
> - include SETTINGS_NO_RFC7540_PRIORITIES in the initial settings
> - implement the new priority scheme - expected to be a much simpler
> algorithm in Http2UpgradeHandler.allocate()
>
> Mark
> [1] https://www.rfc-editor.org/rfc/rfc9218.html#name-priority-parameters
+1
Sounds reasonable.
I added a link to [1] to our Specifications page on the wiki,
https://cwiki.apache.org/confluence/display/TOMCAT/Specifications
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org