SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
Sander van de Graaf
      IDG Nederland
Web 2.0
Topics
•   Webwereld / Zoom
•   Bottlenecks
    •   PHP
    •   MySQL
    •   Apache
•   Caching
•   Vragen
Webwereld / Zoom
Webwereld
•   4,5 miljoen pageviews per maand




                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Webwereld
•   4,5 miljoen pageviews per maand
•   99% dynamisch




                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Webwereld
•   4,5 miljoen pageviews per maand
•   99% dynamisch
•   Virtualhost




                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Webwereld
•   4,5 miljoen pageviews per maand
•   99% dynamisch
•   Virtualhost
•   PHP 4




                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Webwereld
•   4,5 miljoen pageviews per maand
•   99% dynamisch
•   Virtualhost
•   PHP 4
•   scripts


                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Webwereld
•   4,5 miljoen pageviews per maand
•   99% dynamisch
•   Virtualhost
•   PHP 4
•   scripts
•   Smarty
                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Zoom.nl
•   5+ miljoen pageviews




                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Zoom.nl
•   5+ miljoen pageviews
•   100% dynamisch




                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Zoom.nl
•   5+ miljoen pageviews
•   100% dynamisch
•   2 webservers




                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Zoom.nl
•   5+ miljoen pageviews
•   100% dynamisch
•   2 webservers
•   3,8TB data




                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Zoom.nl
•   5+ miljoen pageviews
•   100% dynamisch
•   2 webservers
•   3,8TB data
•   ImageMagick ipv GD


                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Zoom.nl
•   5+ miljoen pageviews
•   100% dynamisch
•   2 webservers
•   3,8TB data
•   ImageMagick ipv GD
•   Smarty
                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
Bottlenecks
Bottlenecks


•   Applicatie
•   Database
•   NAS


                           Webwereld / Zoom
                           Bottlenecks
                                PHP
                                MySQL
                                Apache
                           Caching
                           Vragen
PHP
PHP


•   Optimalisaties
•   APD
•   Intermediate Code Caching


                                Webwereld / Zoom
                                Bottlenecks
                                      PHP
                                      MySQL
                                      Apache
                                Caching
                                Vragen
Optimalisaties

for($foo=0;$foo<count($bar);$foo++)
{
    // do something
}

                                      Webwereld / Zoom
                                      Bottlenecks
                                            PHP
                                            MySQL
                                            Apache
                                      Caching
                                      Vragen
Optimalisaties

$barCount = count($bar);
for($foo=0;$foo<$barCount;++$foo)
{
    // do something
}

                                    Webwereld / Zoom
                                    Bottlenecks
                                          PHP
                                          MySQL
                                          Apache
                                    Caching
                                    Vragen
APD


PProf




              Webwereld / Zoom
              Bottlenecks
                    PHP
                    MySQL
                    Apache
              Caching
              Vragen
APD



apd_set_pprof_trace();

                         Webwereld / Zoom
                         Bottlenecks
                               PHP
                               MySQL
                               Apache
                         Caching
                         Vragen
Webwereld / Zoom
Bottlenecks
      PHP
      MySQL
      Apache
Caching
Vragen
Intermediate code caching


 •   eAccelerator
 •   Zend Optimizer
 •   APC


                        Webwereld / Zoom
                        Bottlenecks
                              PHP
                              MySQL
                              Apache
                        Caching
                        Vragen
MySQL
MySQL


•   Background
•   Optimalisaties



                         Webwereld / Zoom
                         Bottlenecks
                               PHP
                               MySQL
                               Apache
                         Caching
                         Vragen
Background


•   MySQL 4.1.10
•   2 database servers
•   MyISAM


                          Webwereld / Zoom
                          Bottlenecks
                                PHP
                                MySQL
                                Apache
                          Caching
                          Vragen
Optimalisaties
•   Valkuilen




                             Webwereld / Zoom
                             Bottlenecks
                                   PHP
                                   MySQL
                                   Apache
                             Caching
                             Vragen
