SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
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?

Mais conteúdo relacionado

Mais 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
 

Mais 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

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
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
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Último (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
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!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

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