SlideShare una empresa de Scribd logo
1 de 47
Descargar para leer sin conexión
Joomla! Day
                                     Malaysia 2011



                                    Making Joomla! Site fly with Nginx
                                    Errazudin Ishak




www.mimos.my   © 2009 MIMOS Berhad. All Rights Reserved.
Agenda

        • Me
        • Joomla!
        • “engine X”
        • Benchmarks
        • Samples




www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
About Me
        • Errazudin Ishak
        • @errazudin
        • Senior engineer @ Mimos Bhd Malaysia
        • Focuses on web application development,
          deployment, performance and stability.
        • 2009 : foss.my , MyGOSSCON
        • 2010 : Entp. PHP Techtalk, BarcampKL, PHP
                 Meetup, MOSC2010, PHP Northwest UK,
                 MyGOSSCON
        • 2011 : INTAN Tech Update, Wordpress Conf. Asia

www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Joomla!




               23.5mil                                            *downloads


                                                              Techcrunch June 11th;
                                                               http://goo.gl/DTveS




www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
Joomla! 1.6




               +2.5mil                                                *downloads


                                                                  Techcrunch June 11th;
                                                                   http://goo.gl/DTveS




www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
nginx

        • Free
        • X platform
        • open-source
        • (high-performance)
        • lightweight
        • HTTP server
        • reverse proxy
        • IMAP/POP3 proxy server
www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
http://commons.wikimedia.org/wiki/File:Whittle_Jet_Engine_W2-700.JPG




      “I'm the author of nginx (pronounced "engine x")-
      Igor Sysoev
      (nginx creator)
www.mimos.my            © 2011 MIMOS Berhad. All Rights Reserved.
http://www.litchfieldimports.co.uk/forum/gtr-engine-bay.jpg




                                        Load Balance
                                        Static Content, Index files
                                        Reverse Proxy (with cache)
                                        Streaming




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
http://noisetu.be/mirrors/jet_beetle/




 Loads of Request
 Less memory footprint
 Use less CPU
 C10K Certified


www.mimos.my     © 2011 MIMOS Berhad. All Rights Reserved.
http://www.gtrblog.com/wp-content/uploads/2008/11/gtr-gt2-nurburgring-001.jpg




  Apache
  ----------                                         --------
  Processes                                          Async model
  Threads                                            Single Thread
  High Memory                                        Low Memory
  CPU Overhead                                       Less CPU
  PHP included as                                    PHP as separate proc.
  module (mod_php)                                   over FastCGI




www.mimos.my    © 2011 MIMOS Berhad. All Rights Reserved.
Boston.com




                                                           Numbers




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Market Share for Top Servers Across All Domains




Source :
Netcraft
  www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Market Share for Top Servers Across All Domains




Source :
Netcraft
  www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Market Share for Top Servers Across the Million Busiest
          Sites




Source :
Netcraft
  www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Market Share for Top Servers Across the Million Busiest
          Sites




Source :
Netcraft
  www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
http://goo.gl/KJC8H




                                                           Who?




www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Me uses nginx




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Me uses nginx




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
We also..




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
We all love nginx…




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Modules

                          Mail, 3rd
                           Party
                           Optional
                               HTTP

                           Standard
                             HTTP



                            Core

www.mimos.my      © 2011 MIMOS Berhad. All Rights Reserved.
Modules


               Mail Core, Mail Auth, Mail Proxy, Mail SSL


 HTTP Addition, Emb. Perl, FLV, Gzip Precompression, Random Index,
GeoIP, Real IP, SSL, Stub Status, Substitution, WebDAV, Google Perftools,
                       XSLT, Secure Link, Image Filter

 HTTP Core, HTTP Upstream, HTTP Access, HTTP Auth Basic, HTTP Auto
 Index, Browser, Charset, Empty gif, FastCGI, Geo, Gzip, HTTP Headers,
 Index, HTTP Referer, HTTP Limit Zone, HTTP Limit Requests, Log, Map,
           Memchached, HTTP Proxy, Rewrite, SSI, User ID



                          Main, Events
www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Nginx with PHP

        • FastCGI
        • PHP-FPM (FastCGI Process Manager)
               • Bundled with PHP 5.3.3




