HTTP/2 in Action
Barry Pollard
  • MEAP began December 2017
  • Publication in March 2019 (estimated)
  • ISBN 9781617295164
  • 408 pages (estimated)
  • printed in black & white

Good coverage on topics and very well explained.

Sandeep Khurana

The Hypertext Transfer Protocol, or HTTP, defines how data travels on the web, including the billions of web page requests happening each day. HTTP/2 is the most significant upgrade to the protocol in 20 years. The new standard is more efficient, which means faster, safer web traffic. HTTP/2 in Action introduces HTTP/2 and teaches you everything you need to use it effectively!

Table of Contents detailed table of contents

Part 1: Moving to HTTP/2

1 Web Technologies and HTTP

1.1 How the web works

1.1.1 The Internet versus the World Wide Web

1.1.2 What happens when you browse the web?

1.2 What is HTTP?

1.2.1 Basic HTTP Request Syntax

1.3 The Syntax and History of HTTP

1.3.1 HTTP/0.9

1.3.2 HTTP/1.0

1.3.3 HTTP/1.1

1.4 Introduction to HTTPS

1.4.1 HTTPS and HTTP

1.5 Tools for viewing, sending and receiving HTTP messages

1.5.1 Using Developer tools in Web Browsers

1.5.2 Sending HTTP Requests

1.5.3 Other tools for to view and send HTTP Requests

1.6 Summary

2 Road to HTTP/2

2.1 HTTP/1.1 and the current World Wide Web

2.1.1 HTTP/1.1 has a fundamental performance problem.

2.1.2 Pipelining for HTTP/1.1

2.1.3 Waterfall Diagrams for Web Performance Measurement

2.2 Workarounds for HTTP/1.1 Performance issues

2.2.1 Use Multiple HTTP Connections

2.2.2 Make Fewer Requests

2.2.3 HTTP/1 Performance Optimizations Summary

2.3 Other issues with HTTP/1.1

2.4 Real World Examples

2.4.1 Example Website 1 -

2.4.2 Example Website 2 -

2.4.3 How much of a problem is this really?

2.5 Moving on from HTTP/1.1 to HTTP/2

2.5.1 SPDY

2.5.2 HTTP/2

2.6 What HTTP/2 means for Web Performance

2.6.1 Extreme Example of the Power of HTTP/2

2.6.2 Setting Expectations of HTTP/2 Performance Gains

2.6.3 Performance Workarounds for HTTP/1.1 are potentially Anti-Patterns.

2.7 Summary

3 Upgrading to HTTP/2

3.1 HTTP/2 Support

3.1.1 HTTP/2 Support on Browser Side.

3.1.2 HTTP/2 Support for Servers

3.1.3 Fallback when HTTP/2 is not supported

3.2 Ways to enable HTTP/2 for your website

3.2.1 HTTP/2 on your Web Server

3.2.2 HTTP/2 with a Reverse Proxy

3.2.3 HTTP/2 through a CDN

3.2.4 Implementing HTTP/2 Summary

3.3 Troubleshooting HTTP/2 setup

3.4 Summary

Part 2: Using HTTP/2

4 HTTP/2 Protocol Basics

4.1 Why HTTP/2 instead of HTTP/1.2?

4.1.1 Binary rather than textual

4.1.2 Multiplexed, rather than synchronous

4.1.3 Stream Prioritization and Flow Control

4.1.4 Header Compression

4.1.5 Server Push

4.2 How an HTTP/2 Connection is Established

4.2.1 Using HTTPS Negotiation

4.2.2 Using the HTTP Upgrade header

4.2.3 Using prior knowledge

4.2.4 Alternative Services

4.2.5 The HTTP/2 Preface Message

4.3 HTTP/2 Frames

4.3.1 Viewing HTTP/2 Frames

4.3.2 HTTP/2 Frame Format

4.3.3 Examining HTTP/2 Message Flow by Example

4.3.4 Other Frames

4.4 Summary

5 Implementing HTTP/2 Push

5.1 What is HTTP/2 Server Push?

5.2 How to Push

5.2.2 Viewing HTTP/2 Pushes

5.2.4 Pushing earlier

5.2.5 Other ways to Push

5.3 How HTTP/2 Push works in the browser

5.3.1 More details on how the Push Cache works

5.3.2 Refusing Pushes with RST_STREAM

5.4 How to Push Conditionally

5.4.1 Tracking pushes on the server side

5.4.2 Use of HTTP Conditional Requests

5.4.4 Cache Digests

5.5 What to Push?

5.5.1 What can you Push?

5.5.2 What should you Push?

5.5.3 Automating Push

5.6 Troubleshooting HTTP/2 Push

5.7 The Performance Impact of HTTP/2 Push

5.8 Push versus Preload

5.9 Other use cases for HTTP/2 Push

5.10 Summary

6 Optimizing for HTTP/2

6.1 What HTTP/2 means for Web Developers

6.2 Are some HTTP/1.1 optimizations now anti-patterns?

6.2.1 HTTP/2 requests still have a cost

6.2.2 HTTP/2 is not limitless

6.2.3 Compression is more efficient for larger resources

6.2.4 Bandwidth limitations and resource contention.

6.2.5 Sharding

6.2.6 Inlining

6.2.7 Conclusion on whether some HTTP/1.1 optimizations are anti-patterns.

6.3 Web Performance Techniques still relevant under HTTP/2

6.3.1 Minimizing the amount of Data Transferred

6.3.2 Use Caching to prevent resending data

6.3.3 Service Workers can further reduce load on the Network

6.3.4 Don’t send what you don’t need

6.3.5 HTTP Resource Hints

6.3.6 Reduce last mile latency

6.3.7 Optimize HTTPS

