際際滷

際際滷Share a Scribd company logo
SPDY @Zynga
Agenda

¢ Motivation & Background

¢ What is SPDY?

¢ Who's Using SPDY?

¢ SPDY and Mobile

¢ SPDY and REST APIs

¢ Standardization
Motivation


             Latency & Security
Background: What is a WebPage?

¢ ~86 resources

¢ ~13 hosts

¢ ~966KB

¢ ~66% compressed (top sites are ~90% compressed)

¢ Except HTTPS, where < 50% compressed.
Background: Poor Network Utilization




Web Page evolution has led to poor network utilization.

Bandwidth is going up... RTT isn't going down.
Background: Pesky Round Trips
Browser Perf Problems

¢ Network

¢ Rendering / Layout

¢ JavaScript Execution

¢ Stylesheets

¢ Flash

¢ More Network Loads
HTTP Connections




Average: 29 connections per page.

25%-tile = 10   50%-tile = 20   75%-tile = 39   95%-tile = 78
Incremental Improvements - Meh.

¢ Incremental changes don't "move the needle"
   $ They're hard to figure out individually
   $ Each only works for some people, with hacks

¢ Problem is the intermediaries (a.k.a. proxies)
   $ Transparent proxies change the content.
   $ Example: pipelining - donde esta?
   $ Example: stripped "Accept-Encoding" headers
      * we can't even improve "negotiated" compression!
SPDY Requirements

¢ Avoid requiring the website author to change content
  Allow for incremental changes
  Performing "better" with content changes is okay
  Performing "worse" without content changes is unacceptable

¢ Perform always better, never worse than HTTP

¢ Drop-in replacement from webapp's point of view
   $ Changing the web server/application server is inevitable
     and therefore acceptable
What is SPDY?
¢ Multiplexing
  $ Get the data off the client

¢ Compression
   $ HTTP headers are excessive
   $ Uplink bandwidth is limited

¢ Prioritization
   $ Today the browser holds back
   $ Priorities enable multiplexing

¢ Server Push
   $ Websites do some of this today with data URLs
Less is More - Conns, Bytes, Packets
Deployment: Process of Elimination

¢ Avoid changing the lower-level transport

¢ Available transports: TCP or UDP.
   $ Note: SCTP not an option due to NAT.

¢ UDP
   $ We'd have to re-engineer TCP features.

¢ That leaves us with TCP.
   $ Ok, so which port? 80 or 443?
Deployment: Port 80
¢ HTTP runs on port 80.

¢ Proxies are a barrier to protocols
   $ HTTP/1.1 1999 - Pipelining still not deployed
   $ Compression negotiation

¢ Upgrade header requires a round trip

¢ WebSockets Data Shows that using HTTP over a non-
  standard port is less tampered with than port 80.
   $ Success rate:
      * HTTP (port 80) 67%
      * HTTP (port 61985) 86%
Deployment: Port 443

¢ Port 443 runs SSL/TLS.
   $ Adds server authentication & encryption

¢ Handshake is extensible:
   $ Next-Protocol-Negotiation
    www.ietf.org/id/draft-agl-tls-nextprotoneg-00.txt
Can We Address Latency & Security
Separately?
¢ If eavesdropping in the cafe is still possible in 2015 with
  trivial tools, we have failed our users.

¢ The internet is weak already and getting worse.
   $ A matter of life and death

¢ Firesheep tools make sniffing easy

¢ Major content providers want privacy
  $ Facebook opt-in
  $ Twitter opt-in UPDATE: Now on by default!
  $ GMail and G+ already SSL only.
  $ SSL is just too slow right now...
HTTPS vs SPDY (Google)




Update Jan 2012: Google has announced that SPDY (w/
SSL) is now faster than HTTP on Google properties.
Who Uses SPDY?

¢ Websites:
   $ Google since 2010
   $ Amazon Kindle Fire
¢ Browsers
   $ Google Chrome since 2010
   $ Firefox 11+
   $ Chrome for Android
¢ Servers
   $ Apache w/ mod-spdy
   $ nginx has announced support coming
   $ Java/Ruby/Python/node.js/Erlang/Go & C impls!
   $ netty framework
¢ Mobile
   $ iPhone client
SPDY & Mobile

¢ New client-side problems
   $ Battery life constraints
   $ Severely limited CPUs

¢ New Network Properties
   $ Latency from 150 - 300ms per Round Trip
   $ Bandwidth 1-4Mbps