www.mimos.my              © 2011 MIMOS Berhad. All Rights Reserved.
Nginx with PHP : FastCGI

        • persistent processes, ability to handle multiple
          requests.
        • web server and gateway application
          communicate with sockets such as TCP
        • web server forwards the client request to the
          gateway and receives the response within a
          single connection
        • can be implemented on any platform with any
          programming language.



www.mimos.my           © 2011 MIMOS Berhad. All Rights Reserved.
Nginx with PHP : FastCGI

     server {
       server_name mysite.com;
       listen 80;
       root /usr/share/mysite/www;
       index index.html;
       location / {
           fastcgi_pass 127.0.0.1:9000;
           fastcgi_param SCRIPT_FILENAME
       $document_root$fastcgi_script_name;
           fastcgi_param PATH_INFO $fastcgi_script_name;
           include fastcgi_params;
       }
     }


www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Nginx with Joomla!
     server {
       server_name yourdomain.com;
       large_client_header_buffers 4 8k;
       root /var/www/joomla;
       index index.php index.html;
       location / {
         try_files $uri $uri/ /index.php?q=$request_uri;
       }
        location ~ .php$ {
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;
         include fastcgi_params;
         fastcgi_param SCRIPT_FILENAME
       $document_root$fastcgi_script_name;
       }
     }
www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
PHP-FPM

        • FastCGI Process Manager
        • Daemonizes PHP > background proc
        • provides a command-line script for
          managing PHP proc
        • configuration of FastCGI pools
        • enhances some of the FastCGI internals
        • increases error reporting
        • script termination

www.mimos.my         © 2011 MIMOS Berhad. All Rights Reserved.
Benchmarks
http://www.myshutterspace.com/profile/AthonySaucedo



        www.mimos.my                                  © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : Specs

        •      Intel Core Duo
        •      T2400, 1.83 GHz
        •      2GB RAM
        •      OS- Fedora 12




www.mimos.my             © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apacheBench

        • -n 100
        • -c 20




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : nginx




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apache




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : Findings




                    Apache 2.2.15 Nginx 0.7.67
     Concurrency    20                                 20
     Doc size       674600bytes                        658000bytes
     Complete       100%                               100%
     Request
     Req per secs   7.2                                8.8
     Longest Req    4848ms                             2638ms



www.mimos.my           © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apacheBench

        • -n 500
        • -c 50




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : nginx




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apache




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : Findings


                Apache 2.2.12                Nginx 0.7.62
Concurrency     50                           50
Doc size        3373300 bytes                3290000 bytes
Complete        100%                         100%
Request
Req per secs    7.93                         8.47
Longest Req     12154 ms                     6374 ms




 www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apacheBench

        • -n 1000
        • -c 100




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : nginx




www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : apache




www.mimos.my       © 2011 MIMOS Berhad. All Rights Reserved.
Benchmark : Findings


                Apache 2.2.12                Nginx 0.7.62
Concurrency     100                          100
Doc size        6746000 bytes                6580000 bytes
Complete        100%                         100%
Request
Req per secs    7.91                         8.48
Longest Req     19268 ms                     12196 ms




 www.mimos.my          © 2011 MIMOS Berhad. All Rights Reserved.
http://goo.gl/4SAnf




               “Every nanoseconds count!” - My Big Boss
               (your boss also)


www.mimos.my                      © 2011 MIMOS Berhad. All Rights Reserved.
http://goo.gl/xmdsy




                                                              Demo

www.mimos.my   © 2011 MIMOS Berhad. All Rights Reserved.
Resources


• http://wiki.nginx.org/Main
• Nedelcu’s book http://goo.gl/67OA
• Nginx 1 Web Server Implementation Cookbook
  http://goo.gl/46UYq
• http://php-fpm.org/
• http://nginx.org




 www.mimos.my        © 2011 MIMOS Berhad. All Rights Reserved.
THANK YOU

                                                                                                            @errazudin
                                                                                                errazudin.ishak@mimos.my
                                                                                                errazudin.ishak@gmail.com

* All images, logos and data are the copyright of
their respective owners
     www.mimos.my                                   © 2011 MIMOS Berhad. All Rights Reserved.

Más contenido relacionado

Similar a Making Joomla! site fly with nginx : Joomla! day Malaysia 2011

Rise of the Planet of the Anonymous
Rise of the Planet of the AnonymousRise of the Planet of the Anonymous
Rise of the Planet of the Anonymousphptechtalk
 
