SlideShare a Scribd company logo
1 of 40
Download to read offline
cd /pub
                  cat beer > /dev/bluesmoon




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Not stuck in a cloud of volcanic ash




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Didn’t get sidetracked on my way here




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Didn’t go on an extended vacation




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Almost not allowed in




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Philip Tellis
          geek
          yahoo
          @bluesmoon
          http://bluesmoon.info/
          philip@bluesmoon.info




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Station wagons and Electrons

                     Philip Tellis / philip@bluesmoon.info


       Yahoo! London Pub Night – May 27, 2010 – Wallacespace




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Never underestimate the bandwidth of a station wagon
                     speeding down the motorway
                                            – Andrew S Tanenbaum?




Yahoo! London Pub Night – May 27, 2010 – Wallacespace    Station wagons and Electrons
Should you fly a 747 or a 737?



           A 747 seats 400+ passengers
           A 737 seats about 150
           Both take about the same time to fly from FRA to LHR
           A 747 takes longer to load and unload



   The best selling aircraft to date is the 737

   This analogy would have been much cooler if the Concorde still flew




Yahoo! London Pub Night – May 27, 2010 – Wallacespace         Station wagons and Electrons
Bandwidth and Latency




                     How much data can you transfer at once
                                       v/s
                     How quickly can you get your data across




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
But bandwidth is easy




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Shannon’s Theorem




                                                                  S
                                      C = B × log2 (1 +             )
                                                                  N



   C – Channel capacity in bps
   B – Bandwidth in Hz
   S – Signal strength
   N – Noise strength – S/N measured in dB




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Bandwidth can be bought




          Bandwidth has increased steadily over time
          Networks, hard drives, memory, CPU, system bus,
          everything.
          Bandwidth can be parallelised




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Diminishing returns

    The benefits of increased bandwidth diminish as you get fatter




    Ref: More bandwidth doesn’t matter (much) – Mike Belshe




Yahoo! London Pub Night – May 27, 2010 – Wallacespace         Station wagons and Electrons
How fast is the internet?

    YUI Blog measured bandwidth at 1Mbps and latency of 262ms




                                                              Ref: Analysing Bandwidth & Latency – YUI Blog




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Blink




 The average human eye takes 300-400ms
                to blink




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
How fast is the internet?




         Akamai measured average global bandwidth at 1.7Mbps




   Ref: State of the Internet – Akamai




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
ISPs




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
UK ISPs




    Keep in mind that the Internet latency from the UK to the US is 90-100ms




Yahoo! London Pub Night – May 27, 2010 – Wallacespace          Station wagons and Electrons
Latency – not so easy to sell




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Speed Limits




       3 × 108 m /s – in vacuum
       2 × 108 m /s – in fibre
        =⇒ 26.42ms × 2
       (roundtrip from BOS to LON)




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Round-trip



           It should take a packet around 53ms to go from Boston to
           London and back
           It actually takes around 90ms for a packet to go from
           Boston to London and back
           This is pretty good as far as approaching theoretical limits
           goes



   Ref: It’s the latency, stupid – Stuart Cheshire




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Round-trip



           It should take a packet around 53ms to go from Boston to
           London and back
           It actually takes around 90ms for a packet to go from
           Boston to London and back
           This is pretty good as far as approaching theoretical limits
           goes



   Ref: It’s the latency, stupid – Stuart Cheshire




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
But then again...




           Never underestimate the data-transfer capabilities of a
            Galaxy class starship travelling at Warp 9.875 and
            fitted with a computer that sounds like Majel Barett




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Latency isn’t sexy




       When was the last time you saw a TV commercial mention
                               latency?




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
ISPs




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
UK ISPs




    Keep in mind that the Internet latency from the UK to the US is 90-100ms




Yahoo! London Pub Night – May 27, 2010 – Wallacespace          Station wagons and Electrons
Latency v/s Bandwidth




          Improving latency tends to improve perceived bandwidth
          Improving bandwidth utilisation can potentially worsen
          latency
          Larger/complex packets take more time to assemble


   This is the difference between a 737 and a 747




