SlideShare a Scribd company logo
From LAMP to LNNP
              A Transition from

     Linux Apache Mysql (mod_)PHP
                     to

 Linux (what else?) Nginx Nosql PHP(-FPM)


              Giorgio Cefaro
           http://giorgiocefaro.com
                     @giorrrgio
L→L
from Linux to...Linux
(intentionally blank)
A→N
from Apache to Nginx
Vs



                            From Wikipedia:

Nginx uses an asynchronous event-driven approach to handling requests
    which can provide more predictable performance under high loads,
 in contrast to the Apache HTTP server model that defaults to a threaded
            or process-oriented approach to handling requests
PHP Hello world benchmarks
        Ab -k -n 50000 -c 10 http://10.0.0.3/test.php




Concurrency Level:      10               Concurrency Level:      10
Time taken for tests:   31.796 seconds   Time taken for tests:   18.646 seconds
Complete requests:      50000            Complete requests:      50000
Failed requests:        0                Failed requests:        0
Write errors:           0                Write errors:           0
Keep-Alive requests:    0                Keep-Alive requests:    49509
Total transferred:      8450000 bytes    Total transferred:      12928406 bytes
HTML transferred:       550000 bytes     HTML transferred:       550000 bytes
Requests per second:    1572.54          Requests per second:    2681.54
[#/sec] (mean)                           [#/sec] (mean)
Time per request:       6.359 [ms]       Time per request:       3.729 [ms]
(mean)                                   (mean)
Time per request:       0.636 [ms]       Time per request:       0.373 [ms]
(mean, across all concurrent requests)   (mean, across all concurrent requests)
Transfer rate:          259.53           Transfer rate:          677.11
[Kbytes/sec] received                    [Kbytes/sec] received


Load average: 4.38, 1.29, 0.46           Load average: 3.00, 0.89, 0.32
PHP Hello world benchmarks
        Ab -k -n 50000 -c 100 http://10.0.0.3/test.php




Concurrency Level:      100              Concurrency Level:      100
Time taken for tests:   28.143 seconds   Time taken for tests:   18.398 seconds
Complete requests:      50000            Complete requests:      50000
Failed requests:        0                Failed requests:        0
Write errors:           0                Write errors:           0
Keep-Alive requests:    0                Keep-Alive requests:    49573
Total transferred:      8450000 bytes    Total transferred:      12931199 bytes
HTML transferred:       550000 bytes     HTML transferred:       550000 bytes
Requests per second:    1776.66          Requests per second:    2717.69
[#/sec] (mean)                           [#/sec] (mean)
Time per request:       56.285 [ms]      Time per request:       36.796 [ms]
(mean)                                   (mean)
Time per request:       0.563 [ms]       Time per request:       0.368 [ms]
(mean, across all concurrent requests)   (mean, across all concurrent requests)
Transfer rate:          293.22           Transfer rate:          686.39
[Kbytes/sec] received                    [Kbytes/sec] received


Load average: 13.70, 3.54, 1.20          Load average: 38.49, 10.07, 3.41
PHP Hello world benchmarks
        Ab -k -n 50000 -c 1000 http://10.0.0.3/test.php




Concurrency Level:      1000             Completed 5000 requests
Time taken for tests:   64.339 seconds   Completed 10000 requests
Complete requests:      50000            Completed 15000 requests
Failed requests:        474              apr_socket_recv: Connection reset by
   (Connect: 0, Receive: 0, Length:      peer (104)
474, Exceptions: 0)                      Total of 17522 requests completed
Write errors:           0
Non-2xx responses:      474
Total transferred:      8522996 bytes
HTML transferred:       626314 bytes
Requests per second:    777.13 [#/sec]
(mean)
Time per request:       1286.778 [ms]
(mean)
Time per request:       1.287 [ms]
(mean, across all concurrent requests)
Transfer rate:          129.37
[Kbytes/sec] received

Load average: 20.50, 7.13, 2.64          Load average: 36.86, 9.02, 3.03
Static HTML benchmarks
        ab -n 50000 -c 10 http://10.0.0.3/test.html




Concurrency Level:      10               Concurrency Level:      10
Time taken for tests:   14.023 seconds   Time taken for tests:   11.887 seconds
Complete requests:      50000            Complete requests:      50000
Failed requests:        0                Failed requests:        0
Write errors:           0                Write errors:           0
Total transferred:      10650000 bytes   Total transferred:      13950000 bytes
HTML transferred:       250000 bytes     HTML transferred:       250000 bytes
Requests per second:    3565.47          Requests per second:    4206.43
[#/sec] (mean)                           [#/sec] (mean)
Time per request:       2.805 [ms]       Time per request:       2.377 [ms]
(mean)                                   (mean)
Time per request:       0.280 [ms]       Time per request:       0.238 [ms]
(mean, across all concurrent requests)   (mean, across all concurrent requests)
Transfer rate:          741.65           Transfer rate:          1146.09
[Kbytes/sec] received                    [Kbytes/sec] received
Static HTML benchmarks
        ab -n 50000 -c 100 http://10.0.0.3/test.html




Concurrency Level:      100              Concurrency Level:      100
Time taken for tests:   12.785 seconds   Time taken for tests:   11.875 seconds
Complete requests:      50000            Complete requests:      50000
Failed requests:        0                Failed requests:        0
Write errors:           0                Write errors:           0
Total transferred:      10650000 bytes   Total transferred:      13950000 bytes
HTML transferred:       250000 bytes     HTML transferred:       250000 bytes
Requests per second:    3910.97          Requests per second:    4210.42
[#/sec] (mean)                           [#/sec] (mean)
Time per request:       25.569 [ms]      Time per request:       23.751 [ms]
(mean)                                   (mean)
Time per request:       0.256 [ms]       Time per request:       0.238 [ms]
(mean, across all concurrent requests)   (mean, across all concurrent requests)
Transfer rate:          813.51           Transfer rate:          1147.17
[Kbytes/sec] received                    [Kbytes/sec] received
Static HTML benchmarks
        ab -n 50000 -c 100 http://10.0.0.3/test.html




Concurrency Level:      100              Concurrency Level:      100
Time taken for tests:   12.785 seconds   Time taken for tests:   11.875 seconds
Complete requests:      50000            Complete requests:      50000
Failed requests:        0                Failed requests:        0
Write errors:           0                Write errors:           0
Total transferred:      10650000 bytes   Total transferred:      13950000 bytes
HTML transferred:       250000 bytes     HTML transferred:       250000 bytes
Requests per second:    3910.97          Requests per second:    4210.42
[#/sec] (mean)                           [#/sec] (mean)
Time per request:       25.569 [ms]      Time per request:       23.751 [ms]
(mean)                                   (mean)
Time per request:       0.256 [ms]       Time per request:       0.238 [ms]
(mean, across all concurrent requests)   (mean, across all concurrent requests)
Transfer rate:          813.51           Transfer rate:          1147.17
[Kbytes/sec] received                    [Kbytes/sec] received
Static HTML benchmarks
        ab -n 10000 -c 1000 http://10.0.0.3/test.html




Concurrency Level:      1000             Completed 1000 requests
Time taken for tests:   4.915 seconds    Completed 2000 requests
Complete requests:      10000            Completed 3000 requests
Failed requests:        0                Completed 4000 requests
Write errors:           0                Completed 5000 requests
Total transferred:      2130000 bytes    Completed 6000 requests
HTML transferred:       50000 bytes      Completed 7000 requests
Requests per second:    2034.45          Completed 8000 requests
[#/sec] (mean)                           Completed 9000 requests
Time per request:       491.533 [ms]     apr_socket_recv: Connection reset by
(mean)                                   peer (104)
Time per request:       0.492 [ms]       Total of 9561 requests completed
(mean, across all concurrent requests)
Transfer rate:          423.18
[Kbytes/sec] received
M→N
from MySQL to NoSQL
NoSQL?
●   SQL, tables, relations, JOINS...

●   Just documents, graphs, key-value pairs.

●   Really useful when working with a huge quantity of data

●   Really useful when working with data that you want not staticly
    structured


●   Really useful for statistical or real-time analyses for growing list
    of elements
My NoSql choice: MongoDB
●    Data in MongoDB is stored in JSON-like documents

●    horizontal scalability, auto-sharding to distribute data across many
     nodes (auto balancing, easy scaling)

●    full consistency and transactional updates

●    Data integrity is guaranteed through journalling and replication

●    Supported by Doctrine2 through Mongo

●    Warning: not fully ACID* compliant (missing some transactional use
     cases)


    * atomicity, consistency, isolation, durability
P→P
from mod_Php to PHP-FPM
Apache with modphp works
               but...
●   Every apache forked process is fat with all its modules
    loaded, though before-fork code is shared among processes

●   PHP is part of the apache process itself

●   You have to load PHP even when you serve static files
    (server memory footprint)

●   You have to rely on a unique PHP version for all you apps
...we can do better: FastCGI PHP
●   Multiple versions of PHP, each executed by a different user

●   Reduces the memory footprint of your web server for static
    files

●   PHP can be executed on a separate machine
We can do even better! PHP-
               FPM
●   FastCGI Process Manager
●   PHP daemonization
    pid file, log file, setsid(), setuid(), setgid(), chroot()
●   Adaptive process spawning
    Dynamic number of processes, depending on the load
●   Worker level configuration
    uid/gid/chroot/environment and different php.ini for each worker
●   Logging stdout and stderr
●   Forcing the completion of process if set_time_limit() fails
Workers, Daemons, WTF?
●   At startup a configurable number of workers ar launched,
    waiting for requests

●   Once requests arrive if needed workers are spawned

●   Each worker serves a request

●   You can fine tune the behaviour to adapt it to your machine
Wanna try?
 Let's get our hands dirty
Hot to install Nginx + PHP-FPM on
                    Ubuntu
●   Version 1.1.19 of nginx is included in the standard ubuntu
    12.04 repo
●   Unofficial PPA for current stable and development versions




sudo add-apt-repository ppa:nginx/stable

sudo apt-get update

sudo apt-get install nginx

sudo apt-get install php5-fpm php5-cgi
A simple nginx host
                 configuration
#/etc/nginx/sites-available/default

server {
  listen          80;
  server_name     localhost;
  index           index.php;
  root            /var/www;
  location ~* .php$ {
     #prevent cgi.fix_pathinfo=1 security hole
    if (!-f $request_filename) {
      return 404;
    }
    fastcgi_pass 127.0.0.1:9000;
    include      fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param SERVER_NAME $host;
  }
}
Installing MongoDB
●   Available through the standard Ubuntu repo
●   10gen repositories have fresher stable versions

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

#add to /etc/apt/sources.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

sudo apt-get update

sudo apt-get install mongodb-10gen

sudo apt-get install php5-mongo



●   Mongo is the 10gen-supported PHP driver for MongoDB
●   Missing phpMyAdmin? Try phpMoAdmin :-)
Using Mongo: a simple example




Source: http://www.php.net/manual/en/mongo.tutorial.php
Useful links
Nginx:
http://wiki.nginx.org/

Apache vs Nginx – deathmatch
http://www.discusswire.com/apache-vs-nginx-deathmatch/

PHP-FPM
http://php-fpm.org/about/#why

http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/

MongoDB
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

PhpMoAdmin
http://www.phpmoadmin.com/

Mongo
http://php.net/manual/en/book.mongo.php

More Related Content

What's hot

Low latency for high throughput
Low latency for high throughputLow latency for high throughput
Low latency for high throughput
Peter Lawrey
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Zabbix
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
Terral R Jordan
 
DNS Delegation
DNS DelegationDNS Delegation
DNS Delegation
Andrii Gakhov
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipcPeter Lawrey
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
sdsern
 
Low level java programming
Low level java programmingLow level java programming
Low level java programming
Peter Lawrey
 
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SPPrimeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Zabbix BR
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @Java
Peter Lawrey
 
PyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to ProfilingPyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to Profiling
Perrin Harkins
 
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
Ontico
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기OnGameServer
 
GC free coding in @Java presented @Geecon
GC free coding in @Java presented @GeeconGC free coding in @Java presented @Geecon
GC free coding in @Java presented @Geecon
Peter Lawrey
 
Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0
StreamNative
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
Michael Hudson-Doyle
 
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Ontico
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATS
wallyqs
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
DaeMyung Kang
 
Responding rapidly when you have 100+ GB data sets in Java
Responding rapidly when you have 100+ GB data sets in JavaResponding rapidly when you have 100+ GB data sets in Java
Responding rapidly when you have 100+ GB data sets in Java
Peter Lawrey
 
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Fastly
 

What's hot (20)

Low latency for high throughput
Low latency for high throughputLow latency for high throughput
Low latency for high throughput
 
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
Erik Skytthe - Monitoring Mesos, Docker, Containers with Zabbix | ZabConf2016
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
 
DNS Delegation
DNS DelegationDNS Delegation
DNS Delegation
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipc
 
An Introduction to Twisted
An Introduction to TwistedAn Introduction to Twisted
An Introduction to Twisted
 
Low level java programming
Low level java programmingLow level java programming
Low level java programming
 
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SPPrimeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
Primeiros Passos na API do Zabbix com Python - 2º ZABBIX MEETUP DO INTERIOR-SP
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @Java
 
PyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to ProfilingPyGotham 2014 Introduction to Profiling
PyGotham 2014 Introduction to Profiling
 
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
Высокопроизводительный инференс глубоких сетей на GPU с помощью TensorRT / Ма...
 
초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기초보자를 위한 분산 캐시 이야기
초보자를 위한 분산 캐시 이야기
 
GC free coding in @Java presented @Geecon
GC free coding in @Java presented @GeeconGC free coding in @Java presented @Geecon
GC free coding in @Java presented @Geecon
 
Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0Preview of Apache Pulsar 2.5.0
Preview of Apache Pulsar 2.5.0
 
How we use Twisted in Launchpad
How we use Twisted in LaunchpadHow we use Twisted in Launchpad
How we use Twisted in Launchpad
 
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATS
 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
 
Responding rapidly when you have 100+ GB data sets in Java
Responding rapidly when you have 100+ GB data sets in JavaResponding rapidly when you have 100+ GB data sets in Java
Responding rapidly when you have 100+ GB data sets in Java
 
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
 

Viewers also liked

mod_php vs. FastCGI 原理与比较
mod_php vs. FastCGI 原理与比较mod_php vs. FastCGI 原理与比较
mod_php vs. FastCGI 原理与比较
Ji ZHANG
 
Running php on nginx
Running php on nginxRunning php on nginx
Running php on nginx
Harald Zeitlhofer
 
Word press on conoha このべん #3
Word press on conoha このべん #3Word press on conoha このべん #3
Word press on conoha このべん #3
Wataru OKAMOTO
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
Wataru OKAMOTO
 
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OSSupercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
CloudLinux
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
mkherlakian
 
Techtalk2015 MOD_PHP vs PHP-FPM
Techtalk2015 MOD_PHP vs PHP-FPMTechtalk2015 MOD_PHP vs PHP-FPM
Techtalk2015 MOD_PHP vs PHP-FPM
Webscale
 
PHP7実環境ベンチ2016春
PHP7実環境ベンチ2016春PHP7実環境ベンチ2016春
PHP7実環境ベンチ2016春
Ryo Tomidokoro
 
PHP Files: An Introduction
PHP Files: An IntroductionPHP Files: An Introduction
PHP Files: An Introduction
Jacques Woodcock
 
第2回勉強会資料 柏木
第2回勉強会資料 柏木第2回勉強会資料 柏木
第2回勉強会資料 柏木
beyond0iwamoto
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLI
Jacques Woodcock
 
PHP-FPMとuWSGI——mod_php以外の選択肢を探る
PHP-FPMとuWSGI——mod_php以外の選択肢を探るPHP-FPMとuWSGI——mod_php以外の選択肢を探る
PHP-FPMとuWSGI——mod_php以外の選択肢を探るYoshio Hanawa
 
Ultrafast WordPress Virtual Word camp2015
Ultrafast WordPress Virtual  Word camp2015 Ultrafast WordPress Virtual  Word camp2015
Ultrafast WordPress Virtual Word camp2015
Yuta Sakamoto
 
realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係
Yoshio Hanawa
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
Yosh de Vos
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with docker
Ruoshi Ling
 
How Flipkart scales PHP
How Flipkart scales PHPHow Flipkart scales PHP
How Flipkart scales PHP
Siddhartha Reddy Kothakapu
 

Viewers also liked (18)

mod_php vs. FastCGI 原理与比较
mod_php vs. FastCGI 原理与比较mod_php vs. FastCGI 原理与比较
mod_php vs. FastCGI 原理与比较
 
Running php on nginx
Running php on nginxRunning php on nginx
Running php on nginx
 
Word press on conoha このべん #3
Word press on conoha このべん #3Word press on conoha このべん #3
Word press on conoha このべん #3
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OSSupercharging your PHP pages with mod_lsapi in CloudLinux OS
Supercharging your PHP pages with mod_lsapi in CloudLinux OS
 
High performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructureHigh performance PHP: Scaling and getting the most out of your infrastructure
High performance PHP: Scaling and getting the most out of your infrastructure
 
Techtalk2015 MOD_PHP vs PHP-FPM
Techtalk2015 MOD_PHP vs PHP-FPMTechtalk2015 MOD_PHP vs PHP-FPM
Techtalk2015 MOD_PHP vs PHP-FPM
 
PHP7実環境ベンチ2016春
PHP7実環境ベンチ2016春PHP7実環境ベンチ2016春
PHP7実環境ベンチ2016春
 
PHP Files: An Introduction
PHP Files: An IntroductionPHP Files: An Introduction
PHP Files: An Introduction
 
第2回勉強会資料 柏木
第2回勉強会資料 柏木第2回勉強会資料 柏木
第2回勉強会資料 柏木
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLI
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
PHP-FPMとuWSGI——mod_php以外の選択肢を探る
PHP-FPMとuWSGI——mod_php以外の選択肢を探るPHP-FPMとuWSGI——mod_php以外の選択肢を探る
PHP-FPMとuWSGI——mod_php以外の選択肢を探る
 
Ultrafast WordPress Virtual Word camp2015
Ultrafast WordPress Virtual  Word camp2015 Ultrafast WordPress Virtual  Word camp2015
Ultrafast WordPress Virtual Word camp2015
 
realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係realpathキャッシュと OPcacheの面倒すぎる関係
realpathキャッシュと OPcacheの面倒すぎる関係
 
PHP development with Docker
PHP development with DockerPHP development with Docker
PHP development with Docker
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with docker
 
How Flipkart scales PHP
How Flipkart scales PHPHow Flipkart scales PHP
How Flipkart scales PHP
 

Similar to From LAMP to LNNP

Dicas e truques de otimização de websites python
Dicas e truques de otimização de websites pythonDicas e truques de otimização de websites python
Dicas e truques de otimização de websites pythonFabiano Weimar
 
Nginx وب سروری برای تمام فصول
Nginx وب سروری برای تمام فصولNginx وب سروری برای تمام فصول
Nginx وب سروری برای تمام فصول
efazati
 
Node.js Performance Case Study
Node.js Performance Case StudyNode.js Performance Case Study
Node.js Performance Case Study
Fabian Frank
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
Marcus Frödin
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
Per Buer
 
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair UpdatesScylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
ScyllaDB
 
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect ToolboxWebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp
 
Yet another node vs php
Yet another node vs phpYet another node vs php
Yet another node vs php
Anirban Bhattacharya
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
Artem Orobets
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
Betclic Everest Group Tech Team
 
Nginx
NginxNginx
AWS Lambda Deep Dive
AWS Lambda Deep DiveAWS Lambda Deep Dive
AWS Lambda Deep Dive
Alfonso Cabrera
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsTanya Denisyuk
 
Acsug scalable windows azure patterns
Acsug scalable windows azure patternsAcsug scalable windows azure patterns
Acsug scalable windows azure patterns
Nikolai Blackie
 
Much Faster Networking
Much Faster NetworkingMuch Faster Networking
Much Faster Networking
C4Media
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
Shahzad Badar
 
Highly concurrent yet natural programming
Highly concurrent yet natural programmingHighly concurrent yet natural programming
Highly concurrent yet natural programming
Infinit
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
Arjan
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
Alex Thissen
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL database
Peter Lawrey
 

Similar to From LAMP to LNNP (20)

Dicas e truques de otimização de websites python
Dicas e truques de otimização de websites pythonDicas e truques de otimização de websites python
Dicas e truques de otimização de websites python
 
Nginx وب سروری برای تمام فصول
Nginx وب سروری برای تمام فصولNginx وب سروری برای تمام فصول
Nginx وب سروری برای تمام فصول
 
Node.js Performance Case Study
Node.js Performance Case StudyNode.js Performance Case Study
Node.js Performance Case Study
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
 
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair UpdatesScylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
Scylla Summit 2018: Scylla Feature Talks - Scylla Streaming and Repair Updates
 
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect ToolboxWebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
WebCamp 2016: PHP.Алексей Петров.PHP at Scale: System Architect Toolbox
 
Yet another node vs php
Yet another node vs phpYet another node vs php
Yet another node vs php
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Nginx
NginxNginx
Nginx
 
AWS Lambda Deep Dive
AWS Lambda Deep DiveAWS Lambda Deep Dive
AWS Lambda Deep Dive
 
Donatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIsDonatas Mažionis, Building low latency web APIs
Donatas Mažionis, Building low latency web APIs
 
Acsug scalable windows azure patterns
Acsug scalable windows azure patternsAcsug scalable windows azure patterns
Acsug scalable windows azure patterns
 
Much Faster Networking
Much Faster NetworkingMuch Faster Networking
Much Faster Networking
 
WebSockets in JEE 7
WebSockets in JEE 7WebSockets in JEE 7
WebSockets in JEE 7
 
Highly concurrent yet natural programming
Highly concurrent yet natural programmingHighly concurrent yet natural programming
Highly concurrent yet natural programming
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL database
 

More from Giorgio Cefaro

Alexa, AWS lambda & wikidata (ITA)
Alexa, AWS lambda & wikidata (ITA)Alexa, AWS lambda & wikidata (ITA)
Alexa, AWS lambda & wikidata (ITA)
Giorgio Cefaro
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenics
Giorgio Cefaro
 
Don't fear the rebase
Don't fear the rebaseDon't fear the rebase
Don't fear the rebase
Giorgio Cefaro
 
jsDay 2016 recap
jsDay 2016 recapjsDay 2016 recap
jsDay 2016 recap
Giorgio Cefaro
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
Giorgio Cefaro
 
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
Giorgio Cefaro
 
Nanos gigantium humeris insidentes (design patterns inside symfony 2)
Nanos gigantium humeris insidentes (design patterns inside symfony 2)Nanos gigantium humeris insidentes (design patterns inside symfony 2)
Nanos gigantium humeris insidentes (design patterns inside symfony 2)
Giorgio Cefaro
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrid
Giorgio Cefaro
 
High Performance Web Apps con PHP e Symfony 2
High Performance Web Apps con PHP  e Symfony 2High Performance Web Apps con PHP  e Symfony 2
High Performance Web Apps con PHP e Symfony 2
Giorgio Cefaro
 
An introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersAn introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersGiorgio Cefaro
 
Netbeans e Xdebug per debugging e profiling di applicazioni PHP
Netbeans e Xdebug per debugging e profiling di applicazioni PHPNetbeans e Xdebug per debugging e profiling di applicazioni PHP
Netbeans e Xdebug per debugging e profiling di applicazioni PHPGiorgio Cefaro
 

More from Giorgio Cefaro (11)

Alexa, AWS lambda & wikidata (ITA)
Alexa, AWS lambda & wikidata (ITA)Alexa, AWS lambda & wikidata (ITA)
Alexa, AWS lambda & wikidata (ITA)
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenics
 
Don't fear the rebase
Don't fear the rebaseDon't fear the rebase
Don't fear the rebase
 
jsDay 2016 recap
jsDay 2016 recapjsDay 2016 recap
jsDay 2016 recap
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
I came, I saw, I GO! - Golangit meetup @ Codemotion Rome 2014
 
Nanos gigantium humeris insidentes (design patterns inside symfony 2)
Nanos gigantium humeris insidentes (design patterns inside symfony 2)Nanos gigantium humeris insidentes (design patterns inside symfony 2)
Nanos gigantium humeris insidentes (design patterns inside symfony 2)
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrid
 
High Performance Web Apps con PHP e Symfony 2
High Performance Web Apps con PHP  e Symfony 2High Performance Web Apps con PHP  e Symfony 2
High Performance Web Apps con PHP e Symfony 2
 
An introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developersAn introduction to Symfony 2 for symfony 1 developers
An introduction to Symfony 2 for symfony 1 developers
 
Netbeans e Xdebug per debugging e profiling di applicazioni PHP
Netbeans e Xdebug per debugging e profiling di applicazioni PHPNetbeans e Xdebug per debugging e profiling di applicazioni PHP
Netbeans e Xdebug per debugging e profiling di applicazioni PHP
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
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
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
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
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
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
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
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
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
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
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 

From LAMP to LNNP

  • 1. From LAMP to LNNP A Transition from Linux Apache Mysql (mod_)PHP to Linux (what else?) Nginx Nosql PHP(-FPM) Giorgio Cefaro http://giorgiocefaro.com @giorrrgio
  • 5. Vs From Wikipedia: Nginx uses an asynchronous event-driven approach to handling requests which can provide more predictable performance under high loads, in contrast to the Apache HTTP server model that defaults to a threaded or process-oriented approach to handling requests
  • 6.
  • 7. PHP Hello world benchmarks Ab -k -n 50000 -c 10 http://10.0.0.3/test.php Concurrency Level: 10 Concurrency Level: 10 Time taken for tests: 31.796 seconds Time taken for tests: 18.646 seconds Complete requests: 50000 Complete requests: 50000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Keep-Alive requests: 0 Keep-Alive requests: 49509 Total transferred: 8450000 bytes Total transferred: 12928406 bytes HTML transferred: 550000 bytes HTML transferred: 550000 bytes Requests per second: 1572.54 Requests per second: 2681.54 [#/sec] (mean) [#/sec] (mean) Time per request: 6.359 [ms] Time per request: 3.729 [ms] (mean) (mean) Time per request: 0.636 [ms] Time per request: 0.373 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests) Transfer rate: 259.53 Transfer rate: 677.11 [Kbytes/sec] received [Kbytes/sec] received Load average: 4.38, 1.29, 0.46 Load average: 3.00, 0.89, 0.32
  • 8. PHP Hello world benchmarks Ab -k -n 50000 -c 100 http://10.0.0.3/test.php Concurrency Level: 100 Concurrency Level: 100 Time taken for tests: 28.143 seconds Time taken for tests: 18.398 seconds Complete requests: 50000 Complete requests: 50000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Keep-Alive requests: 0 Keep-Alive requests: 49573 Total transferred: 8450000 bytes Total transferred: 12931199 bytes HTML transferred: 550000 bytes HTML transferred: 550000 bytes Requests per second: 1776.66 Requests per second: 2717.69 [#/sec] (mean) [#/sec] (mean) Time per request: 56.285 [ms] Time per request: 36.796 [ms] (mean) (mean) Time per request: 0.563 [ms] Time per request: 0.368 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests) Transfer rate: 293.22 Transfer rate: 686.39 [Kbytes/sec] received [Kbytes/sec] received Load average: 13.70, 3.54, 1.20 Load average: 38.49, 10.07, 3.41
  • 9. PHP Hello world benchmarks Ab -k -n 50000 -c 1000 http://10.0.0.3/test.php Concurrency Level: 1000 Completed 5000 requests Time taken for tests: 64.339 seconds Completed 10000 requests Complete requests: 50000 Completed 15000 requests Failed requests: 474 apr_socket_recv: Connection reset by (Connect: 0, Receive: 0, Length: peer (104) 474, Exceptions: 0) Total of 17522 requests completed Write errors: 0 Non-2xx responses: 474 Total transferred: 8522996 bytes HTML transferred: 626314 bytes Requests per second: 777.13 [#/sec] (mean) Time per request: 1286.778 [ms] (mean) Time per request: 1.287 [ms] (mean, across all concurrent requests) Transfer rate: 129.37 [Kbytes/sec] received Load average: 20.50, 7.13, 2.64 Load average: 36.86, 9.02, 3.03
  • 10. Static HTML benchmarks ab -n 50000 -c 10 http://10.0.0.3/test.html Concurrency Level: 10 Concurrency Level: 10 Time taken for tests: 14.023 seconds Time taken for tests: 11.887 seconds Complete requests: 50000 Complete requests: 50000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Total transferred: 10650000 bytes Total transferred: 13950000 bytes HTML transferred: 250000 bytes HTML transferred: 250000 bytes Requests per second: 3565.47 Requests per second: 4206.43 [#/sec] (mean) [#/sec] (mean) Time per request: 2.805 [ms] Time per request: 2.377 [ms] (mean) (mean) Time per request: 0.280 [ms] Time per request: 0.238 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests) Transfer rate: 741.65 Transfer rate: 1146.09 [Kbytes/sec] received [Kbytes/sec] received
  • 11. Static HTML benchmarks ab -n 50000 -c 100 http://10.0.0.3/test.html Concurrency Level: 100 Concurrency Level: 100 Time taken for tests: 12.785 seconds Time taken for tests: 11.875 seconds Complete requests: 50000 Complete requests: 50000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Total transferred: 10650000 bytes Total transferred: 13950000 bytes HTML transferred: 250000 bytes HTML transferred: 250000 bytes Requests per second: 3910.97 Requests per second: 4210.42 [#/sec] (mean) [#/sec] (mean) Time per request: 25.569 [ms] Time per request: 23.751 [ms] (mean) (mean) Time per request: 0.256 [ms] Time per request: 0.238 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests) Transfer rate: 813.51 Transfer rate: 1147.17 [Kbytes/sec] received [Kbytes/sec] received
  • 12. Static HTML benchmarks ab -n 50000 -c 100 http://10.0.0.3/test.html Concurrency Level: 100 Concurrency Level: 100 Time taken for tests: 12.785 seconds Time taken for tests: 11.875 seconds Complete requests: 50000 Complete requests: 50000 Failed requests: 0 Failed requests: 0 Write errors: 0 Write errors: 0 Total transferred: 10650000 bytes Total transferred: 13950000 bytes HTML transferred: 250000 bytes HTML transferred: 250000 bytes Requests per second: 3910.97 Requests per second: 4210.42 [#/sec] (mean) [#/sec] (mean) Time per request: 25.569 [ms] Time per request: 23.751 [ms] (mean) (mean) Time per request: 0.256 [ms] Time per request: 0.238 [ms] (mean, across all concurrent requests) (mean, across all concurrent requests) Transfer rate: 813.51 Transfer rate: 1147.17 [Kbytes/sec] received [Kbytes/sec] received
  • 13. Static HTML benchmarks ab -n 10000 -c 1000 http://10.0.0.3/test.html Concurrency Level: 1000 Completed 1000 requests Time taken for tests: 4.915 seconds Completed 2000 requests Complete requests: 10000 Completed 3000 requests Failed requests: 0 Completed 4000 requests Write errors: 0 Completed 5000 requests Total transferred: 2130000 bytes Completed 6000 requests HTML transferred: 50000 bytes Completed 7000 requests Requests per second: 2034.45 Completed 8000 requests [#/sec] (mean) Completed 9000 requests Time per request: 491.533 [ms] apr_socket_recv: Connection reset by (mean) peer (104) Time per request: 0.492 [ms] Total of 9561 requests completed (mean, across all concurrent requests) Transfer rate: 423.18 [Kbytes/sec] received
  • 14.
  • 16. NoSQL? ● SQL, tables, relations, JOINS... ● Just documents, graphs, key-value pairs. ● Really useful when working with a huge quantity of data ● Really useful when working with data that you want not staticly structured ● Really useful for statistical or real-time analyses for growing list of elements
  • 17. My NoSql choice: MongoDB ● Data in MongoDB is stored in JSON-like documents ● horizontal scalability, auto-sharding to distribute data across many nodes (auto balancing, easy scaling) ● full consistency and transactional updates ● Data integrity is guaranteed through journalling and replication ● Supported by Doctrine2 through Mongo ● Warning: not fully ACID* compliant (missing some transactional use cases) * atomicity, consistency, isolation, durability
  • 19. Apache with modphp works but... ● Every apache forked process is fat with all its modules loaded, though before-fork code is shared among processes ● PHP is part of the apache process itself ● You have to load PHP even when you serve static files (server memory footprint) ● You have to rely on a unique PHP version for all you apps
  • 20. ...we can do better: FastCGI PHP ● Multiple versions of PHP, each executed by a different user ● Reduces the memory footprint of your web server for static files ● PHP can be executed on a separate machine
  • 21. We can do even better! PHP- FPM ● FastCGI Process Manager ● PHP daemonization pid file, log file, setsid(), setuid(), setgid(), chroot() ● Adaptive process spawning Dynamic number of processes, depending on the load ● Worker level configuration uid/gid/chroot/environment and different php.ini for each worker ● Logging stdout and stderr ● Forcing the completion of process if set_time_limit() fails
  • 22. Workers, Daemons, WTF? ● At startup a configurable number of workers ar launched, waiting for requests ● Once requests arrive if needed workers are spawned ● Each worker serves a request ● You can fine tune the behaviour to adapt it to your machine
  • 23. Wanna try? Let's get our hands dirty
  • 24. Hot to install Nginx + PHP-FPM on Ubuntu ● Version 1.1.19 of nginx is included in the standard ubuntu 12.04 repo ● Unofficial PPA for current stable and development versions sudo add-apt-repository ppa:nginx/stable sudo apt-get update sudo apt-get install nginx sudo apt-get install php5-fpm php5-cgi
  • 25. A simple nginx host configuration #/etc/nginx/sites-available/default server { listen 80; server_name localhost; index index.php; root /var/www; location ~* .php$ { #prevent cgi.fix_pathinfo=1 security hole if (!-f $request_filename) { return 404; } fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $host; } }
  • 26. Installing MongoDB ● Available through the standard Ubuntu repo ● 10gen repositories have fresher stable versions sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 #add to /etc/apt/sources.list deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen sudo apt-get update sudo apt-get install mongodb-10gen sudo apt-get install php5-mongo ● Mongo is the 10gen-supported PHP driver for MongoDB ● Missing phpMyAdmin? Try phpMoAdmin :-)
  • 27. Using Mongo: a simple example Source: http://www.php.net/manual/en/mongo.tutorial.php
  • 28. Useful links Nginx: http://wiki.nginx.org/ Apache vs Nginx – deathmatch http://www.discusswire.com/apache-vs-nginx-deathmatch/ PHP-FPM http://php-fpm.org/about/#why http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips-and-tricks/ MongoDB http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages PhpMoAdmin http://www.phpmoadmin.com/ Mongo http://php.net/manual/en/book.mongo.php