HTTP/2 stream have prioritization weight which is an priority i.e range from lowest priority is
1 and highest priority is
256, and many streams are may be made dependent on other streams. Proiritization is an order of files are requested and in which the server retrieves the data. The figure below demonstrate the Stream Priority.
Stream Dependency
Streams are always isolated which means one stream is always dependent on other streams. If the streams have no dependency then dependency ID is set to zero which is also known as the
root the figure below demonstrates the
Stream Dependency.
Dependency Tree
Dependencies on linear they can form a tree in which references two streams share the same parent tree The figure below demonstrate the
Dependency Tree.
In the above figure
Stream 3 and
Stream 4 have the same parent as
Stream 1 i.e
Stream 3 and
Stream 4 share the all the properties of
Stream 1.
In order to know the how two priorities will work let assume
index.html page on
stream 1 and
style.css page on
stream 3 in which stream parent dependency of
stream 1 the figure below demonstrates the how Dependency work.
Sharing Parent
Streams some times share the parents when it come to dependency in which resource allocation is calculated proportionally to the wait of each dependency the figure below demonstrates the Sharing a parent stream.
In the above figure
stream 3 has a weight of
10 and
stream 4 has a weight of
5 to calculate the allocation the sum of weight of all the siblings and then divide each weight by the sum total is shown in the above figure.