DA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web AppsDA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web Appsphptechtalk
 
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)Peter Lubbers
 
Scalable applications with HTTP
Scalable applications with HTTPScalable applications with HTTP
Scalable applications with HTTPPatrice Neff
 
Analysis & Design Method for OSGi-based Development
Analysis & Design Method for OSGi-based DevelopmentAnalysis & Design Method for OSGi-based Development
Analysis & Design Method for OSGi-based DevelopmentLinuxmalaysia Malaysia
 
Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0GeoTech Informatics
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCharles Moulliard
 
Mule Integration Simplified
Mule Integration SimplifiedMule Integration Simplified
Mule Integration SimplifiedBui Kiet
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIvo Jansch
 
20191201 kubernetes managed weblogic revival - part 1
20191201 kubernetes managed weblogic revival - part 120191201 kubernetes managed weblogic revival - part 1
20191201 kubernetes managed weblogic revival - part 1makker_nl
 
Easy Docker Deployments with Mesosphere DCOS on Azure
Easy Docker Deployments with Mesosphere DCOS on AzureEasy Docker Deployments with Mesosphere DCOS on Azure
Easy Docker Deployments with Mesosphere DCOS on AzureMesosphere Inc.
 
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...mfrancis
 
Website security systems
Website security systemsWebsite security systems
Website security systemsMobile88
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Securitychuckbt
 
Mobile applications chapter 4
Mobile applications chapter 4Mobile applications chapter 4
Mobile applications chapter 4Akib B. Momin
 
MiniFi and Apache NiFi : IoT in Berlin Germany 2018
MiniFi and Apache NiFi : IoT in Berlin Germany 2018MiniFi and Apache NiFi : IoT in Berlin Germany 2018
MiniFi and Apache NiFi : IoT in Berlin Germany 2018Timothy Spann
 
IoT with Apache MXNet and Apache NiFi and MiniFi
IoT with Apache MXNet and Apache NiFi and MiniFiIoT with Apache MXNet and Apache NiFi and MiniFi
IoT with Apache MXNet and Apache NiFi and MiniFiDataWorks Summit
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket IntroductionMarcelo Jabali
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityPeter Lubbers
 
Case Study for Academics and jobs development Higher Education Community
Case Study for Academics and jobs development Higher Education CommunityCase Study for Academics and jobs development Higher Education Community
Case Study for Academics and jobs development Higher Education CommunityMike Taylor
 

Similar a Making Joomla! site fly with nginx : Joomla! day Malaysia 2011 (20)

Rise of the Planet of the Anonymous
Rise of the Planet of the AnonymousRise of the Planet of the Anonymous
Rise of the Planet of the Anonymous
 
DA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web AppsDA with Wa - Desktop Apps With Web Apps
DA with Wa - Desktop Apps With Web Apps
 
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
HTML5 Real Time and WebSocket Code Lab (SFHTML5, GTUGSF)
 
Scalable applications with HTTP
Scalable applications with HTTPScalable applications with HTTP
Scalable applications with HTTP
 
Analysis & Design Method for OSGi-based Development
Analysis & Design Method for OSGi-based DevelopmentAnalysis & Design Method for OSGi-based Development
Analysis & Design Method for OSGi-based Development
 
Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0Open sourcetechnologiessuccessstory allcountry_ver1.0
Open sourcetechnologiessuccessstory allcountry_ver1.0
 
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/CamelCamelone-2012 HTML5 WebSocket ActiveMQ/Camel
Camelone-2012 HTML5 WebSocket ActiveMQ/Camel
 
Mule Integration Simplified
Mule Integration SimplifiedMule Integration Simplified
Mule Integration Simplified
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
20191201 kubernetes managed weblogic revival - part 1
20191201 kubernetes managed weblogic revival - part 120191201 kubernetes managed weblogic revival - part 1
20191201 kubernetes managed weblogic revival - part 1
 
Easy Docker Deployments with Mesosphere DCOS on Azure
Easy Docker Deployments with Mesosphere DCOS on AzureEasy Docker Deployments with Mesosphere DCOS on Azure
Easy Docker Deployments with Mesosphere DCOS on Azure
 
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...
Enabling the Enterprise with Next-Generation Mobile Architectures - Mark Vand...
 
Website security systems
Website security systemsWebsite security systems
Website security systems
 
