[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151]
[0152]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174]
[0175]
[0176]
[0177]
[0178]
[0179]
[0180]
[0181]
[0182]
[0183]
[0184]
[0185]
[0186]
[0187]
[0188]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210]
[0211]
[0212]
[0213]
[0214]
[0215]
[0216]
[0217]
[0218]
[0219]
[0220]
[0221]
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251]
[0252]
[0253]
[0254]
[0255]
[0256]
[0257]
[0258]
[0259]
[0260]
[0261]
[0262]
[0263]
[0264]
[0265]
[0266]
[0267]
[0268]
[0269]
[0270]
[0271]
[0272]
[0273]
[0274]
[0275]
[0276]
[0277]
[0278]
[0279]
[0280]
[0281]
[0282]
[0283]
[0284]
[0285]
[0286]
[0287]
[0288]
[0289]
[0290]
[0291]
[0292]
[0293]
[0294]
[0295]
[0296]
[0297]
[0298]
[0299]
[0300]
[0301]
[0302]
[0303]
[0304]
[0305]
[0306]
[0307]
[0308]
[0309]
[0310]
[0311]
[0312]
[0313]
[0314]
[0315]
[0316]
[0317]
[0318]
[0319]
[0320]
[0321]
[0322]
[0323]
[0324]
[0325]
[0326]
[0327]
[0328]
[0329]
[0330]
[0331]
[0332]
[0333]
[0334]
[0335]
[0336]
[0337]
[0338]
[0339]
[0340]
[0341]
[0342]
[0343]
[0344]
[0345]
[0346]
[0347]
[0348]
[0349]
[0350]
[0351]
[0352]
[0353]
[0354]
[0355]
[0356]
[0357]
[0358]
[0359]
[0360]
[0361]
[0362]
[0363]
[0364]
[0365]
[0366]
[0367]
[0368]
[0369]
[0370]
[0371]
[0372]
[0373]
[0374]
[0375]
[0376]
[0377]
[0378]
[0379]
[0380]
[0381]
[0382]
[0383]
[0384]
[0385]
[0386]
[0387]
[0388]
[0389]
[0390]
[0391]
[0392]
[0393]
[0394]
[0395]
[0396]
[0397]
[0398]
[0399]
[0400]
[0401]
[0402]
[0403]
[0404]
[0405]
[0406]
[0407]
[0408]
[0409]
[0410]
[0411]
[0412]
[0413]
[0414]
[0415]
[0416]
[0417]
[0418]
[0419]
[0420]
[0421]
[0422]
[0423]
[0424]
[0425]
[0426]
[0427]
[0428]
[0429]
[0430]
[0431]
[0432]
[0433]
[0434]
[0435]
[0436]
[0437]
[0438]
[0439]
[0440]
[0441]
[0442]
[0443]
[0444]
[0445]
[0446]
[0447]
[0448]
[0449]
[0450]
[0451]
[0452]
[0453]
[0454]
[0455]
[0456]
[0457]
[0458]
[0459]
[0460]
[0461]
[0462]
[0463]
[0464]
[0465]
[0466]
[0467]
[0468]
[0469]
[0470]
[0471]
[0472]
[0473]
[0474]
[0475]
[0476]
[0477]
[0478]
[0479]
[0480]
[0481]
[0482]
[0483]
[0484]
[0485]
[0486]
[0487]
[0488]
[0489]
[0490]
[0491]
[0492]
[0493]
[0494]
[0495]
[0496]
[0497]
[0498]
[0499]
[0500]
[0501]
[0502]
[0503]
[0504]
[0505]
[0506]
[0507]
[0508]
[0509]
[0510]
[0511]
[0512]
[0513]
[0514]
[0515]
[0516]
[0517]
[0518]
[0519]
[0520]
[0521]
[0522]
[0523]
[0524]
[0525]
[0526]
[0527]
[0528]
[0529]
[0530]
[0531]
[0532]
[0533]
[0534]
[0535]
[0536]
[0537]
[0538]
[0539]
[0540]
[0541]
[0542]
[0543]
[0544]
[0545]
[0546]
[0547]
[0548]
[0549]
[0550]
[0551]
[0552]
[0553]
[0554]
[0555]
[0556]
[0557]
[0558]
[0559]
[0560]
[0561]
[0562]
[0563]
[0564]
[0565]
[0566]
[0567]
[0568]
[0569]
[0570]
[0571]
[0572]
[0573]
[0574]
[0575]
[0576]
[0577]
[0578]
[0579]
[0580]
[0581]
[0582]
[0583]
[0584]
[0585]
[0586]
[0587]
[0588]
[0589]
[0590]
[0591]
[0592]
[0593]
[0594]
[0595]
[0596]
[0597]
[0598]
[0599]
[0600]
[0601]
[0602]
[0603]
[0604]
[0605]
[0606]
[0607]
[0608]
[0609]
[0610]
[0611]
[0612]
[0613]
[0614]
[0615]
[0616]
[0617]
[0618]
[0619]
[0620]
[0621]
[0622]
[0623]
[0624]
[0625]
[0626]
[0627]
[0628]
[0629]
[0630]
[0631]
[0632]
[0633]
[0634]
[0635]
[0636]
[0637]
[0638]
[0639]
[0640]
[0641]
[0642]
[0643]
[0644]
[0645]
[0646]
[0647]
[0648]
[0649]
[0650]
[0651]
[0652]
[0653]
[0654]
[0655]
[0656]
[0657]
[0658]
[0659]
[0660]
[0661]
[0662]
[0663]
[0664]
[0665]
[0666]
[0667]
[0668]
[0669]
[0670]
[0671]
[0672]
[0673]
[0674]
[0675]
[0676]
[0677]
[0678]
[0679]
[0680]
[0681]
[0682]
[0683]
[0684]
[0685]
[0686]
[0687]
[0688]
[0689]
[0690]
[0691]
[0692]
[0693]
[0694]
[0695]
[0696]
[0697]
[0698]
[0699]
[0700]
[0701]
[0702]
[0703]
[0704]
[0705]
[0706]
[0707]
[0708]
[0709]
[0710]
[0711]
[0712]
[0713]
[0714]
[0715]
[0716]
[0717]
[0718]
[0719]
[0720]
[0721]
[0722]
[0723]
[0724]
[0725]
[0726]
[0727]
[0728]
[0729]
[0730]
[0731]
[0732]
[0733]
[0734]
[0735]
[0736]
[0737]
[0738]
[0739]
[0740]
[0741]
[0742]
[0743]
[0744]
[0745]
[0746]
[0747]
[0748]
[0749]
[0750]
[0751]
[0752]
[0753]
[0754]
[0755]
[0756]
[0757]
[0758]
[0759]
[0760]
[0761]
[0762]
[0763]
[0764]
[0765]
[0766]
[0767]
[0768]
[0769]
[0770]
[0771]
[0772]
[0773]
[0774]
[0775]
[0776]
[0777]
[0778]
[0779]
[0780]
[0781]
[0782]
[0783]
[0784]
[0785]
[0786]
[0787]
[0788]
[0789]
[0790]
[0791]
[0792]
[0793]
[0794]
[0795]
[0796]
[0797]
[0798]
[0799]
[0800]
[0801]
[0802]
[0803]
[0804]
[0805]
[0806]
[0807]
[0808]
[0809]
[0810]
[0811]
[0812]
[0813]
[0814]
[0815]
[0816]
[0817]
[0818]
[0819]
[0820]
[0821]
[0822]
[0823]
[0824]
[0825]
[0826]
[0827]
[0828]
[0829]
[0830]
[0831]
[0832]
[0833]
[0834]
[0835]
[0836]
[0837]
[0838]
[0839]
[0840]
[0841]
[0842]
[0843]
[0844]
[0845]
[0846]
[0847]
[0848]
[0849]
[0850]
[0851]
[0852]
[0853]
[0854]
[0855]
[0856]
[0857]
[0858]
[0859]
[0860]
[0861]
[0862]
[0863]
[0864]
[0865]
[0866]
[0867]
[0868]
[0869]
[0870]
[0871]
<!DOCTYPE html>
<!-- WASDOC AXP-2.0.0 (CGILIB AXP-1.9.9) -->
<!-- wasDOC Copyright (C) 2019,2020 Mark G.Daniel - Apache-2.0 licenced -->
<!--  3-NOV-2021 02:50 -->
<noscript>NOTE: SOME FUNCTIONALITY EMPLOYS JAVASCRIPT</noscript>
<div id="erreport1" style="display:none;"></div>
<script>
function errorReport(string) {
   for (var cnt = 1; cnt <= 2; cnt++) {
      var err = document.getElementById('erreport'+cnt);
      err.style.display = 'block';
      err.innerHTML += string;
   }
}
</script>
<style type="text/css">
html { font-family: arial, verdana, sans-serif; font-size:12pt; margin:1em; }
h1 { font-size:124%; font-style:bold;
     margin-top:1em; margin-bottom:0.5em; }