Yahoo! London Pub Night – May 27, 2010 – Wallacespace         Station wagons and Electrons
Getting around latency problems




          Don’t add latency – It’s bad enough without us adding to it
          Caching – Bring the data closer to where it’s needed
          Parallelise – Reduce the number of serial roundtrips
          Predict – Get data before it’s needed




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
If you can, stuff everything into one call
                     Have a look at search.yahoo.com load up in firebug




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Parallelise where possible




          Downloading a script blocks page load, so do it in the
          background instead
          Browsers will download 4-8 resources from a host in
          parallel, take advantage of that




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Predict what’s next and fetch it



           If you know what the user will do next, pre-fetch it
                   Yahoo! Search page pre-loads sprites and Javascript for
                   the results page
                   Log analysis can tell you which pages are most popular,
                   and pre-fetch those




    Ref: Preload CSS & JS without execution – Stoyan Stefanov




 Yahoo! London Pub Night – May 27, 2010 – Wallacespace          Station wagons and Electrons
Measure your user’s bandwidth & latency




   Javascript code to measure your user’s bandwidth & latency
   http://bluesmoon.info/perf-tests/bw/bw-test-1.3.zip
   http://github.com/bluesmoon/netperf-js




   It’s what we used on the YUIBlog test




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Useful tools for performance analysis




          YSlow – Firefox/Firebug plugin from Yahoo!
          PageSpeed – Firefox/Firebug plugin from Google
          PageTest – Web page testing tool
          ShowSlow – Automated YSlow runs against your URL
          Fiddler – Web debugging Proxy




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Further reading




          developer.yahoo.com/performance – Yahoo!
          code.google.com/speed/page-speed/docs/rules_intro.html
          – Google
          slideshare.net/stoyan/the-business-of-performance –
          Stoyan Stefanov
          stevesouders.com/blog/ – Steve Souders
          phpied.com – Stoyan Stefanov




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Stay tuned...




                                     Coming this summer...
                                    to an interweb near you




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Stay tuned...




                                    BOOMERANG
                                                   2010 06 24
                               STARRING: JAVASCRIPT, APACHE, YAHOO
            SCRIPT: BLUESMOON, PRODUCTION: TOM CROUCHER, CHOREOGRAPHY: CROCKFORD
                                    http://developer.yahoo.net/blog




Yahoo! London Pub Night – May 27, 2010 – Wallacespace    Station wagons and Electrons
Photo credits



          flickr.com/photos/sully_aka__wstera2/4538240734/
          flickr.com/photos/gertcha/4168724489/
          flickr.com/photos/30720140@N08/4290289036/
          flickr.com/photos/dharmasphere/253277654/
          flickr.com/photos/gi/117771718/
          flickr.com/photos/siennaisalive/4436708323/
          flickr.com/photos/vlastula/300102949/
          flickr.com/photos/electrichamster/3160580687/
          flickr.com/photos/burnblue/308441464/




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Contact me




          Philip Tellis
          yahoo
          geek
          @bluesmoon
          http://bluesmoon.info/
          slideshare.net/bluesmoon
          philip@bluesmoon.info




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons
Thank you




Yahoo! London Pub Night – May 27, 2010 – Wallacespace   Station wagons and Electrons

More Related Content

More from Philip Tellis

Improving 3rd Party Script Performance With IFrames
Improving 3rd Party Script Performance With IFramesImproving 3rd Party Script Performance With IFrames
Improving 3rd Party Script Performance With IFrames
Philip Tellis
 
Analysing network characteristics with JavaScript
Analysing network characteristics with JavaScriptAnalysing network characteristics with JavaScript
Analysing network characteristics with JavaScript
Philip Tellis
 
A Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web TrafficA Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web Traffic
Philip Tellis
 
Boomerang: How fast do users think your site is?
Boomerang: How fast do users think your site is?Boomerang: How fast do users think your site is?
Boomerang: How fast do users think your site is?
Philip Tellis
 
Boomerang at FOSS.IN/2010
Boomerang at FOSS.IN/2010Boomerang at FOSS.IN/2010
Boomerang at FOSS.IN/2010
Philip Tellis
 
Measuring the web with Boomerang (YUIConf 2010)
Measuring the web with Boomerang (YUIConf 2010)Measuring the web with Boomerang (YUIConf 2010)
Measuring the web with Boomerang (YUIConf 2010)
Philip Tellis
 
Boomerang at the Boston Web Performance meetup
Boomerang at the Boston Web Performance meetupBoomerang at the Boston Web Performance meetup
Boomerang at the Boston Web Performance meetup
Philip Tellis
 
Boomerang @ NY Web Perf meetup
Boomerang @ NY Web Perf meetupBoomerang @ NY Web Perf meetup
Boomerang @ NY Web Perf meetup
Philip Tellis
 