Html5 Application Security
Html5 Application SecurityHtml5 Application Security
Html5 Application Security
 
Mobile applications chapter 4
Mobile applications chapter 4Mobile applications chapter 4
Mobile applications chapter 4
 
MiniFi and Apache NiFi : IoT in Berlin Germany 2018
MiniFi and Apache NiFi : IoT in Berlin Germany 2018MiniFi and Apache NiFi : IoT in Berlin Germany 2018
MiniFi and Apache NiFi : IoT in Berlin Germany 2018
 
IoT with Apache MXNet and Apache NiFi and MiniFi
IoT with Apache MXNet and Apache NiFi and MiniFiIoT with Apache MXNet and Apache NiFi and MiniFi
IoT with Apache MXNet and Apache NiFi and MiniFi
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket Introduction
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
 
Case Study for Academics and jobs development Higher Education Community
Case Study for Academics and jobs development Higher Education CommunityCase Study for Academics and jobs development Higher Education Community
Case Study for Academics and jobs development Higher Education Community
 

Más de phptechtalk

Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011phptechtalk
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Designphptechtalk
 
Zend In The Cloud
Zend In The CloudZend In The Cloud
Zend In The Cloudphptechtalk
 
Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010phptechtalk
 
P Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php LampP Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php Lampphptechtalk
 
Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010phptechtalk
 
Enabling The Enterprise With Php
Enabling The Enterprise With PhpEnabling The Enterprise With Php
Enabling The Enterprise With Phpphptechtalk
 

Más de phptechtalk (7)

Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
Errazudin - REST in pieces (with frapi) - Malaysia Open Source Conference 2011
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
 
Zend In The Cloud
Zend In The CloudZend In The Cloud
Zend In The Cloud
 
Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010Php In The Enterprise 01 24 2010
Php In The Enterprise 01 24 2010
 
P Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php LampP Hundamental Security Coding Secure With Php Lamp
P Hundamental Security Coding Secure With Php Lamp
 
Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010Zend Solutions For Operational Maturity 01 21 2010
Zend Solutions For Operational Maturity 01 21 2010
 
Enabling The Enterprise With Php
Enabling The Enterprise With PhpEnabling The Enterprise With Php
Enabling The Enterprise With Php
 

Último

ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 

Último (20)

ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 

