O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting Started with Web Performance

Book Description

Speed is money—and increasing web performance can have a significant bottom line impact. This practical guide introduces a new model for thinking about end-to-end performance. Whether you want to write faster applications, or ensure site is fast all the time, you’ll learn how to identify, prioritize, and analyze problems, and then—most importantly—how to optimize performance.

Table of Contents

  1. Preface
    1. Overture: Who Should Read This Book (and Why)
    2. Why You Should Read This Book
    3. What We’ll Cover
    4. What You Need to Know to Get Started
    5. How to Read This Book
    6. Software Tools
      1. About the Companion Site for This Book
      2. Notes on Terminology and References
    7. Themes of the Work
    8. Conventions Used in This Book
    9. Using Code Examples
    10. Safari® Books Online
    11. How to Contact Us
    12. Acknowledgments
  2. 1. What Is Web Performance?
    1. Scope
      1. Performance is Response Time
    2. An Art and a Science
      1. Doing Science Experiments on the Web
      2. Beyond Analysis
    3. Systems Thinking: Where Does Performance Fit In?
      1. Systemic Qualities and the Big Picture on Performance
      2. Manifest Qualities
      3. Developmental Qualities
      4. Operational Qualities
      5. Evolutionary Qualities
    4. Handling Performance Tradeoffs
      1. How to Manage Tradeoffs in Design
        1. Security v. Performance
        2. Budgetability v. Performance
        3. Market Velocity v. Performance
    5. How Fast is Fast Enough?
      1. Role of the Human in Performance
      2. What do Fast and Slow Really Mean?
    6. Dimensions of Web Performance
      1. The Stochastic Web
        1. The “Contraptionary” Nature of the Web
      2. Factors Affecting Web Response Times
        1. Geography
        2. Network Location
        3. Bandwidth and Throughput
      3. Connection Type
        1. Direct Connections (LAN)
        2. 802.11 Wireless (WiFi)
        3. Cellular Networks
    7. Hands-on: Check Your Bandwidth
      1. Task
        1. Using the SpeedTest Tools
      2. What Did We Learn?
      3. User Agents
        1. Browsers
        2. Mobile Applications as User Agents
      4. Traffic Types on the Web
        1. API Traffic
        2. Advertising
        3. Streaming Media Traffic
    8. Hands On: Our First Look at Web Response Times
      1. Tasks
      2. Gathering Data
      3. Generating the Report
      4. Plotting the Data
      5. What We Learned
  3. 2. Introducing the MPPC Model of Web Performance
    1. Model Overview
    2. The User Narrative Viewpoint
    3. The HTTP Request / Response Cycle
      1. HTTP Requests
      2. Response Composition
    4. Loading a Single Object: The Simplest Case
      1. T1 - The Connection Time
      2. T2 - The Server Duration
      3. T3 - The Network Transport Time
      4. T4 - The Client Processing Time
    5. Hands On: A Single-Object Example
    6. Working with Multiple Objects
      1. The Multi-step MPPC Request/Response Pattern
      2. Step One: Loading the Initial DOM Object
      3. What is the DOM?
      4. Step Two: Loading Intransitive Page Objects
      5. Kinds of Hypertext Links
      6. Step Three: Deferred Loading
      7. Pitfalls of Deferred Loading
      8. What Does MPPC Mean?
      9. Summary: MPPC Model Overview
    7. Hands On: Looking at Waterfall Diagrams
      1. Task
      2. Tools
      3. Running a Test
      4. What We Learned
  4. 3. T1 - The Connection Time
    1. Introduction to T1 - The Connection Time
      1. Tools Used
    2. DNS: Internet Names and Addresses
      1. How DNS Works
      2. DNS and Performance
      3. DNS and Global Server Load Balancing
      4. Hands-on: The User Impact of DNS
      5. Tools Required
      6. Performing the Test
      7. What We Learned
      8. Finding and Solving DNS Performance Problems
      9. Optimizing Your DNS Response Times
    3. SYN SYN ACK - Setting Up a TCP Connection
      1. TCP Connections and Response Times
      2. Finding and Solving TCP Connection problems
      3. Optimizing TCP Connection Times
      4. Secular Cycles and Response Times
    4. TLS, SSL, and Secure Connections
      1. TLS, SSL, and All That
      2. How TLS Works
        1. HTTP vs. HTTPS
        2. The Basic TLS Handshake
        3. Hands-On: The TLS Handshake in Action
      3. Task
      4. What We Learned
        1. TLS: Certificates & Verification
      5. Certificate Verification
      6. Key Length, Security, & Performance
      7. Extended Validation
        1. Revocation Checks: OCSP and CRL
      8. OCSP
        1. How Long Does an OCSP Lookup Take?
        2. OCSP Caching
      9. CRL
      10. What Makes TLS Slow?
      11. Optimizing Your TLS Response Times
        1. Early Termination
        2. Session Resumption
        3. OCSP Stapling
        4. Certificate Chain Length
      12. TCP-Level Optimizations
        1. Certificate (and Record) Size
        2. TLS Compression
        3. TLS False Start
        4. A Word on Packet Loss
        5. Finding and Fixing TLS-related problems
        6. How Much Does TLS Matter for Performance?
    5. Summing Up on T1
  5. About the Author
  6. Copyright