SlideShare a Scribd company logo
1 of 62
my.opera.com scalability v1
         Italian Perl Workshop ~ Pisa 2008
               cosimo streppone   <cosimo@cpan.org>
Scalability
   ==
Performance
Scalability
    !=
Performance
Scalability
    ==
memcached?
Scalability
   !=
memcached
My Opera Community
             http://my.opera.com


        blogs                          shoutbox
Opera browser promotion
                         photo albums
     RSS-Atom feeds
                                        slideshows
                      custom designs
Public APIs
          xml/json             forums
2001
2003
2005
2006
2008
my.opera.com

small (un)known web sites
Users (k)
                                                                2.500 *




                                                        1.640 IPW2008



                                                 887

                                          430
                            257 205
        1     10     50
2000   2001   2002   2003   2004   2005   2006   2007    2008    2009
Users (k)
                              Servers

                                                               2.500 *

                                                                IPW2008
                                                        1.640



                                                 887

                                          430
                            257 205
        1     10     50
2000   2001   2002   2003   2004   2005   2006   2007   2008    2009
Users (k)
                              Servers
                              Dyn req/s




                                                               2.500*

                                                        1.640

                                                 887
                            257 205 430
        1     10     50
2000   2001   2002   2003   2004   2005   2006   2007   2008    2009
proxy errors
the zen way to
indefinite scaling
Start



                   Y
 Does it run?

                       Does it   N
         N             scale?
 No problem...
                                 Identify and fix
Wait and restart       Y           bottlenecks




                       End
/* recommendations */


  server-side statistics

  good stress testing tools
shared-nothing
  architecture
  (“zero tolerance for sharing”)
lvs +
        lw httpd



        mod_perl
.....
        backends



        nfs server
        disk cache
        users store
lvs +
        lw httpd



        mod_perl
.....
        backends



        nfs server
        disk cache
        users store
lvs +
        lw httpd



        mod_perl
.....
        backends



        nfs server
        disk cache
        users store
