SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Scaling war stories

                  • Last.fm vs Xbox360
                  • Quick and hacky profiling
                  • Discuss


Wednesday, 26 May 2010
What happens when
                   scale is forced on you?
                  • 24 Million Xbox360 users
                  • Estimated ~5 times peak traffic increase
                  • No control over source of client
                  • External partner, with their own deadlines
                  • Must be reliable at launch. Err? (The PR
                         problem)


Wednesday, 26 May 2010
A dose of reality

                  • You won’t have the resources you’d like
                   • People (skills, availability,
                   • Budget (new servers would be nice)
                   • Time (more of this would be nice too)

Wednesday, 26 May 2010
B-b-but...

                  • It’s not an ideal world
                  • I’m not a systems developer (I spend half
                         my time on the front end)
                  • Quite hacky. Open to suggestions,
                         alternatives, your experiences



Wednesday, 26 May 2010
HTTP profiling

                  • Had a development Xbox
                  • Stuck a proxy box in the middle
                  • Profiled traffic with Wireshark


Wednesday, 26 May 2010
Wireshark




Wednesday, 26 May 2010
Making a list...

                  • API calls made
                  • In order, as uses cases
                  • Bad uses that can be factored out
                  • What breaks when call X is disbabled
                   • Proxy routed to a dev version of API

Wednesday, 26 May 2010
Xbox Beta
                  • Launched to 1,000 people (At midnight on
                         a Friday). Then to a further 9,000 people
                  • Gave a nice real usage sample
                  • Great, the most common calls are...
                         completely pointless.
                  • frequent != expensive (necessarily)

Wednesday, 26 May 2010
Custom Logging gen-time

               LogFormat "%h %l %u %t "%r"
               %>s %b "% 
                {Referer}i" "%{User-Agent}i"
                %{gentime}n"

             <?php
              apache_note("gen-time", $x);



Wednesday, 26 May 2010
Abusing bash
            Text

            awk 'BEGIN 
             {FS="t"} {a[$2]++;b[$2]=b[$2]+$1} 
             END 
             {for (i in a) printf("%.2f %sn", b[i]/a[i]/
             1000000, i)} '



Wednesday, 26 May 2010
Stats
         Count                                       Total   Average

         71638           trackgetInfo                15789   0.22
         53941           artistgetImages             19647   0.36
         15150           radiogetPlaylist             6962   0.46
          7308           librarygetArtists            2402   0.33
          5020           usergetRecentStations        1674   0.33
          4979           adsgetvideos                 1810   0.36
          4205           radiotune                     923   0.22
          3155           tracklove                       0   0.00
          1507           artistgetinfo                 440   0.29
          1258           usergetRecommendedArtists    1457   1.16
          1135           usergetInfo                   171   0.15
          1130           geogetTopArtists              575   0.51
          1128           radiogamerstations            298   0.26
          1102           taggettopartists             1488   1.35
          1021           trackban                        0   0.00
          1006           usergetLovedTracks            271   0.27
Wednesday, 26 May 2010
zomg, graphs!



Wednesday, 26 May 2010
Wednesday, 26 May 2010
Wednesday, 26 May 2010
Wednesday, 26 May 2010
Profiling with Xdebug
                  • Profile PHP, stack traces, memory usage, etc
                  • http://xdebug.org
                   extension=xdebug.so
                   xdebug.max_nesting_level=500
                   xdebug.default_enable=0
                   xdebug.profiler_enable_trigger=1
                   xdebug.profiler_append=1
                   xdebug.trace_output_name=
                   %R.cache.out
Wednesday, 26 May 2010
Making sense of it




Wednesday, 26 May 2010
Contingencies
                  • From invisible, to user affecting
                  • Disable DB writes, speed up and prevent
                         blocking on failure
                  • Suppress badly architected Flash Player (and
                         less evil taste-o-meter)
                  • Kill % of method calls at perlbal

Wednesday, 26 May 2010
Wednesday, 26 May 2010
Monitoring porn
                  • Launch control with: 3 projectors, 5 x 24”
                         monitors, a dozen dev/sysops with laptops
                  • A moose, a cow and a fail train




Wednesday, 26 May 2010

Weitere ähnliche Inhalte

Ähnlich wie ScaleCamp 2009 - Last.fm vs Xbox

Scaling webappswithrabbitmq
Scaling webappswithrabbitmqScaling webappswithrabbitmq
Scaling webappswithrabbitmqAlvaro Videla
 
causos da linha de frente - #rsonrails 2011
causos da linha de frente - #rsonrails 2011causos da linha de frente - #rsonrails 2011
causos da linha de frente - #rsonrails 2011bzanchet
 
Availability, the Cloud and Everything
Availability, the Cloud and EverythingAvailability, the Cloud and Everything
Availability, the Cloud and Everythinglogicalstack
 
Rubinius - What Have You Done For Me Lately?
Rubinius - What Have You Done For Me Lately?Rubinius - What Have You Done For Me Lately?
Rubinius - What Have You Done For Me Lately?evanphx
 
BCS SIGiST - How Fast is the Cloud?
BCS SIGiST - How Fast is the Cloud?BCS SIGiST - How Fast is the Cloud?
BCS SIGiST - How Fast is the Cloud?Richard Bishop
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Testing Zen
Testing ZenTesting Zen
Testing Zenday
 
Hacklu2011 tricaud
Hacklu2011 tricaudHacklu2011 tricaud
Hacklu2011 tricaudstricaud
 
Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4John Ballinger
 
Voxxed Vienna 2015 Fault tolerant microservices
Voxxed Vienna 2015 Fault tolerant microservicesVoxxed Vienna 2015 Fault tolerant microservices
Voxxed Vienna 2015 Fault tolerant microservicesChristopher Batey
 
No one listens to my podcast (a kibana story)
No one listens to my podcast (a kibana story)No one listens to my podcast (a kibana story)
No one listens to my podcast (a kibana story)OpenSource Connections
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterJohn Adams
 
Android casting-wide-net-android-devices
Android casting-wide-net-android-devicesAndroid casting-wide-net-android-devices
Android casting-wide-net-android-devicesMarakana Inc.
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Robert Treat
 
NodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time WebNodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time WebJakub Nesetril
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGuillaume Laforge
 

Ähnlich wie ScaleCamp 2009 - Last.fm vs Xbox (20)

Scaling webappswithrabbitmq
Scaling webappswithrabbitmqScaling webappswithrabbitmq
Scaling webappswithrabbitmq
 
causos da linha de frente - #rsonrails 2011
causos da linha de frente - #rsonrails 2011causos da linha de frente - #rsonrails 2011
causos da linha de frente - #rsonrails 2011
 
Availability, the Cloud and Everything
Availability, the Cloud and EverythingAvailability, the Cloud and Everything
Availability, the Cloud and Everything
 
Rubinius - What Have You Done For Me Lately?
Rubinius - What Have You Done For Me Lately?Rubinius - What Have You Done For Me Lately?
Rubinius - What Have You Done For Me Lately?
 
Varnish Oscon 2009
Varnish Oscon 2009Varnish Oscon 2009
Varnish Oscon 2009
 
Oscon 2010
Oscon 2010Oscon 2010
Oscon 2010
 
BCS SIGiST - How Fast is the Cloud?
BCS SIGiST - How Fast is the Cloud?BCS SIGiST - How Fast is the Cloud?
BCS SIGiST - How Fast is the Cloud?
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Testing Zen
Testing ZenTesting Zen
Testing Zen
 
Hacklu2011 tricaud
Hacklu2011 tricaudHacklu2011 tricaud
Hacklu2011 tricaud
 
Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4Bar Camp Auckland - Mongo DB Presentation BCA4
Bar Camp Auckland - Mongo DB Presentation BCA4
 
Voxxed Vienna 2015 Fault tolerant microservices
Voxxed Vienna 2015 Fault tolerant microservicesVoxxed Vienna 2015 Fault tolerant microservices
Voxxed Vienna 2015 Fault tolerant microservices
 
No one listens to my podcast (a kibana story)
No one listens to my podcast (a kibana story)No one listens to my podcast (a kibana story)
No one listens to my podcast (a kibana story)
 
Check Please!
Check Please!Check Please!
Check Please!
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
WebSockets
WebSocketsWebSockets
WebSockets
 
Android casting-wide-net-android-devices
Android casting-wide-net-android-devicesAndroid casting-wide-net-android-devices
Android casting-wide-net-android-devices
 
Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)Scaling with Postgres (Highload++ 2010)
Scaling with Postgres (Highload++ 2010)
 
NodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time WebNodeJS, CoffeeScript & Real-time Web
NodeJS, CoffeeScript & Real-time Web
 
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume LaforgeGaelyk - SpringOne2GX - 2010 - Guillaume Laforge
Gaelyk - SpringOne2GX - 2010 - Guillaume Laforge
 

Kürzlich hochgeladen

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 

Kürzlich hochgeladen (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 

ScaleCamp 2009 - Last.fm vs Xbox

  • 1. Scaling war stories • Last.fm vs Xbox360 • Quick and hacky profiling • Discuss Wednesday, 26 May 2010
  • 2. What happens when scale is forced on you? • 24 Million Xbox360 users • Estimated ~5 times peak traffic increase • No control over source of client • External partner, with their own deadlines • Must be reliable at launch. Err? (The PR problem) Wednesday, 26 May 2010
  • 3. A dose of reality • You won’t have the resources you’d like • People (skills, availability, • Budget (new servers would be nice) • Time (more of this would be nice too) Wednesday, 26 May 2010
  • 4. B-b-but... • It’s not an ideal world • I’m not a systems developer (I spend half my time on the front end) • Quite hacky. Open to suggestions, alternatives, your experiences Wednesday, 26 May 2010
  • 5. HTTP profiling • Had a development Xbox • Stuck a proxy box in the middle • Profiled traffic with Wireshark Wednesday, 26 May 2010
  • 7. Making a list... • API calls made • In order, as uses cases • Bad uses that can be factored out • What breaks when call X is disbabled • Proxy routed to a dev version of API Wednesday, 26 May 2010
  • 8. Xbox Beta • Launched to 1,000 people (At midnight on a Friday). Then to a further 9,000 people • Gave a nice real usage sample • Great, the most common calls are... completely pointless. • frequent != expensive (necessarily) Wednesday, 26 May 2010
  • 9. Custom Logging gen-time LogFormat "%h %l %u %t "%r" %>s %b "% {Referer}i" "%{User-Agent}i" %{gentime}n" <?php apache_note("gen-time", $x); Wednesday, 26 May 2010
  • 10. Abusing bash Text awk 'BEGIN {FS="t"} {a[$2]++;b[$2]=b[$2]+$1} END {for (i in a) printf("%.2f %sn", b[i]/a[i]/ 1000000, i)} ' Wednesday, 26 May 2010
  • 11. Stats Count Total Average 71638 trackgetInfo 15789 0.22 53941 artistgetImages 19647 0.36 15150 radiogetPlaylist 6962 0.46 7308 librarygetArtists 2402 0.33 5020 usergetRecentStations 1674 0.33 4979 adsgetvideos 1810 0.36 4205 radiotune 923 0.22 3155 tracklove 0 0.00 1507 artistgetinfo 440 0.29 1258 usergetRecommendedArtists 1457 1.16 1135 usergetInfo 171 0.15 1130 geogetTopArtists 575 0.51 1128 radiogamerstations 298 0.26 1102 taggettopartists 1488 1.35 1021 trackban 0 0.00 1006 usergetLovedTracks 271 0.27 Wednesday, 26 May 2010
  • 16. Profiling with Xdebug • Profile PHP, stack traces, memory usage, etc • http://xdebug.org extension=xdebug.so xdebug.max_nesting_level=500 xdebug.default_enable=0 xdebug.profiler_enable_trigger=1 xdebug.profiler_append=1 xdebug.trace_output_name= %R.cache.out Wednesday, 26 May 2010
  • 17. Making sense of it Wednesday, 26 May 2010
  • 18. Contingencies • From invisible, to user affecting • Disable DB writes, speed up and prevent blocking on failure • Suppress badly architected Flash Player (and less evil taste-o-meter) • Kill % of method calls at perlbal Wednesday, 26 May 2010
  • 20. Monitoring porn • Launch control with: 3 projectors, 5 x 24” monitors, a dozen dev/sysops with laptops • A moose, a cow and a fail train Wednesday, 26 May 2010