Upgrade to Pro — share decks privately, control downloads, hide ads and more …

You Ain't SPDY

chris
September 19, 2011

You Ain't SPDY

You package your assets. You use CSS sprites. You serve up everything with gzip compression. You obsess over Yslow recommendations. But you are still not SPDY.

Fundamental limitations in HTTP and TCP/IP still add up to 60% overhead to your site. Find out how to reclaim that lost bandwidth and increase the robustness of your sites at the same time.

chris

September 19, 2011
Tweet

More Decks by chris

Other Decks in Technology

Transcript

  1. 38% of broadband users will close a site if it

    doesn't respond in 4 seconds
  2. 38% of broadband users will close a site if it

    doesn't respond in 4 seconds (precision is the key to any good statistic)
  3. took 4.2 seconds to load 469kB of data over 75

    requests took ??? seconds to load 806kB of data over 83 requests
  4. took 4.2 seconds to load 469kB of data over 75

    requests took ??? seconds to load 806kB of data over 83 requests Average: 816kB of data over 83 requests
  5. HTTP is antiquated HTTP has not been updated in 12

    years HTTP is old HTTP is so old...
  6. +

  7. SPDY is About Page Load Time It has other benefits,

    but its main goal is to decrease page load time
  8. Why Not Start the Tubes Warm? • Large congestion window

    (CWND) • CWND is initially 3 • 6 connections => we already have 18 initial CWND
  9. Why Not Start the Tubes Warm? • Large congestion window

    (CWND) • CWND is initially 3 • 6 connections => we already have 18 initial CWND • Already subverting TCP/IP • Is subverting further a good idea? • Especially given data loss rates that we already see?
  10. SPDY • Built on SSL • Binary • Don't send

    redundant header information • Aggressively compress stuff • Use a single(!) tube ◦ Only pay the warm-up penalty once ◦ Just like downloading an Ubuntu ISO!!!
  11. SPDY • SYN_STREAM • SYN_REPLY • RST_STREAM • SETTINGS •

    HEADERS • PING • GOAWAY • WINDOW_UPDATE • DATA
  12. • An openssl-generated server key • The SPDY Gem •

    Edge-openssl for NPN (Next Protocol Negotiation) • Carson McDonald's NPN enabled fork of eventmachine* (in the tls-npn branch) — pull request #196 * https://github.com/carsonmcdonald/eventmachine
  13. Client Request (SYN_STREAM) +----------------------------------+ 80 02 00 01 |1| Version

    | 1 | +----------------------------------+ 02 00 00 38 | Flags (8) | Length (24 bits) | +----------------------------------+ 00 00 00 01 |X| Stream-ID (31bits) | +----------------------------------+ 00 00 00 00 |X|Associated-To-Stream-ID (31bits)| +----------------------------------+ 00 00 62 60 | Pri | Unused | | +------------------ | 64 60 06 05 | Name/value header block | 81 42 46 49 | ... | 49 41 b1 95 ....
  14. Server Response (SYN_REPLY) +----------------------------------+ 80 02 00 02 |1| Version

    | 2 | +----------------------------------+ 00 00 00 a4 | Flags (8) | Length (24 bits) | +----------------------------------+ 00 00 00 01 |X| Stream-ID (31bits) | +----------------------------------+ 00 00 78 bb | Unused | | df a2 51 b2 +---------------- | 62 e0 64 e0 | Name/value header block | 42 c4 10 03 | ... | 57 76 6a 6a
  15. Server Push (SYN_STREAM) +----------------------------------+ 80 02 00 01 |1| Version

    | 1 | +----------------------------------+ 02 00 00 51 | Flags (8) | Length (24 bits) | +----------------------------------+ 00 00 00 02 |X| Stream-ID (31bits) | +----------------------------------+ 00 00 00 01 |X|Associated-To-Stream-ID (31bits)| +----------------------------------+ 00 00 62 60 | Pri | Unused | | +------------------ | | Name/value header block | 23 c2 37 cc | ... | a0 40 52 c8 28 29 29 28
  16. Server Push #2 (SYN_STREAM) +----------------------------------+ 80 02 00 01 |1|

    Version | 1 | +----------------------------------+ 02 00 01 5b | Flags (8) | Length (24 bits) | +----------------------------------+ 00 00 00 04 |X| Stream-ID (31bits) | +----------------------------------+ 00 00 00 01 |X|Associated-To-Stream-ID (31bits)| +----------------------------------+ 00 00 62 60 | Pri | Unused | | +------------------ | | Name/value header block | 23 c2 37 cc | ... | a0 40 52 c8 28 29 29 28