¢ New use cases
   $ Mobile Web Browsers are 1st generation
      * So web browsing sucks
   $ Everyone uses Apps w/ REST APIs anyway
SPDY and Battery Life

¢ Network activity is one of the biggest battery drains
¢ SPDY is lightweight:
   $ Fewer connections
   $ Fewer packets
   $ Fewer sends
¢ But.....
   $ Mobile network activity can be sporadic
      * e.g. a ping every 60-300secs
   $ SSL connections are more expensive to establish
      * Anecdotal - is the handshake CPU intensive
   $ Every SSL implementation is unoptimized.

¢ I hate to say it, but until we optimize SSL clients on
  mobile. SPDY may not be ready for mobile.
SPDY and Mobile Networks

¢ Good news
  $ Mobile networks are the SPDY sweetspot
    * High latency and High bandwidth

¢ Bad news
   $ Operators timeout NATs aggressively (~60s)
   $ Traditional SSL is unoptimized
      * OCSP validation is particularly poor

¢ Mitigation
  $ Trust your own certificate to bypass OCSP in apps
  $ Don't trust pooled connections over 60s old
SPDY & REST APIs

¢ Apps use HTTP to transfer JSON or XML

¢ Don't need to load HTML/CSS/Assets, they are installed up
  front

¢ REST APIs over HTTP need batching
   $ due to HTTP connection/serialization limits
   $ JSON fundamentally not streamable
   $ Lose cacheability
   $ Sacrifices latency for throughput
JSON Streamability

¢ REST APIs are messages; how to best deliver a message
  over any network?

¢ Network will chunk data.

¢ Round trips exist *between* chunks. More chunks == more
  chance of delays, lost packets.

¢ Small JSON blobs are good.

¢ Large JSON blobs are bad.

¢ JSON not parseable until all JSON is received!!
Standardization

¢ Test implementations are cropping up everywhere

¢ Badly in need of an interoperability test suite!

¢ Going to IETF next month to talk about HTTP/2.0

  $ SPDY will likely change, but hopefully will be a part of it.

¢ In 2012, SPDY is available on over 50% of browsers
Thank You!

Good luck to Zynga!

More Related Content

What's hot (19)

SPDY / W3C
SPDY / W3CSPDY / W3C
SPDY / W3C
Mike Belshe
?
Web Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day IIWeb Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day II
Anuchit Chalothorn
?
Nats
NatsNats
Nats
笨V
?
Last Month in PHP - May 2016
Last Month in PHP - May 2016Last Month in PHP - May 2016
Last Month in PHP - May 2016
Eric Poe
?
2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things
PHP Conference Argentina
?
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
Krivoy Rog IT Community
?
Web Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day IWeb Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day I
Anuchit Chalothorn
?
Design a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsDesign a scalable site: Problem and solutions
Design a scalable site: Problem and solutions
Chau Thanh
?
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and Performance
Fastly
?
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
Avenga Germany GmbH
?
Experience lessons from architecture of zalo real time system
Experience lessons from architecture of zalo real time systemExperience lessons from architecture of zalo real time system
Experience lessons from architecture of zalo real time system
Zalo_app
?
Domain transfer,domain transfer service in bangalore
Domain transfer,domain transfer service in bangaloreDomain transfer,domain transfer service in bangalore
Domain transfer,domain transfer service in bangalore
NS Web Technology
?
Comet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called JabbifyComet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called Jabbify
Brian Moschel
?
Predicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentationPredicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentation
Justin Dorfman
?
Node.js
Node.jsNode.js
Node.js
Nolifelover Earn
?
SPA2015: Hooman Beheshti C The Future of CDNs
SPA2015: Hooman Beheshti C The Future of CDNsSPA2015: Hooman Beheshti C The Future of CDNs
SPA2015: Hooman Beheshti C The Future of CDNs
Fastly
?
PHP and node.js Together
PHP and node.js TogetherPHP and node.js Together
PHP and node.js Together
Chris Tankersley
?
Scaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress TeamScaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress Team
Dat Hoang
?
FluentdでログЪ仝だけ々やる #study2study
FluentdでログЪ仝だけ々やる #study2studyFluentdでログЪ仝だけ々やる #study2study
FluentdでログЪ仝だけ々やる #study2study
SATOSHI TAGOMORI
?
Web Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day IIWeb Service and Mobile Integrated Day II
Web Service and Mobile Integrated Day II
Anuchit Chalothorn
?
Last Month in PHP - May 2016
Last Month in PHP - May 2016Last Month in PHP - May 2016
Last Month in PHP - May 2016
Eric Poe
?
2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things2013 - Brian Stanley - Memcached, Cached all the things
2013 - Brian Stanley - Memcached, Cached all the things
PHP Conference Argentina
?
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
Krivoy Rog IT Community
?
Web Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day IWeb Service and Mobile Integrated Day I
Web Service and Mobile Integrated Day I
Anuchit Chalothorn
?
Design a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsDesign a scalable site: Problem and solutions
Design a scalable site: Problem and solutions
Chau Thanh
?
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and Performance
Fastly
?
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
HTTP/2 turns 3 years old // Web Performance Meetup wao.io 20180612
Avenga Germany GmbH
?
Experience lessons from architecture of zalo real time system
Experience lessons from architecture of zalo real time systemExperience lessons from architecture of zalo real time system
Experience lessons from architecture of zalo real time system
Zalo_app
?
Domain transfer,domain transfer service in bangalore
Domain transfer,domain transfer service in bangaloreDomain transfer,domain transfer service in bangalore
Domain transfer,domain transfer service in bangalore
NS Web Technology
?
Comet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called JabbifyComet: an Overview and a New Solution Called Jabbify
Comet: an Overview and a New Solution Called Jabbify
Brian Moschel
?
Predicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentationPredicting user activity to make the web fast presentation
Predicting user activity to make the web fast presentation
Justin Dorfman
?
SPA2015: Hooman Beheshti C The Future of CDNs
SPA2015: Hooman Beheshti C The Future of CDNsSPA2015: Hooman Beheshti C The Future of CDNs
SPA2015: Hooman Beheshti C The Future of CDNs
Fastly
?
Scaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress TeamScaling WordPress - Project Lana WordPress Team
Scaling WordPress - Project Lana WordPress Team
Dat Hoang
?
FluentdでログЪ仝だけ々やる #study2study
FluentdでログЪ仝だけ々やる #study2studyFluentdでログЪ仝だけ々やる #study2study
FluentdでログЪ仝だけ々やる #study2study
SATOSHI TAGOMORI
?