ORDER BY RAND()


SELECT * FROM images ORDER BY RAND() LIMIT 10;




                                                 Webwereld / Zoom
                                                 Bottlenecks
                                                       PHP
                                                       MySQL
                                                       Apache
                                                 Caching
                                                 Vragen
ORDER BY RAND()


SELECT * FROM images
WHERE id IN (1243,34234,2341,135465,123,653);




                                                Webwereld / Zoom
                                                Bottlenecks
                                                      PHP
                                                      MySQL
                                                      Apache
                                                Caching
                                                Vragen
WHERE 1


SELECT * FROM images WHERE 1 ORDER BY id DESC LIMIT 10;




                                                    Webwereld / Zoom
                                                    Bottlenecks
                                                          PHP
                                                          MySQL
                                                          Apache
                                                    Caching
                                                    Vragen
WHERE 1


SELECT * FROM images ORDER BY id DESC LIMIT 10;




                                                  Webwereld / Zoom
                                                  Bottlenecks
                                                        PHP
                                                        MySQL
                                                        Apache
                                                  Caching
                                                  Vragen
Optimalisaties
•   Valkuilen

•   Indexes




                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Force Index

SELECT * FROM images FORCE INDEX(user_id)
  WHERE user_id = “12”
  ORDER BY created_on DESC
  LIMIT 10

                                        Webwereld / Zoom
                                        Bottlenecks
                                              PHP
                                              MySQL
                                              Apache
                                        Caching
                                        Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN




                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
EXPLAIN SELECT * FROM images LIMIT 10;




                                         Webwereld / Zoom
                                         Bottlenecks
                                               PHP
                                               MySQL
                                               Apache
                                         Caching
                                         Vragen
EXPLAIN SELECT * FROM images LIMIT 10;




                                         Webwereld / Zoom
                                         Bottlenecks
                                               PHP
                                               MySQL
                                               Apache
                                         Caching
                                         Vragen
EXPLAIN SELECT I.* FROM images I, zoom_profile.users U
  WHERE I.user_id = U.id
  AND I.user_id = 1244
  LIMIT 10;




                                                 Webwereld / Zoom
                                                 Bottlenecks
                                                       PHP
                                                       MySQL
                                                       Apache
                                                 Caching
                                                 Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types




                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types

•   Table optimalisaties




                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types

•   Table optimalisaties

•   PROCESSLIST




                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types

•   Table optimalisaties

•   PROCESSLIST

•   MTOP


                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types

•   Table optimalisaties

•   PROCESSLIST

•   MTOP

•   SLOW Query Log
                               Webwereld / Zoom
                               Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Optimalisaties
•   Valkuilen

•   Indexes

•   EXPLAIN

•   Connection types

•   Table optimalisaties

•   PROCESSLIST

•   MTOP

•   SLOW Query Log

•
                               Webwereld / Zoom

    De-normalisatie            Bottlenecks
                                     PHP
                                     MySQL
                                     Apache
                               Caching
                               Vragen
Apache
Apache


•   Apache 2.0
•   htaccess
•   mod_expires


                           Webwereld / Zoom
                           Bottlenecks
                                 PHP
                                 MySQL
                                 Apache
                           Caching
                           Vragen
.htaccess

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} ^.*public_images.*$

RewriteRule ^public_images/([0-9]*)/([0-9]*)/(.*)$

                          /do_some_magic_stuff.php?user_id=$1&width=$2&filename=$




                                                                            Webwereld / Zoom
                                                                            Bottlenecks
                                                                                  PHP
                                                                                  MySQL
                                                                                  Apache
                                                                            Caching
                                                                            Vragen
.htaccess

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} ^.*public_images.*$

RewriteRule ^public_images/([0-9]*)/([0-9]*)/(.*)$

                          /do_some_magic_stuff.php?user_id=$1&width=$2&filename=$




                                                                            Webwereld / Zoom
                                                                            Bottlenecks
                                                                                  PHP
                                                                                  MySQL
                                                                                  Apache
                                                                            Caching
                                                                            Vragen