More from Philip Tellis (20)

Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
Frontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy PersonFrontend Performance: Beginner to Expert to Crazy Person
Frontend Performance: Beginner to Expert to Crazy Person
 
mmm... beacons
mmm... beaconsmmm... beacons
mmm... beacons
 
RUM Distillation 101 -- Part I
RUM Distillation 101 -- Part IRUM Distillation 101 -- Part I
RUM Distillation 101 -- Part I
 
Improving 3rd Party Script Performance With IFrames
Improving 3rd Party Script Performance With IFramesImproving 3rd Party Script Performance With IFrames
Improving 3rd Party Script Performance With IFrames
 
Extending Boomerang
Extending BoomerangExtending Boomerang
Extending Boomerang
 
Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"
Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"
Abusing JavaScript to measure Web Performance, or, "how does boomerang work?"
 
The Statistics of Web Performance Analysis
The Statistics of Web Performance AnalysisThe Statistics of Web Performance Analysis
The Statistics of Web Performance Analysis
 
Abusing JavaScript to Measure Web Performance
Abusing JavaScript to Measure Web PerformanceAbusing JavaScript to Measure Web Performance
Abusing JavaScript to Measure Web Performance
 
Rum for Breakfast
Rum for BreakfastRum for Breakfast
Rum for Breakfast
 
Analysing network characteristics with JavaScript
Analysing network characteristics with JavaScriptAnalysing network characteristics with JavaScript
Analysing network characteristics with JavaScript
 
A Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web TrafficA Node.JS bag of goodies for analyzing Web Traffic
A Node.JS bag of goodies for analyzing Web Traffic
 
Input sanitization
Input sanitizationInput sanitization
Input sanitization
 
Messing with JavaScript and the DOM to measure network characteristics
Messing with JavaScript and the DOM to measure network characteristicsMessing with JavaScript and the DOM to measure network characteristics
Messing with JavaScript and the DOM to measure network characteristics
 
Boomerang: How fast do users think your site is?
Boomerang: How fast do users think your site is?Boomerang: How fast do users think your site is?
Boomerang: How fast do users think your site is?
 
Boomerang at FOSS.IN/2010
Boomerang at FOSS.IN/2010Boomerang at FOSS.IN/2010
Boomerang at FOSS.IN/2010
 
Measuring the web with Boomerang (YUIConf 2010)
Measuring the web with Boomerang (YUIConf 2010)Measuring the web with Boomerang (YUIConf 2010)
Measuring the web with Boomerang (YUIConf 2010)
 
Boomerang at the Boston Web Performance meetup
Boomerang at the Boston Web Performance meetupBoomerang at the Boston Web Performance meetup
Boomerang at the Boston Web Performance meetup
 