Similar to SPDY @Zynga (20)

SPDY
SPDYSPDY
SPDY
Daniel Stenberg
?
Keeping the Internet Fast and Resilient for You and Your Customers
Keeping the Internet Fast and Resilient for You and Your CustomersKeeping the Internet Fast and Resilient for You and Your Customers
Keeping the Internet Fast and Resilient for You and Your Customers
Cloudflare
?
Computer network (7)
Computer network (7)Computer network (7)
Computer network (7)
NYversity
?
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
Pablo Moretti
?
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
Santiago Aimetta
?
SPDY
SPDYSPDY
SPDY
Andreas Bj?rlestam
?
SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0SPDY - or maybe HTTP2.0
SPDY - or maybe HTTP2.0
Andreas Bj?rlestam
?
Hadoop Networking at Datasift
Hadoop Networking at DatasiftHadoop Networking at Datasift
Hadoop Networking at Datasift
huguk
?
SPDY быстрее на 146% (Валентин Бартенев)
SPDY быстрее на 146% (Валентин Бартенев)SPDY быстрее на 146% (Валентин Бартенев)
SPDY быстрее на 146% (Валентин Бартенев)
Ontico
?
OpenFlow @ Google
OpenFlow @ GoogleOpenFlow @ Google
OpenFlow @ Google
Open Networking Summits
?
Uber mobility - High Performance Networking
Uber mobility - High Performance NetworkingUber mobility - High Performance Networking
Uber mobility - High Performance Networking
Dhaval Patel
?
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
Viach Kakovskyi
?
The New Edge of the Network
The New Edge of the NetworkThe New Edge of the Network
The New Edge of the Network
Tom Paseka
?
MySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the WireMySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the Wire
Simon J Mudd
?
Mikrotik fasttrack
Mikrotik fasttrackMikrotik fasttrack
Mikrotik fasttrack
Achmad Mardiansyah
?
The WebRTC Data Channel
The WebRTC Data ChannelThe WebRTC Data Channel
The WebRTC Data Channel
Svetlin Mladenov
?
Internet Noise (A Story About Two Little Subnets - Tom Paseka
Internet Noise (A Story About Two Little Subnets - Tom PasekaInternet Noise (A Story About Two Little Subnets - Tom Paseka
Internet Noise (A Story About Two Little Subnets - Tom Paseka
MyNOG
?
ISP Load Balancing with Mikrotik ECMP
ISP Load Balancing with Mikrotik ECMPISP Load Balancing with Mikrotik ECMP
ISP Load Balancing with Mikrotik ECMP
GLC Networks
?
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
Nicolas Brousse
?
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp
?
Keeping the Internet Fast and Resilient for You and Your Customers
Keeping the Internet Fast and Resilient for You and Your CustomersKeeping the Internet Fast and Resilient for You and Your Customers
Keeping the Internet Fast and Resilient for You and Your Customers
Cloudflare
?
Computer network (7)
Computer network (7)Computer network (7)
Computer network (7)
NYversity
?
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
Pablo Moretti
?
Web performance mercadolibre - ECI 2013
Web performance   mercadolibre - ECI 2013Web performance   mercadolibre - ECI 2013
Web performance mercadolibre - ECI 2013
Santiago Aimetta
?
Hadoop Networking at Datasift
Hadoop Networking at DatasiftHadoop Networking at Datasift
Hadoop Networking at Datasift
huguk
?
SPDY быстрее на 146% (Валентин Бартенев)
SPDY быстрее на 146% (Валентин Бартенев)SPDY быстрее на 146% (Валентин Бартенев)
SPDY быстрее на 146% (Валентин Бартенев)
Ontico
?
Uber mobility - High Performance Networking
Uber mobility - High Performance NetworkingUber mobility - High Performance Networking
Uber mobility - High Performance Networking
Dhaval Patel
?
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
Viach Kakovskyi
?
The New Edge of the Network
The New Edge of the NetworkThe New Edge of the Network
The New Edge of the Network
Tom Paseka
?
MySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the WireMySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the Wire
Simon J Mudd
?
Internet Noise (A Story About Two Little Subnets - Tom Paseka
Internet Noise (A Story About Two Little Subnets - Tom PasekaInternet Noise (A Story About Two Little Subnets - Tom Paseka
Internet Noise (A Story About Two Little Subnets - Tom Paseka
MyNOG
?
ISP Load Balancing with Mikrotik ECMP
ISP Load Balancing with Mikrotik ECMPISP Load Balancing with Mikrotik ECMP
ISP Load Balancing with Mikrotik ECMP
GLC Networks
?
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
Nicolas Brousse
?
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp
?

SPDY @Zynga

  • 2. Agenda ¢ Motivation & Background ¢ What is SPDY? ¢ Who's Using SPDY? ¢ SPDY and Mobile ¢ SPDY and REST APIs ¢ Standardization
  • 3. Motivation Latency & Security
  • 4. Background: What is a WebPage? ¢ ~86 resources ¢ ~13 hosts ¢ ~966KB ¢ ~66% compressed (top sites are ~90% compressed) ¢ Except HTTPS, where < 50% compressed.
  • 5. Background: Poor Network Utilization Web Page evolution has led to poor network utilization. Bandwidth is going up... RTT isn't going down.
  • 7. Browser Perf Problems ¢ Network ¢ Rendering / Layout ¢ JavaScript Execution ¢ Stylesheets ¢ Flash ¢ More Network Loads
  • 8. HTTP Connections Average: 29 connections per page. 25%-tile = 10 50%-tile = 20 75%-tile = 39 95%-tile = 78
  • 9. Incremental Improvements - Meh. ¢ Incremental changes don't "move the needle" $ They're hard to figure out individually $ Each only works for some people, with hacks ¢ Problem is the intermediaries (a.k.a. proxies) $ Transparent proxies change the content. $ Example: pipelining - donde esta? $ Example: stripped "Accept-Encoding" headers * we can't even improve "negotiated" compression!
  • 10. SPDY Requirements ¢ Avoid requiring the website author to change content Allow for incremental changes Performing "better" with content changes is okay Performing "worse" without content changes is unacceptable ¢ Perform always better, never worse than HTTP ¢ Drop-in replacement from webapp's point of view $ Changing the web server/application server is inevitable and therefore acceptable
  • 11. What is SPDY? ¢ Multiplexing $ Get the data off the client ¢ Compression $ HTTP headers are excessive $ Uplink bandwidth is limited ¢ Prioritization $ Today the browser holds back $ Priorities enable multiplexing ¢ Server Push $ Websites do some of this today with data URLs
  • 12. Less is More - Conns, Bytes, Packets
  • 13. Deployment: Process of Elimination ¢ Avoid changing the lower-level transport ¢ Available transports: TCP or UDP. $ Note: SCTP not an option due to NAT. ¢ UDP $ We'd have to re-engineer TCP features. ¢ That leaves us with TCP. $ Ok, so which port? 80 or 443?
  • 14. Deployment: Port 80 ¢ HTTP runs on port 80. ¢ Proxies are a barrier to protocols $ HTTP/1.1 1999 - Pipelining still not deployed $ Compression negotiation ¢ Upgrade header requires a round trip ¢ WebSockets Data Shows that using HTTP over a non- standard port is less tampered with than port 80. $ Success rate: * HTTP (port 80) 67% * HTTP (port 61985) 86%
  • 15. Deployment: Port 443 ¢ Port 443 runs SSL/TLS. $ Adds server authentication & encryption ¢ Handshake is extensible: $ Next-Protocol-Negotiation www.ietf.org/id/draft-agl-tls-nextprotoneg-00.txt
  • 16. Can We Address Latency & Security Separately? ¢ If eavesdropping in the cafe is still possible in 2015 with trivial tools, we have failed our users. ¢ The internet is weak already and getting worse. $ A matter of life and death ¢ Firesheep tools make sniffing easy ¢ Major content providers want privacy $ Facebook opt-in $ Twitter opt-in UPDATE: Now on by default! $ GMail and G+ already SSL only. $ SSL is just too slow right now...
  • 17. HTTPS vs SPDY (Google) Update Jan 2012: Google has announced that SPDY (w/ SSL) is now faster than HTTP on Google properties.
  • 18. Who Uses SPDY? ¢ Websites: $ Google since 2010 $ Amazon Kindle Fire ¢ Browsers $ Google Chrome since 2010 $ Firefox 11+ $ Chrome for Android ¢ Servers $ Apache w/ mod-spdy $ nginx has announced support coming $ Java/Ruby/Python/node.js/Erlang/Go & C impls! $ netty framework ¢ Mobile $ iPhone client
  • 19. SPDY & Mobile ¢ New client-side problems $ Battery life constraints $ Severely limited CPUs ¢ New Network Properties $ Latency from 150 - 300ms per Round Trip $ Bandwidth 1-4Mbps ¢ New use cases $ Mobile Web Browsers are 1st generation * So web browsing sucks $ Everyone uses Apps w/ REST APIs anyway
  • 20. SPDY and Battery Life ¢ Network activity is one of the biggest battery drains ¢ SPDY is lightweight: $ Fewer connections $ Fewer packets $ Fewer sends ¢ But..... $ Mobile network activity can be sporadic * e.g. a ping every 60-300secs $ SSL connections are more expensive to establish * Anecdotal - is the handshake CPU intensive $ Every SSL implementation is unoptimized. ¢ I hate to say it, but until we optimize SSL clients on mobile. SPDY may not be ready for mobile.
  • 21. SPDY and Mobile Networks ¢ Good news $ Mobile networks are the SPDY sweetspot * High latency and High bandwidth ¢ Bad news $ Operators timeout NATs aggressively (~60s) $ Traditional SSL is unoptimized * OCSP validation is particularly poor ¢ Mitigation $ Trust your own certificate to bypass OCSP in apps $ Don't trust pooled connections over 60s old
  • 22. SPDY & REST APIs ¢ Apps use HTTP to transfer JSON or XML ¢ Don't need to load HTML/CSS/Assets, they are installed up front ¢ REST APIs over HTTP need batching $ due to HTTP connection/serialization limits $ JSON fundamentally not streamable $ Lose cacheability $ Sacrifices latency for throughput
  • 23. JSON Streamability ¢ REST APIs are messages; how to best deliver a message over any network? ¢ Network will chunk data. ¢ Round trips exist *between* chunks. More chunks == more chance of delays, lost packets. ¢ Small JSON blobs are good. ¢ Large JSON blobs are bad. ¢ JSON not parseable until all JSON is received!!
  • 24. Standardization ¢ Test implementations are cropping up everywhere ¢ Badly in need of an interoperability test suite! ¢ Going to IETF next month to talk about HTTP/2.0 $ SPDY will likely change, but hopefully will be a part of it. ¢ In 2012, SPDY is available on over 50% of browsers
  • 25. Thank You! Good luck to Zynga!