h2 { font-size:120%; font-style:bold;
     margin-top:1.1em; margin-bottom:0.4em; }
h3 { font-size:116%; font-style:bold;
     margin-top:1.0em; margin-bottom:0.3em; }
h4 { font-size:112%; font-style:bold;
     margin-top:1.1em; margin-bottom:0.3em; }
h5 { font-size:112%; font-style:bold; 
     margin-top:1.1em; margin-bottom:0.3em; }
h6 { font-size:112%; font-style:bold; padding:0; margin:0; }

h1 .text { text-decoration:underline; }
h1 .numb { padding-right:0.8em; }
h1 .numb:empty { display:none; padding-right:0; }
h2 .numb { padding-right:0.8em; }
h2 .numb:empty { display:none; padding-right:0; }
h3 .numb { padding-right:0.8em; }
h3 .numb:empty { display:none; padding-right:0; }
h4 .numb { padding-right:0.8em; }
h4 .numb:empty { display:none; padding-right:0; }
h5 .numb { display:none; padding-right:0; }
h6 .numb { display:none; padding-right:0; }

kbd { font-family:monospace; }

noscript { font-size:1.2em; }

p { line-height:1.1em; margin-top:1em; margin-bottom:1em; }

.chunk { font-size:130%; text-decoration:underline; }
.head {}
.high {}
.bold { font-weight:bold; }
.center { text-align:center; }
.italic { font-style:italic; }
.left { text-align:left; }
.nowrap { white-space:nowrap; }
.prewrap { white-space:pre; }
.right { text-align:right; }
.strike { text-decoration:line-through; }
.under { text-decoration:underline; }