Making Joomla! site fly with nginx : Joomla! day Malaysia 2011

  • 1. Joomla! Day Malaysia 2011 Making Joomla! Site fly with Nginx Errazudin Ishak www.mimos.my © 2009 MIMOS Berhad. All Rights Reserved.
  • 2. Agenda • Me • Joomla! • “engine X” • Benchmarks • Samples www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 3. About Me • Errazudin Ishak • @errazudin • Senior engineer @ Mimos Bhd Malaysia • Focuses on web application development, deployment, performance and stability. • 2009 : foss.my , MyGOSSCON • 2010 : Entp. PHP Techtalk, BarcampKL, PHP Meetup, MOSC2010, PHP Northwest UK, MyGOSSCON • 2011 : INTAN Tech Update, Wordpress Conf. Asia www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 4. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 5. Joomla! 23.5mil *downloads Techcrunch June 11th; http://goo.gl/DTveS www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 6. Joomla! 1.6 +2.5mil *downloads Techcrunch June 11th; http://goo.gl/DTveS www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 7. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 8. nginx • Free • X platform • open-source • (high-performance) • lightweight • HTTP server • reverse proxy • IMAP/POP3 proxy server www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 9. http://commons.wikimedia.org/wiki/File:Whittle_Jet_Engine_W2-700.JPG “I'm the author of nginx (pronounced "engine x")- Igor Sysoev (nginx creator) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 10. http://www.litchfieldimports.co.uk/forum/gtr-engine-bay.jpg Load Balance Static Content, Index files Reverse Proxy (with cache) Streaming www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 11. http://noisetu.be/mirrors/jet_beetle/ Loads of Request Less memory footprint Use less CPU C10K Certified www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 12. http://www.gtrblog.com/wp-content/uploads/2008/11/gtr-gt2-nurburgring-001.jpg Apache ---------- -------- Processes Async model Threads Single Thread High Memory Low Memory CPU Overhead Less CPU PHP included as PHP as separate proc. module (mod_php) over FastCGI www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 13. Boston.com Numbers www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 14. Market Share for Top Servers Across All Domains Source : Netcraft www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 15. Market Share for Top Servers Across All Domains Source : Netcraft www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 16. Market Share for Top Servers Across the Million Busiest Sites Source : Netcraft www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 17. Market Share for Top Servers Across the Million Busiest Sites Source : Netcraft www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 18. http://goo.gl/KJC8H Who? www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 19. Me uses nginx www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 20. Me uses nginx www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 21. We also.. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 22. We all love nginx… www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 23. Modules Mail, 3rd Party Optional HTTP Standard HTTP Core www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 24. Modules Mail Core, Mail Auth, Mail Proxy, Mail SSL HTTP Addition, Emb. Perl, FLV, Gzip Precompression, Random Index, GeoIP, Real IP, SSL, Stub Status, Substitution, WebDAV, Google Perftools, XSLT, Secure Link, Image Filter HTTP Core, HTTP Upstream, HTTP Access, HTTP Auth Basic, HTTP Auto Index, Browser, Charset, Empty gif, FastCGI, Geo, Gzip, HTTP Headers, Index, HTTP Referer, HTTP Limit Zone, HTTP Limit Requests, Log, Map, Memchached, HTTP Proxy, Rewrite, SSI, User ID Main, Events www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 25. Nginx with PHP • FastCGI • PHP-FPM (FastCGI Process Manager) • Bundled with PHP 5.3.3 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 26. Nginx with PHP : FastCGI • persistent processes, ability to handle multiple requests. • web server and gateway application communicate with sockets such as TCP • web server forwards the client request to the gateway and receives the response within a single connection • can be implemented on any platform with any programming language. www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 27. Nginx with PHP : FastCGI server { server_name mysite.com; listen 80; root /usr/share/mysite/www; index index.html; location / { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; include fastcgi_params; } } www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 28. Nginx with Joomla! server { server_name yourdomain.com; large_client_header_buffers 4 8k; root /var/www/joomla; index index.php index.html; location / { try_files $uri $uri/ /index.php?q=$request_uri; } location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 29. PHP-FPM • FastCGI Process Manager • Daemonizes PHP > background proc • provides a command-line script for managing PHP proc • configuration of FastCGI pools • enhances some of the FastCGI internals • increases error reporting • script termination www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 30. Benchmarks http://www.myshutterspace.com/profile/AthonySaucedo www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 31. Benchmark : Specs • Intel Core Duo • T2400, 1.83 GHz • 2GB RAM • OS- Fedora 12 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 32. Benchmark : apacheBench • -n 100 • -c 20 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 33. Benchmark : nginx www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 34. Benchmark : apache www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 35. Benchmark : Findings Apache 2.2.15 Nginx 0.7.67 Concurrency 20 20 Doc size 674600bytes 658000bytes Complete 100% 100% Request Req per secs 7.2 8.8 Longest Req 4848ms 2638ms www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 36. Benchmark : apacheBench • -n 500 • -c 50 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 37. Benchmark : nginx www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 38. Benchmark : apache www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 39. Benchmark : Findings Apache 2.2.12 Nginx 0.7.62 Concurrency 50 50 Doc size 3373300 bytes 3290000 bytes Complete 100% 100% Request Req per secs 7.93 8.47 Longest Req 12154 ms 6374 ms www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 40. Benchmark : apacheBench • -n 1000 • -c 100 www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 41. Benchmark : nginx www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 42. Benchmark : apache www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 43. Benchmark : Findings Apache 2.2.12 Nginx 0.7.62 Concurrency 100 100 Doc size 6746000 bytes 6580000 bytes Complete 100% 100% Request Req per secs 7.91 8.48 Longest Req 19268 ms 12196 ms www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 44. http://goo.gl/4SAnf “Every nanoseconds count!” - My Big Boss (your boss also) www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 45. http://goo.gl/xmdsy Demo www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 46. Resources • http://wiki.nginx.org/Main • Nedelcu’s book http://goo.gl/67OA • Nginx 1 Web Server Implementation Cookbook http://goo.gl/46UYq • http://php-fpm.org/ • http://nginx.org www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.
  • 47. THANK YOU @errazudin errazudin.ishak@mimos.my errazudin.ishak@gmail.com * All images, logos and data are the copyright of their respective owners www.mimos.my © 2011 MIMOS Berhad. All Rights Reserved.