From 05df12433025ab6da9df31d8683cbfb129362f82 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Wed, 25 Nov 2015 13:27:58 +0000 Subject: [PATCH] html updates after build git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716390 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/directives.html.en | 2 + docs/manual/mod/mod_http2.html.en | 125 ++++++++++++++++++++++++- docs/manual/mod/quickreference.html.en | 6 +- 3 files changed, 130 insertions(+), 3 deletions(-) diff --git a/docs/manual/mod/directives.html.en b/docs/manual/mod/directives.html.en index 19c80d2f0e..274107fc69 100644 --- a/docs/manual/mod/directives.html.en +++ b/docs/manual/mod/directives.html.en @@ -310,6 +310,8 @@
  • H2MaxWorkers
  • H2MinWorkers
  • H2ModernTLSOnly
  • +
  • H2Push
  • +
  • H2PushPriority
  • H2SerializeHeaders
  • H2SessionExtraFiles
  • H2StreamMaxMemSize
  • diff --git a/docs/manual/mod/mod_http2.html.en b/docs/manual/mod/mod_http2.html.en index 3255b8fef1..031f7936d7 100644 --- a/docs/manual/mod/mod_http2.html.en +++ b/docs/manual/mod/mod_http2.html.en @@ -64,6 +64,7 @@
  • H2MinWorkers
  • H2ModernTLSOnly
  • H2Push
  • +
  • H2PushPriority
  • H2SerializeHeaders
  • H2SessionExtraFiles
  • H2StreamMaxMemSize
  • @@ -204,6 +205,7 @@ Context:server config, virtual host Status:Extension Module:mod_http2 +Compatibility:Available in version 2.4.18 and later.

    This directive toggles the security checks on HTTP/2 connections @@ -246,6 +248,7 @@ Context:server config, virtual host Status:Extension Module:mod_http2 +Compatibility:Available in version 2.4.18 and later.

    This directive toggles the usage of the HTTP/2 server push @@ -293,9 +296,127 @@

    Last but not least, pushes happen only when the client signals its willingness to accept those. Most browsers do, some, like Safari 9, - do not. + do not. Also, pushes also only happen for resources from the same + authority as the original response is for.

    + +
    top
    +

    H2PushPriority Directive

    + + + + + + + + +
    Description:H2 Server Push Priority
    Syntax:H2PushPriority mime-type [after|before|interleaved] [weight]
    Default:H2PushPriority * After 16
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later. For having an + effect, a nghttp2 library version newer than 1.4.0 is necessary.
    +

    + This directive defines the priority handling of pushed responses + based on the content-type of the response. This is usually defined + per server config, but may also appear in a virtual host. +

    +

    + HTTP/2 server pushes are always related to a client request. Each + such request/response pairs, or streams have a dependency + and a weight, together defining the priority of a stream. +

    +

    + When a stream depends on another, say X depends on Y, + then Y gets all bandwidth before X gets any. Note that this + does not men that Y will block X. If Y has no data to send, + all bandwidth allocated to Y can be used by X. +

    +

    + When a stream has more than one dependant, say X1 and X2 both + depend on Y, the weight determines the bandwidth + allocation. If X1 and X2 have the same weight, they both get + half of the available bandwdith. If the weight of X1 is twice + as large as that for X2, X1 gets twice the bandwidth of X2. +

    +

    + Ultimately, every stream depends on the root stream which + gets all the bandwidht available, but never sends anything. So all + its bandwidth is distributed by weight among its children. Which + either have data to send or distribute the bandwidth to their + own children. And so on. If none of the children have data + to send, that bandwidth get distributed somewhere else according + to the same rules. +

    +

    + The purpose of this priority system is to always make use of + available bandwidth while allowing precedence and weight + to be given to specific streams. Since, normally, all streams + are initiated by the client, it is also the one that sets + these priorities. +

    +

    + Only when such a stream results in a PUSH, gets the server to + decide what the initial priority of such a pushed + stream is. In the examples below, X is the client stream. It + depends on Y and the server decides to PUSH streams P1 and P2 + onto X. +

    +

    + The default priority rule is: +

    +

    Default Priority Rule

    H2PushPriority * After 16
    +
    +

    + which reads as 'Send a pushed stream of any content-type + depending on the client stream with weight 16'. And so P1 + and P2 will be send after X and, as they have equal weight, + share bandwidth equally among themselves. +

    +

    Interleaved Priority Rule

    H2PushPriority text/css Interleaved 256
    +
    +

    + which reads as 'Send any CSS resource on the same dependency and + weight as the client stream'. If P1 has content-type 'text/css', + it will depend on Y (as does X) and its effective weight will be + calculated as P1ew = Xw * (P1w / 256). With P1w being + 256, this will make the effective weight the same as the weight + of X. If both X and P1 have data to send, bandwidth will be allocated + to both equally. +

    +

    + With Pw specified as 512, a pushed, interleaved stream would + get double the weight of X. With 128 only half as much. Note that + effective weights are always capped at 256. +

    +

    Before Priority Rule

    H2PushPriority application/json Before 256
    +
    +

    + This says that any pushed stream of content type 'application/json' + should be send out before X. This makes P1 dependant + on Y and X dependant on P1. So, X will be stalled as long as + P1 has data to send. The effective weight is calculated as + in the interleaved case. +

    +

    + Be aware that the effect of priority specifications is limited + by the available server resources. If a server does not have + workers available for pushed streams, the data for the stream + may only ever arrive when other streams have been finished. +

    +

    + Last, but not least, there are some specifics of the syntax + to be used in this directive. +

      +
    1. '*' is the only special content-type that matches all oither. + 'image/*' will not work.
    2. +
    3. The default dependency is 'After'.
    4. +
    5. There are also default weights: for 'After' it is 16, otherwise 256. +
    6. +
    +

    +

    Shorter Priority Rules

    H2PushPriority application/json 32         # an After rule
    +H2PushPriority image/jpeg before           # weight 256 default
    +H2PushPriority text/css   interleaved      # weight 256 default
    +
    +
    top

    H2SerializeHeaders Directive

    @@ -382,6 +503,7 @@ Context:server config, virtual host Status:Extension Module:mod_http2 +Compatibility:Available in version 2.4.18 and later.

    This directive sets the number of seconds of idle time on a TLS @@ -420,6 +542,7 @@ Context:server config, virtual host Status:Extension Module:mod_http2 +Compatibility:Available in version 2.4.18 and later.

    This directive sets the number of bytes to be sent in small diff --git a/docs/manual/mod/quickreference.html.en b/docs/manual/mod/quickreference.html.en index a54e3cc0e1..6297eaff89 100644 --- a/docs/manual/mod/quickreference.html.en +++ b/docs/manual/mod/quickreference.html.en @@ -498,18 +498,20 @@ media type in the HTTP Content-Type header field will exit. Group unix-group #-1 sBGroup under which the server will answer requests -H2Direct on|off on for http:, off f +svEH2 Direct Protocol Switch +H2Direct on|off on for h2c, off for +svEH2 Direct Protocol Switch H2MaxSessionStreams n 100 svEMaximum number of active streams per HTTP/2 session. H2MaxWorkerIdleSeconds n 600 sEMaximum number of seconds h2 workers remain idle until shut down. H2MaxWorkers nsEMaximum number of worker threads to use per child process. H2MinWorkers nsEMinimal number of worker threads to use per child process. H2ModernTLSOnly on|off on svERequire HTTP/2 connections to be "modern TLS" only +H2Push on|off on svEH2 Server Push Switch +H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svEH2 Server Push Priority H2SerializeHeaders on|off off svESerialize Request/Response Processing Switch H2SessionExtraFiles n 5 svENumber of Extra File Handles H2StreamMaxMemSize bytes 65536 svEMaximum amount of output data buffered per stream. H2TLSCoolDownSecs seconds 1 svE- H2TLSWarmUpSize amount 1048576 svE- -H2Upgrade on|off on for http:, off f +svEH2 Upgrade Protocol Switch +H2Upgrade on|off on for h2c, off for +svEH2 Upgrade Protocol Switch H2WindowSize bytes 65536 svESize of Stream Window for upstream data. Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note header [[expr=]value [replacement] -- 2.49.0