.backlight { background-color:#f2f2f2; }
.display0 { display:none; }

img { max-width:100%; }
.imglink { }

.link { }
.blank { }

.list { margin-bottom:1em; }
.list li { margin-top:0.5em; }
.list0 li { margin-top:0; }
.item {}

.tabl { border-collapse:collapse; text-align:left; margin:0.4em 2em 0.5em 2em; }
.tabu { border-collapse:collapse; text-align:right; margin:0.4em 2em 0.5em 2em; }

.tabr { vertical-align:top; }
.tabh { padding:0.2em 0 0 2em; margin:0; }
.tabd { padding:0.1em 0 0 2em; margin:0; }
.tabh:first-of-type, td:first-of-type { padding-left:0; }

.tabu .tabh,
.tabu .tabd { border:1px solid gray; padding:0.2em 0.3em 0.2em 0.3em; }
.tab0 { border:none; visibility:hidden; max-width:1em; 
        white-space:nowrap; overflow:hidden; }

.tabauto { margin-left:auto; margin-right:auto; }

.tabr:empty { height:0.2em; }
.tabu .tabh:empty, .tabu .tabd:empty { border:none; visibility:hidden; }

.error { font-size:110%; color:black; background-color:yellow;
         font-family:sans-serif; font-weight:bold; font-style:normal;
         width:95%; border:solid 1px gray; padding:0.5em 1em 0.5em 1em; }
.error::before { content:'\026a0\00a0'; }
.image { }
.page { width:98%; border:1px dashed gray; margin:1.5em 0 1.8em 0; }
.epage { width:98%; border:1px dashed black; margin:1.5em 0 1.8em 0; }
.monosp { font-family:monospace; }
.ppage { display:none; }
.simple { list-style-type:none; }
.valtop { vertical-align:top; }
.valmid { vertical-align:middle; }
.valbot { vertical-align:bottom; }

.code { border-style:solid; border-width:0 0 0 1px; padding-left:1em;
        font-family:monospace; white-space:pre; }
.block { }
.blockof { margin:0.4em 2em 0.5em 2em; }
.example { border-style:dashed; border-width:0 0 0 1px; padding-left:1em;
           margin-top:0.5em; margin-bottom:0.5em; white-space:pre; }
.indent { margin-left:2em; margin-right:2em; }
.noindent { margin-left:0; margin-right:0; }
.inblock { display:inline-block; }
.mono { white-space:pre; font-family:monospace; }
.note { margin:0.4em 2em 0.5em 2em; page-break-inside:avoid; }
.note h5 { margin-top:0 }
.note_hr { width:80%; border:1px solid gray; }
.prop { padding-left:1em; margin-top:0.5em; margin-bottom:0.5em; }
.quote { border-style:dashed; border-width:0 0 0 1px; padding-left:1em;
         margin-top:0.5em; margin-bottom:0.5em; }
.this { display:none; }

a:link,a:visited { color:black; text-decoration:none; }
a:hover,a:active { text-decoration:underline; }
a:focus { outline:0; } 

:target:before { content:''; display:block; height:0.1em; margin:-0.1em; }
a.link:link, a.link:visited,a.link:active 
{ color:midnightBlue; text-decoration:underline; text-decoration-style:solid; }

.TOC1cols1 { width:80%; max-width:80%; }
.TOC1cols2 { column-count:2; width:80%; max-width:80%; }
.TOC1cols3 { column-count:3; max-width:90%; max-width:90%; }
.TOC1cols4 { column-count:4; max-width:100%; max-width:100%; }
.TOC1table { margin-left:2em; white-space:nowrap; break-inside:auto; }
.TOC1table tr { vertical-align:top; text-align:left; break-inside:avoid; break-after:auto; }
.TOC1table td+td { padding:0 0 0 0.5em; }
.TOC1table .numb { width:3em; max-width:3em; }
.TOC1table .sepr { width:5em; max-width:6em; overflow:hidden; }
.TOC1table .majr { font-weight:bold; }
.TOC1table .text { white-space:normal; }

/* These are due to Firefox (at least <= 76) recalcitrant multi-column handling.
   Web search "Split table into css columns, issue in Firefox" (stackoverflow).
   "Good grief, Charlie Brown!" */
 
.TOC1cols2 table,
.TOC1cols2 tbody,
.TOC1cols2 tr,
.TOC1cols3 table,
.TOC1cols3 tbody,
.TOC1cols3 tr,
.TOC1cols4 table,
.TOC1cols4 tbody,
.TOC1cols4 tr { display:block; padding:0; }

.TOC2cols1 { width:60%; max-width:60%; }
.TOC2cols2 { column-count:2; width:70%; max-width:70%; }
.TOC2cols3 { column-count:3; width:80%; max-width:80%; }
.TOC2cols4 { column-count:4; width:90%; max-width:90%; }
.TOC2table { margin-left:2em; white-space:nowrap; break-inside:auto; }
.TOC2table tr { vertical-align:top; text-align:left; break-inside:avoid; break-after:auto; }
.TOC2table .numb { font-weight:bold; padding-right:0.5em; }
.TOC2table .text { width:100%; white-space:normal; }

/* see "recalcitrant" above */
.TOC2cols2 table,
.TOC2cols2 tbody,
.TOC2cols2 tr,
.TOC2cols3 table,
.TOC2cols3 tbody,
.TOC2cols3 tr,
.TOC2cols4 table,
.TOC2cols4 tbody,
.TOC2cols4 tr { display:block; padding:0; }

.NAVtable { margin:0.1em 0 0 2em; }
.NAVtable td { font-size:110%; font-weight:bold; padding:0; margin:0; }
.NAVtable a { padding:0 0.5em 0 0.5em; text-decoration:none; }

.IDXcols1 { width:80%; max-width:80%; }
.IDXcols2 { column-count:2; width:90%; max-width:90%; }
.IDXcols3 { column-count:3; width:95%; max-width:95%;  }
.IDXcols4 { column-count:4; width:100%; max-width:100%;  }
.IDXtable { margin:1em 0 1em 2em; white-space:nowrap; break-inside:auto; }
.IDXtable tr { vertical-align:top; text-align:left; break-inside:avoid; break-after:auto; }
.IDXtable .alpha { font-weight:bold; min-width:2em; }
.IDXtable .text  { width:100%; white-space:normal; }
.IDXtable .para:before { content:'\00b6\00a0'; }

/* see "recalcitrant" above */
.IDXcols2 table,
.IDXcols2 tbody,
.IDXcols2 tr,
.IDXcols3 table,
.IDXcols3 tbody,
.IDXcols3 tr,
.IDXcols4 table,
.IDXcols4 tbody,
.IDXcols4 tr { display:block; padding:0; }

.insight { background-color:cyan; font-family:monospace;
           padding:0 0.2em 0 0.2em; margin:0 0.2em 0 0.2em;
           font-size:100%; font-style:normal; font-weight:normal;
           text-decoration:none; }

.wasdoc { font-family: "Lucida Console", Monaco, monospace; 
          letter-spacing:-0.07em; }

@media screen { .blank::after { content:"\2924"; } 
                .print { display:none; }
}

@media print {
   table { page-break-inside:avoid; }
   .noprint { display:none; }
   .page { border:none; page-break-after: always; }
   .epage { display:none; }
   .ppage { page-break-after:always; }
   .NAVtable { display:none; }
   .NAVprint { display:block!important; }
}

@page { margin:2cm 1cm 2cm 1cm;  }
</style>
<!-- source:0000_features.WASDOC -->

<style type="text/css">._smiley::after { font-size:150%; vertical-align:middle; content:'\263a' }</style>
<style type="text/css">._frowny::after { font-size:150%; vertical-align:middle; content:'\2639' }</style>
<style type="text/css">._button { border: 1px gray solid; border-radius:3px; padding:0.1em; margin:0.1em; font-size:90%; }</style>

<a id="0." href="#"></a>
<title>WASD Features and Facilities &ndash; HTTP/2</title>
<a id="5." href="#"></a>
<a id="5.http2" href="#"></a>
<a id="http2" href="#"></a>
<h1 class="head chunk">WASD Features and Facilities</h1>
<h1 class="head"><span class="numb">5.</span><span class="text">HTTP/2</span></h1>

<div class="TOC2cols2">
<table class="TOC2table">
<tr><td><a href="features005.html#5.1.wasdhttp2"><span class="numb">5.1</span><span class="text">WASD HTTP/2</span></a>
<tr><td><a href="features005.html#5.2.http2andperformance"><span class="numb">5.2</span><span class="text">HTTP/2 and Performance</span></a>
<tr><td><a href="features005.html#5.3.http2configuration"><span class="numb">5.3</span><span class="text">HTTP/2 Configuration</span></a>
<tr><td><a href="features005.html#5.3.1.globalconfiguration"><span class="numb">5.3.1</span><span class="text">Global Configuration</span></a>
<tr><td><a href="features005.html#5.3.2.serviceconfiguration"><span class="numb">5.3.2</span><span class="text">Service Configuration</span></a>
<tr><td><a href="features005.html#5.3.3.http2setrules"><span class="numb">5.3.3</span><span class="text">HTTP/2 Set Rules</span></a>
<tr><td><a href="features005.html#5.4.http2detection"><span class="numb">5.4</span><span class="text">HTTP/2 Detection</span></a>
<tr><td><a href="features005.html#5.5.http2references"><span class="numb">5.5</span><span class="text">HTTP/2 References</span></a>
</table>
</div>

<table class="NAVtable NAVprint"><tr>
<td><a href="javascript:window.history.back();">&#8617;&#xFE0E;</a>
<td><a href="features004.html#4.">&#8598;&#xFE0E;</a>
<td><a href="features000.html#0.">&#8593;&#xFE0E;</a>
<td><a href="features006.html#6.">&#8600;&#xFE0E;</a>
<td><a href="javascript:window.history.forward();">&#8618;&#xFE0E;</a>
</table>

<p> HTTP/2 is the most recent standard (RFC 7540, 2015) for implementing how
HTTP is represented by, and transported between, client and server. It is not a
ground-up rewrite of the established standard, HTTP/1.1 (RFC 2616, 1999). 
Those elements and semantics remain substantially the same.  Instead HTTP/2
modifies how the data is encapsulated (framed) and transferred between agents,
abstracting the complexity of this within the new protocol layer, leaving the
application level largely insulated from change.  As a result all existing
HTTP/1.1 web-based environments should be able to continue without
modification.

<p> The focus of the protocol is on performance, in particular end-user
perceived page rendering and web application responsiveness.  With the original
web use case being a relatively simple, single resource request-response, and
early markup involving text with a few illustrative images, the single network
connection, back-to-back request-response paradigm was simple to implement and
worked well enough.  In short time this moved to multiple network connections,
each loading elements in parallel as the complexity and density of the
individual elements on the pages increased, and to the introduction of HTTP/1.1 
<span class="high italic">pipelining</span> (back-to-back requests over a single connection) in an
attempt to avoid request-response-request latency.  Modern web documents and
applications tend to have dozens of fine-grained elements that dynamically load
resources based on the content of the page and/or user interaction.  The
single, then multiple network connections, each with its round-trip TCP
connection establishment overhead and request-response blocking of resources,
did not scale effectively.  HTTP/2 replaces it with a single TCP connection on
which multiple resources concurrently can be requested, pushed, and
transferred.  A more rigorous and effective implementation of the pipeline
concept.

<p> While multiplexing communication over a single network connection is a core
performance technology there are other contributing elements. The framing layer
uses binary tokens and parameters.  The plain-text request and response headers
of HTTP/1.<span class="high italic">n</span> are replaced with tokenised, encoded and dynamically cached
equivalents, commonly providing compression in excess of eighty percent.  The
relationship and priority of resources can be established allowing inferior
resources to be delivered after or dependent on superior ones.  The HTTP/2
server can send multiple responses to a single request.  Known as <span class="high italic">server
push</span> it can be used to pre-load the browser (cache) with resources it has not
encountered yet.

<p> HTTP/2 has the potential to place additional load on the client and server
in comparison to HTTP/1.<span class="high italic">n</span>.  One particular consideration for WASD sites is
the <span class="high italic">stream concurrency</span> setting of the HTTP/2 connection.  The server
specifies to the client the maximum number of concurent request-response (and
server push) <span class="high italic">streams</span> it will accept. RFC 7540 contains, &quot;This limit is
directional: it applies to the number of streams that the sender permits the
receiver to create. Initially, there is no limit to this value.  It is
recommended that this value be no smaller than 100, so as to not unnecessarily
limit parallelism.&quot;  This translates to a hypothetical ten browsers connected
to the site each with up to one hundred concurrent streams, or potentially one
thousand active requests!  Time to check those server configuration and SYSGEN
parameters&hellip;

<p> Note that HTTP/1.1 has recently been revisited with RFC 7230 family of
specifications (2014) providing some clarifications and refinements on the
original.

<a id="5.1" href="#"></a>
<a id="5.1.wasdhttp2" href="#"></a>
<a id="wasdhttp2" href="#"></a>
<h2 class="head"><span class="numb">5.1</span><span class="text">WASD HTTP/2</span></h2>

<p> WASD HTTP/2 implements all of the essential requirements of RFC 7540
(naturally enough).  This includes the framing protocol, datagram (message) and
stream management, header compression (RFC 7541), connection settings and flow
control, along with HTTP/2 connection establishment and termination (TLS ALPN
and HTTP upgrade).  It does not ((perhaps) currently) provide server-push or
stream prioritisation and dependency.

<p> Prior to the introduction of HTTP/2, WASD's fundamental abstraction was the
request, with each request interfacing directly with the network stack.  With
an HTTP/2 protocol connection somewhat supplanting the role of a Transmission
Control Protocol (TCP) connection in HTTP/1.<span class="high italic">n</span>, a new level of communication
abstraction was required between the request processing and the network
processing.  It should be noted that HTTP/2 itself is transported on TCP.

<p> Another new layer of abstraction required interfacing each protocol's
request/response header formats with the underlying server processing (avoiding
excessive duplication of code).  HTTP/1.<span class="high italic">n</span> has a plain-text,
carriage-control separated format, while HTTP/2 has a binary, compressed,
lookup-table oriented format (RFC 7541).  The layer was implemented using a
<span class="high italic">key</span>-<span class="high italic">value</span> dictionary.

<p> The accomodations for handling both HTTP/2 and HTTP/1.1, along with related
and ancilliary design and code changes, have not measurably impacted overall
WASD performance, although as noted below there is a server process CPU impost
associated with HTTP/2.

<div class="note">
<a id="5.1.0.0.1" href="#"></a>
<a id="5.1.itsfairtosayhellip" href="#"></a>
<a id="itsfairtosayhellip" href="#"></a>
<h5 class="head center"><span class="text">It's fair to say&hellip;</span></h5>
<hr class="note_hr">
Reimplementing the complexities and subtleties of TCP &mdash; and adding a few of
its own &mdash; up in the application layer has made HTTP/2 a significantly more
complicated and less transparent protocol of HTTP/1.1 and while solving
some minor annoyances with that has sacrificed the usefulness and elegance of a
once readable byte-stream.  Certainly added layers and associated processing to
WASD, breaking the original I/O event driven design for possibly minor
performance improvements.
<hr class="note_hr">
</div>

<a id="5.1.0.0.2" href="#"></a>
<a id="5.1.http2andwatch" href="#"></a>
<a id="http2andwatch" href="#"></a>
<h5 class="head"><span class="text">HTTP/2 and WATCH</span></h5>

<p> WATCH reports have the network item: [x]HTTP/2.  This provides a detailed
overview of the underlying framing and connection management exchanges between
client and server.  WATCH reports are available to HTTP/2 connected clients
with one consideration.  Due to multiplexed requests over the single network
connection, WATCHing the [x]HTTP/2 item of another request in the same browser
(using the same HTTP/2 connection - and there <span class="high italic">can</span> be multiple from a single
browser) is not possible (or at least more code than it's worth).  The HTTP/2
activity of the WATCHing generates more report items which generate &hellip; a
descent into reporting oblivion.

<p>  WASD detects when a request is initiated on the same HTTP/2 connection as
an [x]HTTP/2 WATCHing client and if this sort of reporting cascade is possible
(any <span class="high italic">networking</span> group item) advises 

<div class="blockof code">&verbar;Time_______&verbar;Module__&verbar;Line&verbar;Item&verbar;Category__&verbar;Event...&verbar;
&verbar;22:00:55.22 WATCH    1823 0004 CONNECT    HTTP/2 with 192.168.1.2,62446 on https://klaatu.private,443 (0.0.0.0)&verbar;
&verbar;22:00:55.22 WATCH    1454 0004 CONNECT    HTTP/2 rabbit hole&verbar;
</div>
 Such a request is not reported on further.

<p> Workarounds?

<ul class="list list0">
<li class="item"> WATCH from an independent browser instance.  Often requires a separate host
or different browser (e.g. Chrome and Firefox on the same host).
<li class="item"> Have an HTTP/1.1 (only) service on the same server and use WATCH from that.
</ul>

<a id="5.2" href="#"></a>
<a id="5.2.http2andperformance" href="#"></a>
<a id="http2andperformance" href="#"></a>
<h2 class="head"><span class="numb">5.2</span><span class="text">HTTP/2 and Performance</span></h2>

<p> With HTTP/2 not modifying the fundamentals of HTTP/1.1 semantics the
commonly touted payoff for all the additional complexity (in implementation) is
performance.  While this is often stated in terms of page rendering speeds or
web application responsiveness there is another significant measure of
performance - efficiency.  HTTP/2 much more efficiently utilises each network
(TCP) connection, as well as reducing the (time and processing) overhead of
setting-up and tearing-down of each of these required for parallelism under
HTTP/1.1.

<a id="5.2.0.0.1" href="#"></a>
<a id="5.2.isitallworthitnbspnbspasmightbeexpectedndashthatdepends" href="#"></a>
<a id="isitallworthitnbspnbspasmightbeexpectedndashthatdepends" href="#"></a>
<h5 class="head"><span class="text">Is it all worth it?&nbsp;&nbsp;As might be expected &ndash; that depends.</span></h5>

<p> There are a number of sufficiently good analyses of both the factors that
affect HTTP/2 performance and the actual performance relative to HTTP/1.1. See
the references section and search the Web.  This section contains some
observations made during WASD HTTP/2 development. All of these seem to
correspond with others' observations, as well as what might reasonably be
expected considering the strategies employed by the protocol.

<ul class="list">

<li class="item"> For simple request-response use cases (e.g. download a file) HTTP/2
makes no observable performance difference.

<li class="item"> Where multiple resources need to be loaded by a page the measurable
performance improvement is proportional to the number of resources and the
latency of the network.

<li class="item"> In a low-latency environment such as the average LAN (e.g. 5mS RTT)
HTTP/2 makes minimal  difference irrespective of the number of resources loaded
(until it reaches rediculous quantities).

<li class="item"> In a high-latency environment such as a VPN spanning half the globe
(e.g. 350mS RTT) HTTP/2 makes an obvious and of course measurable improvement
for anything other than a trivial number of resources. 

<li class="item"> On a CPU constrained system HTTP/1.<span class="high italic">n</span> is significantly more
responsive than HTTP/2.  This unsurprising considering the explicit
multiplexing and header marshalling employed by HTTP/2.

<li class="item"> On the developer's bench there is ~10% more CPU consumed for the same load
profile** via HTTP/2 compared to HTTP/1.1 for similar durations.  This is
(probably) due to header compression and multiplexed stream processing.  It is
(probably) offset (to some degree) by fewer resources consumed in the network
stack managing the multiple TCP connections of HTTP/1.1.

<p> As also related in <a class="link" href="features011.html#11.serverperformance">11. Server Performance</a>, using the same load profile
as above** and using HTTP/1.1, WASD v11.0 compared to v10.4 showed ~5%
additional CPU and duration.  This is (probably) largely due to dictionary
processing.

<p class="indent"> ** <span class="high italic">100 individual files, size 2kB to 250kB, 50 concurrent, ~30%
CPU utilisation (~5% USER mode, mostly INTERRUPT servicing), batched 10,000 at
a time over a LAN.</span>

</ul>

<div class="note">
<a id="5.2.0.0.2" href="#"></a>
<a id="5.2.ymmv" href="#"></a>
<a id="ymmv" href="#"></a>
<h5 class="head center"><span class="text">YMMV!</span></h5>
<hr class="note_hr">
After some months (and now years) accessing WASD HTTP/2 over various LANs and
WANs the developer, FWIW, can't shake the perception that it <span class="high italic">seems</span>
generally more responsive in the real world.  Yet interestingly &hellip;
<hr class="note_hr">
</div>

<a id="5.2.0.0.3" href="#"></a>
<a id="5.2.performanceassessment" href="#"></a>
<a id="performanceassessment" href="#"></a>
<h5 class="head"><span class="text">Performance Assessment</span></h5>

<p> As described in <a class="link blank" target="_blank" href="../config/#serverandsitetesting">Server and Site Testing</a> in <a class="link blank" target="_blank" href="../config/#0.">WASD Configuration</a>
the OWASP ZAP application is integral to WASD test and exercise.  It can
generate an intense stream of traffic via cleartext (port 80) or TLS (port
443).

<div class="drawing dfont draw indent">
<style>
.dhflip { display:inline-block;transform:rotate(180deg); }
.dvflip { display:inline-block;transform:rotate(-180deg); }
.dnoflip { display:inline-block;transform:rotate(360deg); }
.dfont { font-family:monospace;font-size:1em;line-height:0.9em;line-spacing:0em; }
</style>
&#x250c;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2510;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x250c;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2510;<br>
&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<span class="dnoflip">&#x25c4;</span>&#x2500;&#x2500;HTTP/1.1&nbsp;clear&#x2500;&#x2500;<span class="dhflip">&#x25c4;</span>&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2502;&nbsp;OWASP&nbsp;ZAP&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;WASD&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<span class="dnoflip">&#x25c4;</span>&#x2500;&#x2500;&#x2500;HTTP/1.1&nbsp;TLS&#x2500;&#x2500;&#x2500;<span class="dhflip">&#x25c4;</span>&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2514;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2518;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2514;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2518;<br>
</div>


<p> Using the <span class="high italic">nghttpx</span> proxy utility (see reference below) it is also used to
exercise WASD's HTTP/2. 

<div class="drawing dfont draw indent">
&#x250c;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2510;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x250c;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2510;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x250c;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2510;&nbsp;<br>
&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<span class="dnoflip">&#x25c4;</span>&#x2500;&#x2500;HTTP/1.1&nbsp;clear&#x2500;&#x2500;<span class="dhflip">&#x25c4;</span>&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2502;&nbsp;OWASP&nbsp;ZAP&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;nghttpx&nbsp;&nbsp;&nbsp;&#x2502;<span class="dnoflip">&#x25c4;</span>&#x2500;&#x2500;HTTP/2&nbsp;TLS&#x2500;&#x2500;<span class="dhflip">&#x25c4;</span>&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;WASD&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<span class="dnoflip">&#x25c4;</span>&#x2500;&#x2500;&#x2500;HTTP/1.1&nbsp;TLS&#x2500;&#x2500;&#x2500;<span class="dhflip">&#x25c4;</span>&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2502;<br>
&#x2514;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2518;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2514;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2518;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x2514;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2500;&#x2518;<br>
</div>


<p> On the development bench Alpha PWS500 formal performance assessment using
this is disappointing <span class="high _frowny">&thinsp;</span>

<p> See <a class="link" href="features011.html#11.1.http2encrypted">&lsquo;HTTP/2 (encrypted)&rsquo; in 11.1 Simple File Request Turn-Around</a> in section <a class="link" href="features011.html#11.serverperformance">11. Server Performance</a>.

<p> This may just reflect the CPU capacity of the benchmark system and that all
requests are being transported through a single encrypted connection.

<a id="5.2.0.0.4" href="#"></a>
<a id="5.2.httpreport" href="#"></a>
<a id="httpreport" href="#"></a>
<h5 class="head"><span class="text">HTTP Report</span></h5>

<p> WASD keeps track of HTTP family statistics.

<p> After 3.8 million requests via OWASP ZAP using the above configuration over
a number of spider-generated scans, one third of which were HTTP/2, one third
over TLS HTTP/1.1, and another third cleartext HTTP/1.1, the following image
suggests requests using HTTP/2 take approximately 50% of HTTP/1.1.

<a class="imglink" target="_blank" href="./http_report.png"><img class="image" src="./http_report.png"></a>

<a id="5.2.0.0.5" href="#"></a>
<a id="5.2.otherassessment" href="#"></a>
<a id="otherassessment" href="#"></a>
<h5 class="head"><span class="text">Other Assessment</span></h5>

<p> The simplest tool for getting a <span class="high italic">feel</span> for, and elementary measurement of
HTTP/2 may be found in the <a class="link blank" target="_blank" href="/wasd_root/exercise/*.*">WASD_ROOT:[EXERCISE]</a>
directory.  The document DOTTY.HTML and its companion files provide a page that
loads a selectable number of resources (images) in a consistent and
reproducible manner.  This DOTTY.HTML can be accessed via unencrypted HTTP
(http://), encrypted HTTP (https://) and services configured to provide HTTP/2
or HTTP/1.1.   Using these combinations with the selectable volume of
resources, elementary comparisons may be made in target environments.

<p> The Server Admin, HTTP Report (<a class="link" href="features009.html#9.serveradministration">9. Server Administration</a>) contains
comparative duration and bytes-per-second minimum/maximum/average for total
server HTTP/2 and HTTP/1.<span class="high italic">n</span> requests.  These cannot simply be taken
at face value without some consideration of the respective load profile but
under controlled conditions can provide useful metrics.

<p> Other development and load/performance tools were employed from a Linux
platform.  For someone educated in computing during the (19)70s, the
availability of VM technology for such purposes is just brilliant!&nbsp;&nbsp;&nbsp;<span class="high italic">But you know, we were happy in those days, though we were poor.</span> 

<p> Indispensible were 

<ul class="list simple list0">
<li class="item"> <a class="link blank" target="_blank" href="https://nghttp2.org/documentation/nghttp.1.html">https://nghttp2.org/documentation/nghttp.1.html</a>
<li class="item"> <a class="link blank" target="_blank" href="https://nghttp2.org/documentation/h2load.1.html">https://nghttp2.org/documentation/h2load.1.html</a>
<li class="item"> <a class="link blank" target="_blank" href="https://nghttp2.org/documentation/nghttpx.1.html">https://nghttp2.org/documentation/nghttpx.1.html</a>
<li class="item"> <a class="link blank" target="_blank" href="https://www.zaproxy.org">https://www.zaproxy.org</a>
</ul>

<p> Many thanks to the developer(s) of this package.

<a id="5.3" href="#"></a>
<a id="5.3.http2configuration" href="#"></a>
<a id="http2configuration" href="#"></a>
<h2 class="head"><span class="numb">5.3</span><span class="text">HTTP/2 Configuration</span></h2>

<p> While effectively transparent to the end-user, HTTP/2 has some aspects that
need to be carefully considered by the server administrator.

<ul class="list">

<li class="item"> The level of (request) concurrency suggested by RFC 7540 section 6.5.2
would likely  require redimensioning a web server and possibly the supporting
system.  Environments historically expecting per-client resource demand to be
limited by the number of concurrent (HTTP/1.<span class="high italic">n</span>) network connections
an agent will deploy per origin server, often limited to less than a dozen,
might behave entirely differently when presented with many dozens, or
potentially hundreds of requests.  WASD's default of 100 is the RFC
recommendation in part because browsers tend to open multiple connections
to maintain the parallelism sought, so a reduction in HTTP/2 stream
concurrency often just increases HTTP/2 connection concurrency.

<li class="item"> Secure HTTP requires a minimum of TLS 1.2 with SNI and ALPN (RFC 7540
section 9.2).

<li class="item"> The ciphers available for use with HTTP/2 secure HTTP are quite specific
(at least in what the RFC prohibits - RFC 7540 Appendix A).  This and the
overall encryption requirements for HTTP/2 can cause issues with established
(older) agents and with mainstream browsers strictly enforcing the RFC
definitions making support for combined /2-/1.1 services sometimes problematic.

<p> Use of elliptic curve ciphers (ECDHE), as an element of Perfect Forward
Security (PFS), is mandated for HTTP/2 (RFC 7540 section 9.2.2).  The keys for
the elliptic curve ciphers are stored in PEM-encoded files  ocated in
WASD_ROOT:[LOCAL].  These can be copied from the WASD OpenSSL package using

<div class="blockof code">&dollar; copy WASD_ROOT:[SRC.OPENSSL-<span class="high italic">n_n_n</span>.WASD.CERT]DH_PARAM_*.PEM WASD_ROOT:[LOCAL]
</div>

or locally generated as described in <a class="link" href="features004.html#4.5.5.forwardsecrecy">4.5.5 Forward Secrecy</a>. 

<p> This SSL configuration and minimum cipher list seems to work for all major
browsers at the time of writing:

<div class="blockof code"># WASD_CONFIG_GLOBAL
[SecureSocket]  enabled
[SSLversion]  TLSvall
[SSLoptions]  +OP_CIPHER_SERVER_PREFERENCE
[SSLcipherList] EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:-DSS:
</div>

<span class="high bold">YMMV!</span>

<li class="item"> TLS renegotiation (e.g. for a client certificate) must not be performed
on an HTTP/2 secure connection.  This precludes having selected paths perform
authorisation based on X509 and means that the service itself must request a
client certificate at connection establishment (RFC 7540 section 9.2.1).

<li class="item"> While the protocol provides for HTTP/2 using non-TLS (non-SSL)
connections the major browsers (Chrome, Edge (MSIE), FireFox, Safari) only
support it when using TLS.  To <span class="high italic">encourage</span> naive users to a TLS service the
following mapping rule approach may be used to redirect non-TLS home page
connections.

<div class="blockof code"># WASD_CONFIG_MAP
[[*:80]]
if (!ssl:) redirect / https:///
</div>

</ul>

<a id="5.3.1" href="#"></a>
<a id="5.3.1.globalconfiguration" href="#"></a>
<a id="globalconfiguration" href="#"></a>
<h3 class="head"><span class="numb">5.3.1</span><span class="text">Global Configuration</span></h3>

<p> HTTP/2 and its features are globally enabled and configured using
directives contained in the WASD_CONFIG_GLOBAL configuration file.

<a id="5.3.1.0.1" href="#"></a>
<a id="5.3.1.http2globalconfiguration" href="#"></a>
<a id="http2globalconfiguration" href="#"></a>
<h5 class="head"><span class="text">HTTP/2 Global Configuration</span></h5>

<table class="tabl">
<tr class="tabr under">
<th class="tabh">Directive
<th class="tabh">Description
<th class="tabh right">Default
<tr class="tabr">
<tr class="tabr backlight">
<td class="tabd">[Http2Protocol]
<td class="tabd">enabled or disabled on a whole-of-server basis
<td class="tabd right">disabled
<tr class="tabr">
<td class="tabd">[Http2FrameSizeMax]
<td class="tabd">maximum frame size in octets (bytes) the server
is prepared to receive
<td class="tabd right">16384
<tr class="tabr backlight">
<td class="tabd">[Http2HeaderListMax]
<td class="tabd">maximum number of octets (bytes) permitted in
a received header once uncompressed
<td class="tabd right">65535
<tr class="tabr">
<td class="tabd">[Http2HeaderTableMax]
<td class="tabd">maximum number of bytes permitted in the
server-end header cache
<td class="tabd right">4096
<tr class="tabr backlight">
<td class="tabd">[Http2PingSeconds]
<td class="tabd">number of seconds between connection RTT
pings
<td class="tabd right">300
<tr class="tabr">
<td class="tabd">[Http2StreamsMax]
<td class="tabd">maximum number of concurrent streams (requests)
the server permits on the connection
<td class="tabd right">32
<tr class="tabr backlight">
<td class="tabd">[Http2InitWindowSize]
<td class="tabd">initial window size (number of octets in
transit) for flow-control purposes
<td class="tabd right">6291456
</table>

<p> These largely reflect settings and defaults from RFC 7540 6.5.1

<ul class="list">
<li class="item"> The minimum frame size is defined by the RFC at 16384.
<li class="item"> WASD automatically pings a connection every configured seconds.  The
latest value is available as real-number milliseconds in dictionary entry
&quot;http2_ping&quot; and CGI variable HTTP2_PING.
</ul>

<a id="5.3.2" href="#"></a>
<a id="5.3.2.serviceconfiguration" href="#"></a>
<a id="serviceconfiguration" href="#"></a>
<h3 class="head"><span class="numb">5.3.2</span><span class="text">Service Configuration</span></h3>

<p> Using the WASD_CONFIG_SERVICE directive [ServiceHttp2Protocol] HTTP/2
may be disabled on a per-service basis.  The default is enabled if HTTP/2 is
enabled globally.

<a id="5.3.3" href="#"></a>
<a id="5.3.3.http2setrules" href="#"></a>
<a id="http2setrules" href="#"></a>
<h3 class="head"><span class="numb">5.3.3</span><span class="text">HTTP/2 Set Rules</span></h3>

<p> WASD request processing rules may be used on a per-path basis to modify
(some) global configuration settings and provide other WevDAV configuation. 
See <a class="link blank" target="_blank" href="../config/#requestprocessingconfiguration">Request Processing Configuration</a> of <a class="link blank" target="_blank" href="../config/#0.">WASD Configuration</a>).

<table class="tabl">
<tr class="tabr under">
<th class="tabh">Rule
<th class="tabh">Description
<tr class="tabr">
<tr class="tabr backlight">
<td class="tabd">HTTP2=PROTOCOL=1.1
<td class="tabd">send a &quot;HTTP_1_1_REQUIRED&quot; error
causing the client to use HTTP/1.1 (RFC 7540 section 7)
<tr class="tabr">
<td class="tabd">HTTP2=SEND=GOAWAY
<td class="tabd">send a &quot;GOAWAY&quot; frame to the client
resulting in it dropping the HTTP/2 connection
<tr class="tabr backlight">
<td class="tabd">HTTP2=SEND=PING
<td class="tabd">send a &quot;PING&quot; frame to the client
calculating the Round Trip Time (RTT) of the connection
<tr class="tabr">
<td class="tabd">HTTP2=SEND=RESET
<td class="tabd">send a &quot;RST_STREAM&quot; frame to the client 
causing it to drop the HTTP/2 stream (request in progress)
<tr class="tabr backlight">
<td class="tabd">HTTP2=STREAMS=MAX=<span class="high italic">integer</span>
<td class="tabd">set the maximum concurrent
streams on a per-path basis
<tr class="tabr">
<td class="tabd">HTTP2=WRITE=<span class="high italic">low&verbar;normal&verbar;high</span>
<td class="tabd">When request
data  is written it is queued at the specified priority, where high priority
are written before normal (default) and low priority, and normal priority
before low.  This is only for associated stream (request) and is not a
connection or whole-of-server prioritisation.
</table>

<p> Use path SETings to prioritise some resources (e.g. CSS and JavaScript)
over others (e.g. images) and potentially improve page rendering speed.  Where
multiple concurrent requests are being serviced on the one HTTP/2 connection
this will deliver the <span class="high italic">high</span>er priority content before others.

<div class="blockof code"># WASD_CONFIG_MAP
SET **.css http2=write=high
SET **.js  http2=write=high
</div>

<a id="5.4" href="#"></a>
<a id="5.4.http2detection" href="#"></a>
<a id="http2detection" href="#"></a>
<h2 class="head"><span class="numb">5.4</span><span class="text">HTTP/2 Detection</span></h2>

<p> A request using HTTP/2 may be detected during processing with the
<span class="high italic">http2:</span> conditional.

<div class="blockof code">if (http2:)
   <span class="high italic">do this</span>
endif
</div>

<p> See <a class="link blank" target="_blank" href="../config/#conditionalconfiguration">Conditional Configuration</a> of <a class="link blank" target="_blank" href="../config/#0.">WASD Configuration</a>).

<p> A script may detect HTTP/2 using the REQUEST_PROTOCOL CGI variable with the
value &quot;HTTP/2&quot;.  Other protocol versions are similarly represented.

<p> A Server-Side Includes (SSI) document can use variations on the following
construct (and similar to the script suggestion immediately above) to detect
and process the request protocol.

<div class="blockof code">&lt;!--#if var={request_protocol} eqs=&quot;HTTP/2&quot; --&gt;
HTTP/2
&lt;!--#else--&gt;
HTTP/1.n
&lt;!--#endif--&gt;
</div>

This is demonstrated in the example SSI document:
<p class="indent"> <a class="link blank" target="_blank" href="/wasd_root/exercise/shtml.shtml">WASD_ROOT:[EXERCISE]SHTML.SHTML</a>

<p> At the time of writing there is no browser-supported mechanism for a dynamic
document (i.e. JavaScript) determining the underlying HTTP protocol used to
access a resource.  To access this information the server must be used.  The
suggested method, and the one employed by the DOTTY.HTML tool described above,
is to provide one JavaScript source for HTTP/2 and another for everything else.

<p> The document would contain

<div class="blockof code">&lt;script type=&quot;text/javascript&quot; src=&quot;/example-path/http.js&quot;&gt;&lt;/script&gt;
</div>

and the server configuration

<div class="blockof code"># WASD_CONFIG_MAP
if (http2:)
   map /example-path/http.js /example-path/http2.js
else
   map /example-path/http.js /example-path/http1.js
endif
</div>

where each contains a minimum variable setting or similar flag detectable by
the document.

<a id="5.5" href="#"></a>
<a id="5.5.http2references" href="#"></a>
<a id="http2references" href="#"></a>
<h2 class="head"><span class="numb">5.5</span><span class="text">HTTP/2 References</span></h2>

<p> The following provide a starting-point for investigating HTTP/2 (verified
available at time of publication).

<ul class="list">

<li class="item"> <a class="link blank" target="_blank" href="https://http2.github.io/">https://http2.github.io/</a>
<br> Home page for HTTP/2 maintained by the IETF HTTP Working Group.

<li class="item"> <a class="link blank" target="_blank" href="https://en.wikipedia.org/wiki/HTTP/2">https://en.wikipedia.org/wiki/HTTP/2</a>

<li class="item">  <a class="link blank" target="_blank" href="https://httpwg.github.io/specs/rfc7540.html">https://httpwg.github.io/specs/rfc7540.html</a>
<br> <a class="link blank" target="_blank" href="https://tools.ietf.org/html/rfc7540">https://tools.ietf.org/html/rfc7540</a>
<br> HTTP/2 specification

<li class="item">  <a class="link blank" target="_blank" href="https://httpwg.github.io/specs/rfc7541.html">https://httpwg.github.io/specs/rfc7541.html</a>
<br> <a class="link blank" target="_blank" href="https://tools.ietf.org/html/rfc7541">https://tools.ietf.org/html/rfc7541</a>
<br> HPACK (header compression) specification

<li class="item">  <a class="link blank" target="_blank" href="https://httpwg.github.io/specs/rfc7230.html">https://httpwg.github.io/specs/rfc7230.html</a>
<br> <a class="link blank" target="_blank" href="https://tools.ietf.org/html/rfc7230">https://tools.ietf.org/html/rfc7230</a>
<br> Most recent HTTP/1.1 specifications (30, 31, 32, 33, 34 and 35)

<li class="item"> <a class="link blank" target="_blank" href="http://http2-explained.haxx.se/">http://http2-explained.haxx.se/</a>
<br> Useful overview of HTTP/2 by the developer of cURL.

<li class="item"> <a class="link blank" target="_blank" href="https://hpbn.co/http2/">https://hpbn.co/http2/</a>
<br> Another useful and more detailed overview of the protocol.
<br> From the excellent <a class="link blank" target="_blank" href="https://hpbn.co/">https://hpbn.co/</a> 

<li class="item"> <a class="link blank" target="_blank" href="http://undertow.io/blog/2015/04/27/An-in-depth-overview-of-HTTP2.html">http://undertow.io/blog/2015/04/27/An-in-depth-overview-of-HTTP2.html</a>
<br> A concise and useful summary.

<li class="item"> <a class="link blank" target="_blank" href="https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/">https://blog.cloudflare.com/tools-for-debugging-testing-and-using-http-2/</a>
<br> Not much here for VMS but a useful survey nonetheless.

</ul>
<!-- source:0600_WEBDAV.WASDOC -->

<table class="NAVtable NAVprint"><tr>
<td><a href="javascript:window.history.back();">&#8617;&#xFE0E;</a>
<td><a href="features004.html#4.">&#8598;&#xFE0E;</a>
<td><a href="features000.html#0.">&#8593;&#xFE0E;</a>
<td><a href="features006.html#6.">&#8600;&#xFE0E;</a>
<td><a href="javascript:window.history.forward();">&#8618;&#xFE0E;</a>
</table>