Synopses & Reviews
How prepared are you when it comes to building network-enabled applications? This book provides what every web developer should know about the network—from fundamental limitations that affect performance to major innovations for building even more powerful browser apps. By understanding what the browser can and cannot do, youll be able to make better design decisions and deliver faster web applications to your users.
Author Ilya Grigorik—a developer advocate and web performance engineer at Google—starts with the building blocks of TCP and UDP, and then dives into newer technologies such as HTTP 2.0, WebSockets, and WebRTC. This book explains the benefits of these technologies and helps you determine which ones to use for your next application.
- Learn how TCP affects the performance of HTTP
- Understand why mobile networks are slower than wired networks
- Use best practices to address performance bottlenecks in HTTP
- Discover how HTTP 2.0 (based on SPDY) will improve networking
- Learn how to use Server Sent Events (SSE) for push updates, and WebSockets for XMPP chat
- Explore WebRTC for browser-to-browser applications such as P2P video chat
- Examine the architecture of a simple app that uses HTTP 2.0, SSE, WebSockets, and WebRTC
With this digital Early Release edition of High Performance Browser Networking, you get chapters in their earliest form—the author's raw and unedited drafts—so you can take advantage of this content long before the book's official release. You'll also receive updates when significant changes are made, new chapters as they're written, and the final ebook bundle.
Synopsis
How prepared are you to build fast and efficient web applications? This eloquent book provides what every web developer should know about the network, from fundamental limitations that affect performance to major innovations for building even more powerful browser applications—including HTTP 2.0 and XHR improvements, Server-Sent Events (SSE), WebSocket, and WebRTC.
Author Ilya Grigorik, a web performance engineer at Google, demonstrates performance optimization best practices for TCP, UDP, and TLS protocols, and explains unique wireless and mobile network optimization requirements. Youll then dive into performance characteristics of technologies such as HTTP 2.0, client-side network scripting with XHR, real-time streaming with SSE and WebSocket, and P2P communication with WebRTC.
- Deliver superlative TCP, UDP, and TLS performance
- Speed up network performance over 3G/4G mobile networks
- Develop fast and energy-efficient mobile applications
- Address bottlenecks in HTTP 1.x and other browser protocols
- Plan for and deliver the best HTTP 2.0 performance
- Enable efficient real-time streaming in the browser
- Create efficient peer-to-peer videoconferencing and low-latency applications with real-time WebRTC transports
About the Author
Ilya Grigorik is a developer advocate and web performance engineer at Google. He spends his days and nights working on making the web faster and building and driving adoption of performance best practices.
Prior to focusing on web performance Ilya was the founder and CTO of PostRank, a social analytics company which was acquired by Google and became the core of social analytics reporting within Google Analytics. Whenever not thinking web performance, or analytics, Ilya can be found contributing to open-source projects, reading, or building fun projects like VimGolf, GitHub Archive and others.
Table of Contents
Foreword; Preface; About This Book; Conventions Used in This Book; Safari® Books Online; How to Contact Us; Networking 101; Chapter 1: Primer on Latency and Bandwidth; 1.1 Speed Is a Feature; 1.2 The Many Components of Latency; 1.3 Speed of Light and Propagation Latency; 1.4 Last-Mile Latency; 1.5 Bandwidth in Core Networks; 1.6 Bandwidth at the Network Edge; 1.7 Delivering Higher Bandwidth and Lower Latencies; Chapter 2: Building Blocks of TCP; 2.1 Three-Way Handshake; 2.2 Congestion Avoidance and Control; 2.3 Bandwidth-Delay Product; 2.4 Head-of-Line Blocking; 2.5 Optimizing for TCP; Chapter 3: Building Blocks of UDP; 3.1 Null Protocol Services; 3.2 UDP and Network Address Translators; 3.3 Optimizing for UDP; Chapter 4: Transport Layer Security (TLS); 4.1 Encryption, Authentication, and Integrity; 4.2 TLS Handshake; 4.3 TLS Session Resumption; 4.4 Chain of Trust and Certificate Authorities; 4.5 Certificate Revocation; 4.6 TLS Record Protocol; 4.7 Optimizing for TLS; 4.8 Performance Checklist; 4.9 Testing and Verification; Performance of Wireless Networks; Chapter 5: Introduction to Wireless Networks; 5.1 Ubiquitous Connectivity; 5.2 Types of Wireless Networks; 5.3 Performance Fundamentals of Wireless Networks; 5.4 Measuring Real-World Wireless Performance; Chapter 6: WiFi; 6.1 From Ethernet to a Wireless LAN; 6.2 WiFi Standards and Features; 6.3 Measuring and Optimizing WiFi Performance; 6.4 Optimizing for WiFi Networks; Chapter 7: Mobile Networks; 7.1 Brief History of the G's; 7.2 Device Features and Capabilities; 7.3 Radio Resource Controller (RRC); 7.4 End-to-End Carrier Architecture; 7.5 Packet Flow in a Mobile Network; 7.6 Heterogeneous Networks (HetNets); 7.7 Real-World 3G, 4G, and WiFi Performance; Chapter 8: Optimizing for Mobile Networks; 8.1 Preserve Battery Power; 8.2 Eliminate Periodic and Inefficient Data Transfers; 8.3 Anticipate Network Latency Overhead; 8.4 Design for Variable Network Interface Availability; 8.5 Burst Your Data and Return to Idle; 8.6 Offload to WiFi Networks; 8.7 Apply Protocol and Application Best Practices; HTTP; Chapter 9: Brief History of HTTP; 9.1 HTTP 0.9: The One-Line Protocol; 9.2 HTTP 1.0: Rapid Growth and Informational RFC; 9.3 HTTP 1.1: Internet Standard; 9.4 HTTP 2.0: Improving Transport Performance; Chapter 10: Primer on Web Performance; 10.1 Hypertext, Web Pages, and Web Applications; 10.2 Anatomy of a Modern Web Application; 10.3 Performance Pillars: Computing, Rendering, Networking; 10.4 Synthetic and Real-User Performance Measurement; 10.5 Browser Optimization; Chapter 11: HTTP 1.X; 11.1 Benefits of Keepalive Connections; 11.2 HTTP Pipelining; 11.3 Using Multiple TCP Connections; 11.4 Domain Sharding; 11.5 Measuring and Controlling Protocol Overhead; 11.6 Concatenation and Spriting; 11.7 Resource Inlining; Chapter 12: HTTP 2.0; 12.1 History and Relationship to SPDY; 12.2 The Road to HTTP 2.0; 12.3 Design and Technical Goals; 12.4 Brief Introduction to Binary Framing; Chapter 13: Optimizing Application Delivery; 13.1 Evergreen Performance Best Practices; 13.2 Optimizing for HTTP 1.x; 13.3 Optimizing for HTTP 2.0; Browser APIs and Protocols; Chapter 14: Primer on Browser Networking; 14.1 Connection Management and Optimization; 14.2 Network Security and Sandboxing; 14.3 Resource and Client State Caching; 14.4 Application APIs and Protocols; Chapter 15: XMLHttpRequest; 15.1 Brief History of XHR; 15.2 Cross-Origin Resource Sharing (CORS); 15.3 Downloading Data with XHR; 15.4 Uploading Data with XHR; 15.5 Monitoring Download and Upload Progress; 15.6 Streaming Data with XHR; 15.7 Real-Time Notifications and Delivery; 15.8 XHR Use Cases and Performance; Chapter 16: Server-Sent Events (SSE); 16.1 EventSource API; 16.2 Event Stream Protocol; 16.3 SSE Use Cases and Performance; Chapter 17: WebSocket; 17.1 WebSocket API; 17.2 WebSocket Protocol; 17.3 WebSocket Use Cases and Performance; 17.4 Performance Checklist; Chapter 18: WebRTC; 18.1 Standards and Development of WebRTC; 18.2 Audio and Video Engines; 18.3 Real-Time Network Transports; 18.4 Establishing a Peer-to-Peer Connection; 18.5 Delivering Media and Application Data; 18.6 DataChannel; 18.7 WebRTC Use Cases and Performance; 18.8 Performance Checklist; Index; Colophon;