Boomerang @ NY Web Perf meetup
Boomerang @ NY Web Perf meetupBoomerang @ NY Web Perf meetup
Boomerang @ NY Web Perf meetup
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Station-wagons and electrons

  • 1. cd /pub cat beer > /dev/bluesmoon Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 2. Not stuck in a cloud of volcanic ash Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 3. Didn’t get sidetracked on my way here Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 4. Didn’t go on an extended vacation Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 5. Almost not allowed in Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 6. Philip Tellis geek yahoo @bluesmoon http://bluesmoon.info/ philip@bluesmoon.info Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 7. Station wagons and Electrons Philip Tellis / philip@bluesmoon.info Yahoo! London Pub Night – May 27, 2010 – Wallacespace Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 8. Never underestimate the bandwidth of a station wagon speeding down the motorway – Andrew S Tanenbaum? Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 9. Should you fly a 747 or a 737? A 747 seats 400+ passengers A 737 seats about 150 Both take about the same time to fly from FRA to LHR A 747 takes longer to load and unload The best selling aircraft to date is the 737 This analogy would have been much cooler if the Concorde still flew Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 10. Bandwidth and Latency How much data can you transfer at once v/s How quickly can you get your data across Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 11. But bandwidth is easy Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 12. Shannon’s Theorem S C = B × log2 (1 + ) N C – Channel capacity in bps B – Bandwidth in Hz S – Signal strength N – Noise strength – S/N measured in dB Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 13. Bandwidth can be bought Bandwidth has increased steadily over time Networks, hard drives, memory, CPU, system bus, everything. Bandwidth can be parallelised Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 14. Diminishing returns The benefits of increased bandwidth diminish as you get fatter Ref: More bandwidth doesn’t matter (much) – Mike Belshe Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 15. How fast is the internet? YUI Blog measured bandwidth at 1Mbps and latency of 262ms Ref: Analysing Bandwidth & Latency – YUI Blog Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 16. Blink The average human eye takes 300-400ms to blink Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 17. How fast is the internet? Akamai measured average global bandwidth at 1.7Mbps Ref: State of the Internet – Akamai Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 18. ISPs Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 19. UK ISPs Keep in mind that the Internet latency from the UK to the US is 90-100ms Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 20. Latency – not so easy to sell Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 21. Speed Limits 3 × 108 m /s – in vacuum 2 × 108 m /s – in fibre =⇒ 26.42ms × 2 (roundtrip from BOS to LON) Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 22. Round-trip It should take a packet around 53ms to go from Boston to London and back It actually takes around 90ms for a packet to go from Boston to London and back This is pretty good as far as approaching theoretical limits goes Ref: It’s the latency, stupid – Stuart Cheshire Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 23. Round-trip It should take a packet around 53ms to go from Boston to London and back It actually takes around 90ms for a packet to go from Boston to London and back This is pretty good as far as approaching theoretical limits goes Ref: It’s the latency, stupid – Stuart Cheshire Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 24. But then again... Never underestimate the data-transfer capabilities of a Galaxy class starship travelling at Warp 9.875 and fitted with a computer that sounds like Majel Barett Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 25. Latency isn’t sexy When was the last time you saw a TV commercial mention latency? Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 26. ISPs Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 27. UK ISPs Keep in mind that the Internet latency from the UK to the US is 90-100ms Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 28. Latency v/s Bandwidth Improving latency tends to improve perceived bandwidth Improving bandwidth utilisation can potentially worsen latency Larger/complex packets take more time to assemble This is the difference between a 737 and a 747 Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 29. Getting around latency problems Don’t add latency – It’s bad enough without us adding to it Caching – Bring the data closer to where it’s needed Parallelise – Reduce the number of serial roundtrips Predict – Get data before it’s needed Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 30. If you can, stuff everything into one call Have a look at search.yahoo.com load up in firebug Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 31. Parallelise where possible Downloading a script blocks page load, so do it in the background instead Browsers will download 4-8 resources from a host in parallel, take advantage of that Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 32. Predict what’s next and fetch it If you know what the user will do next, pre-fetch it Yahoo! Search page pre-loads sprites and Javascript for the results page Log analysis can tell you which pages are most popular, and pre-fetch those Ref: Preload CSS & JS without execution – Stoyan Stefanov Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 33. Measure your user’s bandwidth & latency Javascript code to measure your user’s bandwidth & latency http://bluesmoon.info/perf-tests/bw/bw-test-1.3.zip http://github.com/bluesmoon/netperf-js It’s what we used on the YUIBlog test Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 34. Useful tools for performance analysis YSlow – Firefox/Firebug plugin from Yahoo! PageSpeed – Firefox/Firebug plugin from Google PageTest – Web page testing tool ShowSlow – Automated YSlow runs against your URL Fiddler – Web debugging Proxy Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 35. Further reading developer.yahoo.com/performance – Yahoo! code.google.com/speed/page-speed/docs/rules_intro.html – Google slideshare.net/stoyan/the-business-of-performance – Stoyan Stefanov stevesouders.com/blog/ – Steve Souders phpied.com – Stoyan Stefanov Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 36. Stay tuned... Coming this summer... to an interweb near you Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 37. Stay tuned... BOOMERANG 2010 06 24 STARRING: JAVASCRIPT, APACHE, YAHOO SCRIPT: BLUESMOON, PRODUCTION: TOM CROUCHER, CHOREOGRAPHY: CROCKFORD http://developer.yahoo.net/blog Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 38. Photo credits flickr.com/photos/sully_aka__wstera2/4538240734/ flickr.com/photos/gertcha/4168724489/ flickr.com/photos/30720140@N08/4290289036/ flickr.com/photos/dharmasphere/253277654/ flickr.com/photos/gi/117771718/ flickr.com/photos/siennaisalive/4436708323/ flickr.com/photos/vlastula/300102949/ flickr.com/photos/electrichamster/3160580687/ flickr.com/photos/burnblue/308441464/ Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 39. Contact me Philip Tellis yahoo geek @bluesmoon http://bluesmoon.info/ slideshare.net/bluesmoon philip@bluesmoon.info Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons
  • 40. Thank you Yahoo! London Pub Night – May 27, 2010 – Wallacespace Station wagons and Electrons