Code Monkey home page Code Monkey logo

http2-explained's Introduction

http2 explained

This is a detailed document describing HTTP/2 (RFC 7540), the background, concepts, protocol and something about existing implementations and what the future might hold.

The contents are translated into several different languages.

See https://daniel.haxx.se/http2/ for the canonical home for this project.

See https://github.com/bagder/http2-explained for the source code of all book contents.

LICENSE

The document is distributed under the Creative Commons Attribution 4.0 license: https://creativecommons.org/licenses/by/4.0/

CONTRIBUTING

I encourage and welcome help and contributions from anyone who may have improvements to offer. We accept pull requests, but you can also just file issues or send email to [email protected] with your suggestions!

/ Daniel Stenberg

http2-explained's People

Contributors

5k9m avatar bagder avatar brunolellis avatar deadlylaid avatar ersi avatar fantuz avatar fboleto avatar git001 avatar i-sevostyanov avatar iak avatar jabiinfante avatar julienw avatar kengos avatar luh2 avatar machour avatar olegstepura avatar samnela avatar serenaygdemir avatar simonvik avatar tatsuhiro-t avatar theshiver avatar uiandwe avatar vlet avatar vszakats avatar west81 avatar wlonkly avatar xqin avatar ye11ow avatar yevgnenll avatar zynpsnltrkk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

http2-explained's Issues

Name parts with number less 10 with a leading zero

Now github orders files the wrong way. I suggest solving this by adding a leading zero to numbers < 10

Before:

part1.md
part10.md
part11.md
part12.md
part13.md
part14.md
part2.md
part3.md
part4.md
part5.md
part6.md
part7.md
part8.md
part9.md

After

part01.md
part02.md
part03.md
part04.md
part05.md
part06.md
part07.md
part08.md
part09.md
part10.md
part11.md
part12.md
part13.md
part14.md

2.2

original

2.2 A world of options
HTTP 1.1's nature of having lots of tiny details and options available for later extensions
have grown a software ecosystem where almost no implementations ever implement
everything – and it isn't even really possible to exactly tell what “everything” is. This has
lead to a situation where features that were initially little used saw very few
implementations and those who did implement the features then saw very little use of
them. It caused an interoperability problem when then much later on clients and servers
have started to increase the use of some such features. HTTP Pipelining being a primary example of such a one.

Then much later on, it caused an interoperability problem when clients and servers started to increase the use of such features. HTTP Pipelining is a primary example of such a feature.

http2 in nginx/apache

Add descriptions on how to activate and use HTTP/2 with these popular servers, based on how it is done in the existing (patches/pre-release) versions.

7.2

Over the years web developers and web development environments have gather a full toolbox of tricks and tools to work around problems with HTTP 1.1, some of them as I outlined in the beginning of this document.

gathered

A problem here is of course that web sites and web developers need to develop and deploy for a world that in the short term at least, will have both HTTP1.1 and http2 clients as users and to get maximum performance for all users can be challenging without having to offering two different front-ends.

offer

For these reasons alone, I suspect there will be some time before we will see the full potentials of http2 being used.

potential of http2 being reached.

Incomplete Swedish translation

I started the Swedish translation, mostly to get the ball rolling. So far it is only part1 with a non-translated document history (I find that part more or less unnecessary to translate anyway since those versions never existed in Swedish).

6.2 define -> defined

There are ten different frames
define in the http2 spec and the
two perhaps most fundamental
ones that map HTTP 1.1 features
are DATA and HEADERS.

define -> defined

HTML version

Convert the ODF version into a HTML version that can be hosted on a single web page and in one page per chapter.

