
About this book
HTTP/2 in Action was written to explain the protocol in an easy-to-follow, practical manner, using real-world examples. Protocol specifications can be dry and difficult to understand, so this book aims to ground the details in easy-to-understand examples that are relevant to all users of the internet.
This book was written for web developers, website administrators, and those who simply have an interest in understanding how internet technology works. The book aims to provide complete coverage of HTTP/2 and all the subtleties involved in it. Although plenty of blog posts on the topic exist, most are at a high level or a detailed level on a specific topic. This book aims to cover the entire protocol and many of the complexities involved in it, which should prepare the reader to read and understand the spec and specific blog posts, should they wish to read even further. HTTP/2 was created primarily to improve performance, so anyone who’s interested in web performance optimization is sure to gain useful understanding and insights. Additionally, the book contains many references for further reading.
The book is 10 chapters divided into 4 parts.
Part 1 explains the background of, need for, and ways of upgrading to HTTP/2:
- Chapter 1 provides the background needed to understand the book. Even those with only a basic understanding of the internet should be able to follow along.
- Chapter 2 looks at the problems with HTTP/1.1 and why HTTP/2 was needed.
- Chapter 3 discusses the upgrade options that enable HTTP/2 for your website and some of the complications involved with this process. This chapter is supplemented by the appendix, which provides installation instructions for the popular web servers Apache, nginx, and IIS.
The pace picks up in part 2, as I teach the protocol and what it means for web development practices:
- Chapter 4 describes the basics of the HTTP/2 protocol, how an HTTP/2 connection is established, and the basic format of HTTP/2 frames.
- Chapter 5 covers HTTP/2 push, which is a brand-new part of the protocol, allowing website owners to proactively send resources that browsers haven’t yet asked for.
- Chapter 6 looks at what HTTP/2 means for web development practices.
Part 3 gets into the advanced parts of the protocol, which web developers and even web server administrators may not currently have much ability to influence:
- Chapter 7 covers the remainder of the HTTP/2 specification—including state, flow control, and priorities—and looks at the differences in HTTP/2 conformance in the implementations.
- Chapter 8 takes a deep dive into the HPACK protocol, which is used for HTTP header compression in HTTP/2.
Part 4 looks at the future of HTTP:
- Chapter 9 looks at TCP, QUIC, and HTTP/3. Technology never sleeps, and now that HTTP/2 is available, developers are already looking at ways to improve it. This chapter discusses the inefficiencies that weren’t solved by HTTP/2 and how they may be improved in its successor: HTTP/3.
- Chapter 10 looks beyond HTTP/3 at other ways that HTTP can be improved, including a reflection on the problems that were raised during HTTP/2 standardization and whether these problems have proved to be issues in the real world.
After reading this book, readers should have an excellent understanding of HTTP/2 and related technologies, and they should have gained greater understanding of web performance optimization. They will also be ready for QUIC and HTTP/3 when it comes out in the future.
Unlike most technical books, HTTP/2 in Action doesn’t have a huge amount of code, because the book is about a protocol rather than a programming language. It tries to teach you high-level concepts that apply to any web server or programming language used to serve pages on the web. The book has some examples in NodeJS and Perl, however, as well as web-server configuration snippets.
Source code and configuration snippets are formatted in a fixed-width font like this to separate them from ordinary text. Sometimes, code is also in bold to highlight code that has changed from previous steps in the chapter, such as when a new feature adds to an existing line of code.
The source code is available to download from the publisher’s website at https://www.manning.com/books/http2-in-action or from GitHub at https://github.com/bazzadp/http2-in-action.
Purchase of HTTP/2 in Action includes free access to a private web forum run by Manning Publications, where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum go to https://livebook.manning.com/book/http2-in-action/discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/#!/discussion.
Manning’s commitment to our readers is to provide a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking the author some challenging questions lest his interest stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.
Need additional help?
- The HTTP/2 home page is at https://http2.github.io/. The page includes links to the HTTP/2 and HPACK specifications, HTTP/2 implementations, and FAQs.
- The HTTP Working Group home page is at https://httpwg.org/. Most of the group’s work is publicly available at the GitHub page https://github.com/httpwg/ and the group’s mailing lists (https://lists.w3.org/Archives/Public/ietf-http-wg/).
- Stack Overflow also has an HTTP/2 tag (https://stackoverflow.com/questions/tagged/http2), and the author often answers questions there.