SlideShare a Scribd company logo
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.

More Related Content

Similar to 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 Anonymous
phptechtalk
 
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
phptechtalk
 
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 HTTP
Patrice 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 Development
Linuxmalaysia 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/Camel
Charles Moulliard
 
Mule Integration Simplified
Mule Integration SimplifiedMule Integration Simplified
Mule Integration Simplified
Bui 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 Services
Ivo 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 1
makker_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 Azure
Mesosphere 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 Security
chuckbt
 
Mobile applications chapter 4
Mobile applications chapter 4Mobile applications chapter 4
Mobile applications chapter 4
Akib 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 2018
Timothy 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 MiniFi
DataWorks Summit
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket Introduction
Marcelo Jabali
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
Peter 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 Community
Mike Taylor
 

Similar to 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
 

More from 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 2011
phptechtalk
 
Slipstream Rapid Application Design
Slipstream Rapid Application DesignSlipstream Rapid Application Design
Slipstream Rapid Application Design
phptechtalk
 
Zend In The Cloud
Zend In The CloudZend In The Cloud
Zend In The Cloud
phptechtalk
 
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
phptechtalk
 
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
phptechtalk
 
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
phptechtalk
 
Enabling The Enterprise With Php
Enabling The Enterprise With PhpEnabling The Enterprise With Php
Enabling The Enterprise With Php
phptechtalk
 

More from 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
 

Recently uploaded

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

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.