The work has began. I store the images in a separate directory (https://github.com/bagder/http2-explained/tree/master/images ) and I name the HTML directory after the language of the text (https://github.com/bagder/http2-explained/tree/master/en ) to allow more (future) versions in case translators want to use HTML too.

I have not considered CSS or other styling issues and I suck at that anyway.

Mentioning colors for grayscale ebooks

Problem

Mentioning colours in text referring to diagrams displayed on grayscale ebook readers makes it hard to understand the diagram since the colours are indistinguishable.

Solution

Don't use colours to differentiate but use symbols or changes in line drawing. For instance a dotted line vs a connected line. This is easy to understand on a gray scale ereader (in my case an older Kindle).

Details

In '2.4 Transfer sizes and number of objects' you're referring to specific colors:

"It shows the growth of the total transfer size (in green) and the total number of requests used on average (in red) to serve the most popular web sites in the world, and how they have changed over the last four years."

ps: Thanks for sharing your knowledge!

expand server push

When I do HTTP/2 presentations I get a lot of questions about server push so I think it is worthwhile to expand that section and describe:

1 - the client can reject them at once if it wants to (and it has a small initial window)
2 - the contents will not end up in the browser cache immediately unless the resource is otherwise used
3 - no, a server cannot DOS a client with this in anyway more than it already could using other means

5.2

The subject about mandatory TLS has caused much hand- waiving and agitated voices in mailing lists and meetings – is it good or is it evil?

waiving -> waving

4.1.1

The group is named HTTPbis where the “bis” part comes from the Latin adverb for "two".

I don't know much Latin, but "two" is an adjective in every language I know.

Gitbook - search feature

Hi Daniel,
Not sure if Gitbook is limited regarding the search feature.
I tried Chrome 45 and Safari on Mac, it doesn't highlight the term you search for, though it will limit the scope to the pages that have the searched for term.

-Olivier.

4.1

Everyone who attends and says something have the same weight and
chance to affect the outcome and everyone is counted as humans and individuals, little
care is given to which companies the individuals work for.

have -> has

Everyone who attends and says something has the same weight and
chance to affect the outcome and everyone is counted as humans and individuals, little
care is given to which companies the individuals work for.

Gitbook - no page breaks in PDF

Hi Daniel,
I see the Gitbook published book doesn't have any page breaks when converted to PDF. Not sure if it's a Gitbook limitation or a formatting issue.
Some people may like to download and print the PDF.

4.2

SPDY3
is a protocol that was developed and spearheaded by Google. They certainly
developed it in the open and invited everyone to participate and but it was obvious that
they had huge benefits by being in control over both a popular browser implementation
and a significant server population with well-used services.

"and but" -> "but"

SPDY3
is a protocol that was developed and spearheaded by Google. They certainly
developed it in the open and invited everyone to participate but it was obvious that
they had huge benefits by being in control over both a popular browser implementation
and a significant server population with well-used services.

When the HTTPbis group decided it was time to start working on http2. SPDY had already
proven that it was a working concept.

. -> ,

When the HTTPbis group decided it was time to start working on http2, SPDY had already
proven that it was a working concept.

Little spelling mistake in ru/part6

6.5. Сжатие заголовков

Paragraph
Как я уже упоминал, в то время как число объектов на странице увеличивается, использование cookie и размер запросов также продолжают расти. Cookie также должны быть включены во все запросы, практически всегда одинаковые на протяжение множества запросов.

Need replace "на протяжение множества запросов" to "на протяжении множества запросов"

Translate the book

Hi,
First of all, I would like to thanks, this book is very cool and helped me a lot.

What do you think about to translate it for any languages?

Thanks!

explainining

from github description:
"http2 explained is a detailed document explainining and documenting the new protocol"

should be explaining (unless it was on purpose)

Little mistake in ru/part12

12.1. QUIC

Протокол QUIC (Quick UDP Internet Connections, Быстрые UDP Интернет Соединений) Гугла – это интересный эксперимент, проведённый в том же стиле, как и с SPDY. QUIC – это замена TCP + TLS + HTTP/2, реализованная поверх UDP.

"Быстрые UDP Интернет Соединений" replace to "Быстрые UDP интернет соединения"

Typo in Section 11.4: Command line use

Minor typo in the text of section 11.4 in the guide:
"To tell curl to use http2, either plain text or over TLS, you use the –http2 option (that is
“dash dash http2”). curl still defaults to HTTP/1.1 so the extra option is necessary when
you want http2."