mod_expires
<IfModule mod_expires.c>
   ExpiresActive ON
   ExpiresByType image/gif quot;now plus 1 weekquot;
   ExpiresByType image/png quot;now plus 1 weekquot;
   ExpiresByType image/jpeg quot;now plus 1 weekquot;
   ExpiresByType text/css quot;now plus 15 minutequot;
   ExpiresByType application/x-javascript quot;now plus 15 minquot;
   ExpiresDefault quot;nowquot;                                Webwereld / Zoom


</IfModule>
                                                       Bottlenecks
                                                             PHP
                                                             MySQL
                                                             Apache
                                                       Caching
                                                       Vragen
Caching
Caching
•   (intermediate) Code Caching




                                  Webwereld / Zoom
                                  Bottlenecks
                                        PHP
                                        MySQL
                                        Apache
                                  Caching
                                  Vragen
Caching
•   (intermediate) Code Caching
•   Page caching




                                  Webwereld / Zoom
                                  Bottlenecks
                                        PHP
                                        MySQL
                                        Apache
                                  Caching
                                  Vragen
Caching
•   (intermediate) Code Caching
•   Page caching
•   Fragment caching




                                  Webwereld / Zoom
                                  Bottlenecks
                                        PHP
                                        MySQL
                                        Apache
                                  Caching
                                  Vragen
Caching
•   (intermediate) Code Caching
•   Page caching
•   Fragment caching
•   Object caching




                                  Webwereld / Zoom
                                  Bottlenecks
                                        PHP
                                        MySQL
                                        Apache
                                  Caching
                                  Vragen
Caching
•   (intermediate) Code Caching
•   Page caching
•   Fragment caching
•   Object caching
•   Content caching


                                  Webwereld / Zoom
                                  Bottlenecks
                                        PHP
                                        MySQL
                                        Apache
                                  Caching
                                  Vragen
Vragen?

Más contenido relacionado

Más de dpc

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethansdpc
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabinidpc
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchelldpc
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinneydpc
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraskidpc
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencierdpc
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broersedpc
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmanndpc
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebschdpc
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmanndpc
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulkedpc
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Janschdpc
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Janschdpc
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)dpc
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)dpc
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)dpc
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)dpc
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)dpc
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)dpc
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)dpc
 

Más de dpc (20)

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethans
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabini
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraski
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencier
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmann
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmann
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulke
 
Enterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo JanschEnterprise PHP Development - Ivo Jansch
Enterprise PHP Development - Ivo Jansch
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Jansch
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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 organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)

  • 1.
  • 2. Sander van de Graaf IDG Nederland
  • 4. Topics • Webwereld / Zoom • Bottlenecks • PHP • MySQL • Apache • Caching • Vragen
  • 6.
  • 7. Webwereld • 4,5 miljoen pageviews per maand Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 8. Webwereld • 4,5 miljoen pageviews per maand • 99% dynamisch Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 9. Webwereld • 4,5 miljoen pageviews per maand • 99% dynamisch • Virtualhost Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 10. Webwereld • 4,5 miljoen pageviews per maand • 99% dynamisch • Virtualhost • PHP 4 Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 11. Webwereld • 4,5 miljoen pageviews per maand • 99% dynamisch • Virtualhost • PHP 4 • scripts Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 12. Webwereld • 4,5 miljoen pageviews per maand • 99% dynamisch • Virtualhost • PHP 4 • scripts • Smarty Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 13.
  • 14. Zoom.nl • 5+ miljoen pageviews Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 15. Zoom.nl • 5+ miljoen pageviews • 100% dynamisch Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 16. Zoom.nl • 5+ miljoen pageviews • 100% dynamisch • 2 webservers Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 17. Zoom.nl • 5+ miljoen pageviews • 100% dynamisch • 2 webservers • 3,8TB data Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 18. Zoom.nl • 5+ miljoen pageviews • 100% dynamisch • 2 webservers • 3,8TB data • ImageMagick ipv GD Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 19. Zoom.nl • 5+ miljoen pageviews • 100% dynamisch • 2 webservers • 3,8TB data • ImageMagick ipv GD • Smarty Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 21. Bottlenecks • Applicatie • Database • NAS Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 22. PHP
  • 23. PHP • Optimalisaties • APD • Intermediate Code Caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 24. Optimalisaties for($foo=0;$foo<count($bar);$foo++) { // do something } Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 25. Optimalisaties $barCount = count($bar); for($foo=0;$foo<$barCount;++$foo) { // do something } Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 26. APD PProf Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 27. APD apd_set_pprof_trace(); Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 28. Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 29. Intermediate code caching • eAccelerator • Zend Optimizer • APC Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 30. MySQL
  • 31. MySQL • Background • Optimalisaties Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 32. Background • MySQL 4.1.10 • 2 database servers • MyISAM Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 33. Optimalisaties • Valkuilen Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 34. ORDER BY RAND() SELECT * FROM images ORDER BY RAND() LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 35. ORDER BY RAND() SELECT * FROM images WHERE id IN (1243,34234,2341,135465,123,653); Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 36. WHERE 1 SELECT * FROM images WHERE 1 ORDER BY id DESC LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 37. WHERE 1 SELECT * FROM images ORDER BY id DESC LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 38. Optimalisaties • Valkuilen • Indexes Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 39. Force Index SELECT * FROM images FORCE INDEX(user_id) WHERE user_id = “12” ORDER BY created_on DESC LIMIT 10 Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 40. Optimalisaties • Valkuilen • Indexes • EXPLAIN Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 41. EXPLAIN SELECT * FROM images LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 42. EXPLAIN SELECT * FROM images LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 43. EXPLAIN SELECT I.* FROM images I, zoom_profile.users U WHERE I.user_id = U.id AND I.user_id = 1244 LIMIT 10; Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 44. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 45. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types • Table optimalisaties Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 46. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types • Table optimalisaties • PROCESSLIST Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 47. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types • Table optimalisaties • PROCESSLIST • MTOP Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 48. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types • Table optimalisaties • PROCESSLIST • MTOP • SLOW Query Log Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 49. Optimalisaties • Valkuilen • Indexes • EXPLAIN • Connection types • Table optimalisaties • PROCESSLIST • MTOP • SLOW Query Log • Webwereld / Zoom De-normalisatie Bottlenecks PHP MySQL Apache Caching Vragen
  • 51. Apache • Apache 2.0 • htaccess • mod_expires Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 52. .htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ^.*public_images.*$ RewriteRule ^public_images/([0-9]*)/([0-9]*)/(.*)$ /do_some_magic_stuff.php?user_id=$1&width=$2&filename=$ Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 53. .htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ^.*public_images.*$ RewriteRule ^public_images/([0-9]*)/([0-9]*)/(.*)$ /do_some_magic_stuff.php?user_id=$1&width=$2&filename=$ Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 54. mod_expires <IfModule mod_expires.c> ExpiresActive ON ExpiresByType image/gif quot;now plus 1 weekquot; ExpiresByType image/png quot;now plus 1 weekquot; ExpiresByType image/jpeg quot;now plus 1 weekquot; ExpiresByType text/css quot;now plus 15 minutequot; ExpiresByType application/x-javascript quot;now plus 15 minquot; ExpiresDefault quot;nowquot; Webwereld / Zoom </IfModule> Bottlenecks PHP MySQL Apache Caching Vragen
  • 56. Caching • (intermediate) Code Caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 57. Caching • (intermediate) Code Caching • Page caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 58. Caching • (intermediate) Code Caching • Page caching • Fragment caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 59. Caching • (intermediate) Code Caching • Page caching • Fragment caching • Object caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen
  • 60. Caching • (intermediate) Code Caching • Page caching • Fragment caching • Object caching • Content caching Webwereld / Zoom Bottlenecks PHP MySQL Apache Caching Vragen