... not so easy ...
dev.opera.com
articles cache
(or “don't guess, profile!”)
/* problem */


       1 function
(XWA::Quote2Dev::Quote)

   ~95%   req time
/* solution */
     Start



                   Y   Great. Serve
  In Cache?            from cache.

          N

Query DB, etc...          Done!


Put it in cache
  this time!
/* solution */

      Yes, that simple!

      Profiling is key.

           try:
m{^ Devel:: .* Prof .*}x
static avatars
(or “put your http servers at work”)
/* problem */

   a single forum page
            ~~
        50 avatars

(crappy CGI backend requests)
new storage subsystem
          pools, servers
  fault tolerance, redundancy

      webdav, http, ftp,
      scp, mogilefs?, ...
user uploads use case
# Create resource object for avatar
my $res = MyOpera::Storage::Resource::Avatar->new(
    owner => '{userid}',
    content => '{binary data}',
);


# Main storage subsystem handle
my $storage = MyOpera::Storage->new();


# Upload on pools of servers all at once
my $ok = $storage->upload($res);
resources
                   (user uploads, binary blobs, ...)




              pools, servers




                                 URLs
http://static.myopera.com/pool1/avatars/a4/754/a1b2c3d4e5f6.../<userid>_o.png
http://static.myopera.com/pool1/avatars/a4/754/a1b2c3d4e5f6.../<userid>_t.jpg
http://static.myopera.com/pool1/avatars/a4/754/a1b2c3d4e5f6.../<userid>_m.jpg
http://static.myopera.com/pool1/avatars/a4/754/a1b2c3d4e5f6.../<userid>_l.jpg
/* results */


saved ~500k backend req/day

    browser cache used!
dogpile effect
(or the cache “storms”)
/* problem */


very high load spikes
  on DB, backends
/* cause */


many concurrent clients
build same cached items
/* solution */


cache contention algorithm

      NFS-resistant
  optimistic file locking
/* solution */

    ideas taken from
HTML::Mason, Django, ...

 patched File::NFSLock
/* further ideas */

 LOCK_SPIN_TIME


distributed cache
  on backends
Opera releases
/* problem */


 10-30x normal load

handling of peak load?
/* try 1 */


 load-balanced
database profiles
/* try 2 */



url hot-list
/* solution? */


no solution this time,
        sorry.
/* further ideas */


   Amazon EC2 ?
Akamai CDN services?
        ... ?
soft counters
     (didn't work as expected, in progress...)




sacrifice speed for concurrency
         (mysql's myisam locks all table on update)
/* future directions */

         database   partitioning?
   modperl backend optimization?
threading sucks in mp2. debian anyone?
           improve memory sharing?
        sysadmin-level optimizations?
take-aways


find your PKIs
take-aways


always compare
before and after
take-aways


stress testing in your
    release cycle
take-aways


have fun!
   ;-)
?questions?
thanks!

More Related Content

What's hot

Falcon Storage Engine Designed For Speed Presentation
Falcon Storage Engine   Designed For Speed PresentationFalcon Storage Engine   Designed For Speed Presentation
Falcon Storage Engine Designed For Speed Presentation
elliando dias
 
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle FinalCvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
Liudmila Li
 
MongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and ExamplesMongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and Examples
MongoDB
 
Windows azure Presentation
Windows azure PresentationWindows azure Presentation
Windows azure Presentation
Chiheb Chebbi
 
VMWare VSphere4 Documentation Notes
VMWare VSphere4 Documentation NotesVMWare VSphere4 Documentation Notes
VMWare VSphere4 Documentation Notes
Grit Suwa
 

What's hot (20)

Falcon Storage Engine Designed For Speed Presentation
Falcon Storage Engine   Designed For Speed PresentationFalcon Storage Engine   Designed For Speed Presentation
Falcon Storage Engine Designed For Speed Presentation
 
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle FinalCvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
Cvc2009 Moscow Xen App5 Fp1 Fabian Kienle Final
 
OpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOFOpenSolaris Web Stack MySQL BOF
OpenSolaris Web Stack MySQL BOF
 
Oracle vm 3.0 Fresh Start - Tarmo Alasoo
Oracle vm 3.0 Fresh Start - Tarmo AlasooOracle vm 3.0 Fresh Start - Tarmo Alasoo
Oracle vm 3.0 Fresh Start - Tarmo Alasoo
 
MongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and ExamplesMongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and Examples
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - Marchioni
 
Uponor Exadata e-Business Suite Migration Case Study
Uponor Exadata e-Business Suite Migration Case StudyUponor Exadata e-Business Suite Migration Case Study
Uponor Exadata e-Business Suite Migration Case Study
 
Pod density comparison: VMware vSphere with Tanzu vs. a bare-metal approach ...
 Pod density comparison: VMware vSphere with Tanzu vs. a bare-metal approach ... Pod density comparison: VMware vSphere with Tanzu vs. a bare-metal approach ...
Pod density comparison: VMware vSphere with Tanzu vs. a bare-metal approach ...
 
J boss
J bossJ boss
J boss
 
Windows deployment on bare metal using ironic
Windows deployment on bare metal using ironicWindows deployment on bare metal using ironic
Windows deployment on bare metal using ironic
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
 
Windows azure Presentation
Windows azure PresentationWindows azure Presentation
Windows azure Presentation
 
Oracle VM 3.4.1 Installation
Oracle VM 3.4.1 InstallationOracle VM 3.4.1 Installation
Oracle VM 3.4.1 Installation
 
VMWare VSphere4 Documentation Notes
VMWare VSphere4 Documentation NotesVMWare VSphere4 Documentation Notes
VMWare VSphere4 Documentation Notes
 
VMWare Lab For Training, Testing or Proof of Concept
VMWare Lab For Training, Testing or Proof of ConceptVMWare Lab For Training, Testing or Proof of Concept
VMWare Lab For Training, Testing or Proof of Concept
 
White Paper - Why Use Oracle VM for Oracle Databases
White Paper - Why Use Oracle VM for Oracle DatabasesWhite Paper - Why Use Oracle VM for Oracle Databases
White Paper - Why Use Oracle VM for Oracle Databases
 
EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012
 
Oracle VM 3 hard partitioning
Oracle VM 3 hard partitioningOracle VM 3 hard partitioning
Oracle VM 3 hard partitioning
 
Rht upgrade v5-v2
Rht upgrade v5-v2Rht upgrade v5-v2
Rht upgrade v5-v2
 
Ironic
IronicIronic
Ironic
 

Viewers also liked

Viewers also liked (9)

NPW2009 - my.opera.com scalability v2.0
NPW2009 - my.opera.com scalability v2.0NPW2009 - my.opera.com scalability v2.0
NPW2009 - my.opera.com scalability v2.0
 
Italian, do you speak it?
Italian, do you speak it?Italian, do you speak it?
Italian, do you speak it?
 
My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009My Opera meets Varnish, Dec 2009
My Opera meets Varnish, Dec 2009
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
 
YAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses PerlYAPC::EU::2009 - How Opera Software uses Perl
YAPC::EU::2009 - How Opera Software uses Perl
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
How we use and deploy Varnish at Opera
How we use and deploy Varnish at OperaHow we use and deploy Varnish at Opera
How we use and deploy Varnish at Opera
 
Velocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attackVelocity 2011 - Our first DDoS attack
Velocity 2011 - Our first DDoS attack
 
Velocity 2012 - Learning WebOps the Hard Way
Velocity 2012 - Learning WebOps the Hard WayVelocity 2012 - Learning WebOps the Hard Way
Velocity 2012 - Learning WebOps the Hard Way
 

Similar to IPW2008 - my.opera.com scalability

Surge 2010 - from disaster to stability - scaling my.opera.com
Surge 2010 - from disaster to stability - scaling my.opera.comSurge 2010 - from disaster to stability - scaling my.opera.com
Surge 2010 - from disaster to stability - scaling my.opera.com
Cosimo Streppone
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
Ayman El-Hattab
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
Tom Croucher
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status Message
Lukas Renggli
 

Similar to IPW2008 - my.opera.com scalability (20)

Surge 2010 - from disaster to stability - scaling my.opera.com
Surge 2010 - from disaster to stability - scaling my.opera.comSurge 2010 - from disaster to stability - scaling my.opera.com
Surge 2010 - from disaster to stability - scaling my.opera.com
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Running E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database ApplianceRunning E-Business Suite Database on Oracle Database Appliance
Running E-Business Suite Database on Oracle Database Appliance
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming  Node.js and How JavaScript is Changing Server Programming
Node.js and How JavaScript is Changing Server Programming
 
Practical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with AzurePractical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with Azure
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010Powering the Next Generation Services with Java Platform - Spark IT 2010
Powering the Next Generation Services with Java Platform - Spark IT 2010
 
Implementación de tfs 2010 en entornos complejos (cómo y por qué) v03
Implementación de tfs 2010 en entornos complejos (cómo y por qué) v03Implementación de tfs 2010 en entornos complejos (cómo y por qué) v03
Implementación de tfs 2010 en entornos complejos (cómo y por qué) v03
 
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
Java EE 6 & GlassFish v3: Paving the path for the future - Spark IT 2010
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 features
 
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle EastSharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
SharePoint Sandboxed Solutions and InfoPath - TechEd Middle East
 
VMUGIT UC 2013 - 06 Mike Laverick
VMUGIT UC 2013 - 06 Mike LaverickVMUGIT UC 2013 - 06 Mike Laverick
VMUGIT UC 2013 - 06 Mike Laverick
 
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFestThe Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
 
Virt Exchange2k7 Final Frontier V Mworld2007
Virt Exchange2k7 Final Frontier V Mworld2007Virt Exchange2k7 Final Frontier V Mworld2007
Virt Exchange2k7 Final Frontier V Mworld2007
 
Adm02. IBM Connections Adminblast
Adm02. IBM Connections AdminblastAdm02. IBM Connections Adminblast
Adm02. IBM Connections Adminblast
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
 
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
JavaScript is the new black - Why Node.js is going to rock your world - Web 2...
 
Seaside Status Message
Seaside Status MessageSeaside Status Message
Seaside Status Message
 

Recently uploaded

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)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
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
 

IPW2008 - my.opera.com scalability