netius icon indicating copy to clipboard operation
netius copied to clipboard

HTTP2 stream priority support

Open joamag opened this issue 9 years ago • 3 comments

Description

While the base HTTP2 server implementation for Netius is developed, a proper support for priorities is still not developed leaving the output channel "unprotected" against large unimportant chunks of data that fill the space of the more important HTML, Javascripts, etc chunks.

Current HTTP2 performance under real browser scenarios is limited by the lack if priority support and the total loading times are often larger than the HTTP1.1 equivalents.

Notes

The delaying of the dependent streams should be performed at two different levels:

  • CPU/RAM, meaning that the on_data should not be triggered while the stream is not ready
  • Bandwidth, meaning that no bytes are sent back to the client while the parent streams are not completed or blocked, a delay operation is done on all of the data frames of the stream until the parent frame unblock its task, this may be done by using part of the available_stream/delay_frame implementation

Note that the most important part point is the one about blocking the bandwidth, as that's the most limited resource

Benchmarking

The page loading performance of the Netius HTTP2 server should be equivalent to the one offered by other HTTP2 servers like nghttp2 for that proper comparison must be created.

References

joamag avatar Aug 10 '16 11:08 joamag

It has been proved by using an NGINX reverse proxy implementation that its possible to archive better performance using an HTTP2 server than using the same back end with HTTP1 so the priorities should be the answer for that better performance.

Netius Performance

netius

NGINX Performance

nginx

joamag avatar Aug 10 '16 21:08 joamag

Maybe I'll need to get back to the "old" strategy of "marking" the pending frame information as sent so that I can unify the strategy for blocked streams because of connection/stream starvation and blocked streams because of dependencies unmet.

joamag avatar Aug 10 '16 22:08 joamag

This is the initial idea on how to attack the problem:

0

joamag avatar Sep 01 '16 11:09 joamag