6.4 Optimizing for both HTTP/1.1 and HTTP/2

6.4.1 Measuring HTTP/2 traffic

6.4.2 Detecting HTTP/2 support on the server side

6.4.3 Detecting HTTP/2 Support on the client side

6.4.4 Connection Coalescing

6.4.5 How long to optimize for HTTP/1.1 users?

6.5 Summary

Part 3: Advanced HTTP/2

7 Advanced HTTP/2 Concepts

7.1 Stream States

7.2 Flow Control

7.2.1 Example of Flow Control

7.2.2 Setting Flow Control on the server

7.3 Stream Priorities

7.3.1 Stream Dependencies

7.3.2 Stream Weighting

7.3.3 Why does it need to be so complicated?

7.3.4 Prioritization in Web Servers and Browsers

7.4 HTTP/2 Conformance Testing

7.4.1 Client conformance testing

7.5 Summary

8 HPACK Header Compression

8.1 Why is Header Compression needed?

8.2 How Compression Works

8.2.1 Lookup Tables

8.2.2 More Efficient Encoding Techniques

8.2.3 Lookback Compression

8.3 HTTP Body Compression

8.3.1 Why We Cannot Use HTTP Body Compression Techniques For Header Compression

8.4 HPACK: Header Compression for HTTP/2

8.4.1 HPACK Static Table

8.4.2 HPACK Dynamic Table

8.4.3 HPACK Header Types

8.4.4 Huffman Encoding table

8.4.5 Huffman Encoding Script

8.4.6 Huffman encoding is not always optimal

8.5 Real World Examples of HPACK Compression

8.6 HPACK in Client and Server Implementations

8.7 HPACK Summary

Part 4: The Future of HTTP/2

9 TCP and QUIC

9.1 TCP Inefficiencies and HTTP

9.1.1 Setup delay in creating an HTTP connection

9.1.2 Congestion control inefficiencies in TCP

9.1.3 Impact of TCP inefficiencies for HTTP/2.

9.1.4 Optimizing TCP

9.1.5 The future of TCP and HTTP

9.2 QUIC

9.2.1 The performance benefits of QUIC

9.2.2 QUIC and the Internet Stack

9.2.3 What UDP is and why QUIC is built on it

9.2.4 Standardizing QUIC

9.2.5 Differences between HTTP/2 and QUIC

9.2.6 QUIC Tools

9.2.7 Should you use QUIC?

9.3 Summary

10 Where HTTP goes from here

10.1 Controversies of HTTP/2 and what it did not Fix

10.1.1 Arguments against SPDY

10.1.2 Privacy issues and State in HTTP

10.1.3 HTTP and Encryption

10.1.4 Transport Protocol issues

10.1.5 It’s all too complicated!

10.1.6 It’s a stop gap

10.2 HTTP/2 in the real world

10.3 Future versions of HTTP/2 and what HTTP/3 might bring

10.3.1 Is QUIC HTTP/3?

10.3.2 Evolving the HTTP binary protocol further

10.3.3 Evolving HTTP above the Transport Layer

10.3.4 What would require a new HTTP version?

10.3.5 How future versions of HTTP might be introduced?

10.4 HTTP as a more generic transport protocol

10.4.1 Use HTTP semantics and messages to deliver non-web traffic

10.4.2 Use the HTTP/2 binary framing layer

10.4.3 Use HTTP as a way of starting another protocol

10.5 Summary


Appendix A: Upgrading common web servers to HTTP/2

A.1 Upgrading your web server to support HTTP/2

A.1.1 Apache

A.1.2 Nginx

A.1.3 Microsoft Internet Information Services (IIS)

A.1.4 Other Servers

A.2 Setting up HTTP/2 via a Reverse Proxy Server

A.2.1 Apache

A.2.2 Nginx

About the Technology

The Hypertext Transfer Protocol—HTTP—defines how data travels on the web and allows websites and browsers to send instructions, and hints to each other. It's the foundation of how we interact with the world wide web, and after 20 years it's finally gotten a major upgrade. HTTP/2 introduces request multiplexing and request prioritization, which allows the web to to handle the ever increasing traffic that makes up modern websites better and header compression, which reduces the overall volume of data in transit with each web request. The new protocol also offers better support for modern techniques not anticipated by the original standard, such as server push.

About the book

HTTP/2 in Action is a complete guide to HTTP/2, one of the core protocols of the web. Because HTTP/2 has been designed to be easy to transition to, including keeping it backwards compatible, so adoption is already rapid and only expected to increase over the next few years. Concentrating on practical matters, this interesting book presents key HTTP/2 concepts such as frames, streams, and multiplexing and explores how they affect the performance and behavior of your web sites. You'll learn what you need to change and how to deal with a web-in-transition as more sites begin to use the new protocol. With the ready-to-implement tips and best practices on everything from server push to debugging, this book is sure to get you—and your websites—up to speed with HTTP/2!

What's inside

  • Upgrading to HTTP/2
  • Understanding the HTTP/2 protocol - frames, streams and multiplexing
  • HTTP/2 Server Push - what it is, who you can use it and if you should
  • What HTTP/2 means for Web Developers
  • QUIC and HTTP/2

About the reader

Written for developers or website administrators with a basic understanding of web development. Some chapters use JavaScript-based examples but the techniques should apply to any HTTP/2 implementation.

About the author

Barry Pollard is a professional software developer with nearly two decades of industry experience developing and supporting software and infrastructure. He has a keen interest in web technologies, performance tuning, security, and the practical usage of technology.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks

A fantastic overview of HTTP/2, giving a solid foundation for those who are less familiar with it, and builds up from there.

Matt D.

The detail and well thought explanations were great.

Justin Coulston