The "-http2 option" bit contains only one hyphen/dash and should be changed to line up with the text

8.4.3. missing preposition

8.4.3. “The protocol is only useful big sites”
version 1.10

Looks like a "for" is missing. s/useful big/useful for big/ ?

Spelling

If I guess correctly that "voilá" on English version pdf page 9 is the French word, then it should be spelled "voilà". There is no a-acute letter in French.

taking full advantage

original

HTTP 1.1 has a hard time to really take full advantage of all the powers and performance
that TCP offers

new

HTTP 1.1 has a hard time really taking full advantage of all the powers and performance that TCP offers

5

So what's http2 set out to do then? Where's the boundaries for what the HTTPbis group
was set out to do?

Where's -> Where are
was set -> set

So what's http2 set out to do then? Where are the boundaries for what the HTTPbis group set out to do?

There's no more minor versions in http2.

There are no more minor versions in http2.

grammar and spelling on page 9

HTTP initially said that a client was allowed to use maximum two TCP connections for each host. So, in order to not violate the spec clever sites simply invented new host names and voilá

Should be "to use at most two TCP connections", and the accent is "voilà".

Also it would be nice to be more specific, e.g. "The HTTP 1.1 specification section 8.1.4 said 'A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy.' " I don't see any mention of the two connection limit in RFC 1945 for HTTP 1.0.

7.1

http2 reduces the number of necessary network round-trips and it avoid the head of line blocking dilemma completely with multiplexing and fast discarding of unwanted streams.

avoid -> avoids

sharding

The final trick I'll mention that sites owners to do perform better in browsers is often
referred to as “sharding”

change "to do" to "do to"

expand dependencies

Since tests have proven that stream dependencies can have a significant impact on performance or time to first-draw, I think it is worth expanding the description of that.

Concatenation

The annoyance to developers and the hoops everyone has to go through to do this is of course “just” pain for the humans involved and not seen in any performance numbers...

I'm not a native speaker but this sentence is difficult to understand. What is not seen in any performance numbers? The annoyance, I guess (after reading this sentence 10 times)? On my first read I understood that this trick did not improve performance.

Thanks for the book!

Remove the old .fodt / .fodp files from the repo?

Not sure how you would feel about that, but I'm using a slow network connection and having to download the now outdated English and French fodt files seems kind of pointless now.

Maybe the presentation fodp file could be vacuum flushed too ? Everything would anyway reside for ever in the git history.

Spanish should be kept until migration is done though.

broken images (in html version)

I believe my switching on the multi-language support or something broke the images. They are now rendered with wrong path and thus aren't visible.

I put the images in a common directory so that translations can use the same pics but apparently I need to do something different to make it work. I contacted gitbook and asked about it.

6.10

For every stream both ends has to tell the peer that it has more room to fit incoming data in, and the other end is only allowed to send that much data until the window is extended.

For every stream, both ends have

6.5 Plural "somethings"

In 6.5 Header Compression, paragraph 2:

A series of almost identical something begs for compression.

Should be:

A series of almost identical somethings begs for compression.

plain-text http2?!

8.3 says:
"curl and libcurl has its implementation based on the separate http2 library called nghttp2 and supports plain-text http2..."

plain-text http2?! http2 is binary and it cannot be plain-text, this sentence is confusing. You mean non-TLS http2, right?

page 10 typo

The HTTPbis working group was formed during the summer of 2007 and was set out to
do an updated of the HTTP 1.1 specification

should be "update" instead of "updated"

line picking

Sure you can be careful about
picking line so that you pick the
one you really believe is the
correct one, and at times you
can even start a new line of
your own but in the end you
can't avoid making a decision
and once it is made you cannot
switch lines.

"line picking" sounds more natural to me than "picking line"

Graph keys/labels

On page 6, the line graph (presumably showing objects/page and load size) includes no key to specifically state that it is the case.

Just for best practice and all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.