SlideShare a Scribd company logo
Good morning Everyone...
Developer Life
Coding and Coding
In QA Release
Nginx
Production Release
Load Test
Nginx
We Do..
1. Database / Query Optimization
1. Code Optimization
1. Caching Server
Nginx
pronounced engine-x
Agenda
1. About Nginx
2. Benchmark test with concurrent request between Apache2.2 Vs Nginx ( with Vanilla configuration)
2.1 Benchmark on Big Image
2.2 Benchmark on Static Content File i,e. (. HTML)
2.3 Benchmark on PHP file (phpinfo())
3. Discuss Architecture of Nginx and Test result
4. How to configure PHP with Fast CGI on Nginx (Basic)
5. Question Answers
Install nginx
sudo apt-get update
sudo apt-get install nginx
sudo yum install epel-release
sudo yum install nginx
sudo /etc/init.d/nginx start
Default Path :
Configuration File Path
/etc/nginx/conf.d/default.conf
Document Root Path
/usr/share/nginx/html
Nginx
Bench Mark for static html file
Apache : ab -kc 1000 -n 10000 http://reflik.local/test.html
Benchmarking reflik.local (be patient)
Completed 5000 requests
Completed 6000 requests
Completed 8000 requests
Completed 9000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 9738 requests completed
ab -kc 500 -n 5000 http://reflik.local/test.html
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking reflik.local (be patient)
Completed 500 requests
Completed 1000 requests
Completed 5000 requests
Finished 5000 requests
ab -kc 1000 -n 10000 http://reflik.local/rc.jpg
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking reflik.local (be patient)
Completed 1000 requests
Completed 6000 requests
apr_socket_recv: Connection reset by peer (104)
Total of 6459 requests completed
ab -kc 500 -n 10000 http://reflik.local/rc.jpg
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking reflik.local (be patient)
apr_socket_recv: Connection reset by peer (104)
Total of 488 requests completed
ab -kc 500 -n 10000 http://reflik.local/test_web.php
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking reflik.local (be patient)
apr_socket_recv: Connection reset by peer (104)
Total of 799 requests completed
ab -kc 100 -n 5000 http://reflik.local/test_web.php
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking reflik.local (be patient)
Completed 500 requests
Completed 5000 requests
Finished 5000 requests
continue...
Server Software: Apache/2.2.15
Server Hostname: reflik.local
Server Port: 80
Document Path: /test_web.php
Document Length: 132634 bytes
Concurrency Level: 100
Time taken for tests: 50.349 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Configure PHP with Nginx
Files :
1. php.ini
2. /etc/nginx/conf.d/default.conf
3. /etc/php-fpm.d/www.conf
PHP.INI
;cgi.fix_pathinfo=1
Change it to
cgi.fix_pathinfo=0
/etc/nginx/conf.d/default.conf
listen 80;
server_name test.local
location ~ .php$ {
root /usr/share/nginx/html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
/etc/php-fpm.d/www.conf
;user = apache
Replace
user = nginx
group = apache
Replace
group = nginx
Service Start
service nginx start
service php-fpm start
Benchmark On Nginx
ab -kc 1000 -n 10000 http://test.local/test.html
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking test.local (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 7000 requests
Completed 8000 requests
Continue ….
Server Software: nginx/1.0.15
Server Hostname: test.local
Server Port: 80
Document Path: /test.html
Document Length: 220 bytes
Concurrency Level: 1000
Time taken for tests: 1.398 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
ab -kc 1000 -n 10000 http://test.local/rc.jpg
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking test.local (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Continue...
Server Software: nginx/1.0.15
Server Hostname: test.local
Server Port: 80
Document Path: /rc.jpg
Document Length: 193 bytes
Concurrency Level: 1000
Time taken for tests: 30.389 seconds
Complete requests: 10000
Failed requests: 3285
(Connect: 0, Receive: 0, Length: 3285, Exceptions: 0)
ab -kc 500 -n 10000 http://test.local/test_web.php
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking test.local (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
About Nginx
It is written to solve CK10 Problem.
It is based on Event-driven, asynchronous, non-blocking with single threaded
architecture
Apache use thread-based models for serving the request.
Basic Architecture
Nginx Vs Apache
Nginx is based on event-driven architecture. Apache is based on process-driven
architecture.
Nginx doesn’t create a new process for a new request. Apache creates a new
process for each request.
Continue...
Nginx have less components to add more features. But Apache has tons of
features and provides lot more functionality than Nginx
Thank you

More Related Content

What's hot (20)

PDF
docker build with Ansible
Bas Meijer
 
PDF
Making the most out of kubernetes audit logs
Laurent Bernaille
 
PPTX
Lessons from running potentially malicious code inside containers
Ben Hall
 
PDF
Wordpress y Docker, de desarrollo a produccion
Sysdig
 
PDF
Kubernetes DNS Horror Stories
Laurent Bernaille
 
PDF
Set up Hadoop Cluster on Amazon EC2
IMC Institute
 
PDF
Ansible new paradigms for orchestration
Paolo Tonin
 
PDF
CoreOS + Kubernetes @ All Things Open 2015
Brandon Philips
 
PDF
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Big Data Spain
 
PDF
Ansible, best practices
Bas Meijer
 
PPTX
Solving anything in VCL
Fastly
 
PPTX
Real World Lessons on the Pain Points of Node.js Applications
Ben Hall
 
PDF
PyCon AU 2015 - Using benchmarks to understand how wsgi servers work
Graham Dumpleton
 
PDF
VCL template abstraction model and automated deployments to Fastly
Fastly
 
PDF
Optimizing kubernetes networking
Laurent Bernaille
 
PPTX
Async programming: From 0 to task.IsComplete - es
Darío Kondratiuk
 
PPTX
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
PDF
Cookbook testing with KitcenCI and Serverrspec
Daniel Paulus
 
PDF
kubernetes practice
wonyong hwang
 
PDF
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 
docker build with Ansible
Bas Meijer
 
Making the most out of kubernetes audit logs
Laurent Bernaille
 
Lessons from running potentially malicious code inside containers
Ben Hall
 
Wordpress y Docker, de desarrollo a produccion
Sysdig
 
Kubernetes DNS Horror Stories
Laurent Bernaille
 
Set up Hadoop Cluster on Amazon EC2
IMC Institute
 
Ansible new paradigms for orchestration
Paolo Tonin
 
CoreOS + Kubernetes @ All Things Open 2015
Brandon Philips
 
Elasticsearch (R)Evolution — You Know, for Search… by Philipp Krenn at Big Da...
Big Data Spain
 
Ansible, best practices
Bas Meijer
 
Solving anything in VCL
Fastly
 
Real World Lessons on the Pain Points of Node.js Applications
Ben Hall
 
PyCon AU 2015 - Using benchmarks to understand how wsgi servers work
Graham Dumpleton
 
VCL template abstraction model and automated deployments to Fastly
Fastly
 
Optimizing kubernetes networking
Laurent Bernaille
 
Async programming: From 0 to task.IsComplete - es
Darío Kondratiuk
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
Cookbook testing with KitcenCI and Serverrspec
Daniel Paulus
 
kubernetes practice
wonyong hwang
 
Red Hat Certified Engineer (RHCE) EX294 Exam Questions
Study Material
 

Viewers also liked (11)

DOCX
6-PROCESSING A PURCHASE ORDER MATCHED INVOICE IN ORACLE R12 PAYABLES MODULE
ORAHUT
 
DOCX
10-HOW TO PROCESS AN INTEREST INVOICE IN ORACLE R12 PAYABLES
ORAHUT
 
PDF
csr15.pdf
Joe Jones
 
PPTX
Diy How to Sew Doll Panties Tutorial
Cassandra George-Sturges
 
PPTX
Magazine Textual Analysis [Part 1]
GeorginaGilbey
 
PPTX
Presentation1.pptx, diagnostic pitfalls mimicking meniscal tear and post oper...
Abdellah Nazeer
 
PPTX
Radiological evaluation of Arthritis
shopnilp
 
PPTX
Magazine mind map
PatrickColl99
 
PPTX
Presentation1.pptx, radiological imaging of obstructive jaundice.
Abdellah Nazeer
 
PPTX
Timeline
PatrickColl99
 
DOCX
How to apply surcharges to the sales orders surcharges to the sales orders
Subramanyam Yadav
 
6-PROCESSING A PURCHASE ORDER MATCHED INVOICE IN ORACLE R12 PAYABLES MODULE
ORAHUT
 
10-HOW TO PROCESS AN INTEREST INVOICE IN ORACLE R12 PAYABLES
ORAHUT
 
csr15.pdf
Joe Jones
 
Diy How to Sew Doll Panties Tutorial
Cassandra George-Sturges
 
Magazine Textual Analysis [Part 1]
GeorginaGilbey
 
Presentation1.pptx, diagnostic pitfalls mimicking meniscal tear and post oper...
Abdellah Nazeer
 
Radiological evaluation of Arthritis
shopnilp
 
Magazine mind map
PatrickColl99
 
Presentation1.pptx, radiological imaging of obstructive jaundice.
Abdellah Nazeer
 
Timeline
PatrickColl99
 
How to apply surcharges to the sales orders surcharges to the sales orders
Subramanyam Yadav
 
Ad

Similar to Nginx (20)

PDF
Alternative Infrastucture
Marc Seeger
 
PDF
Nginx وب سروری برای تمام فصول
efazati
 
PPTX
Full Stack Load Testing
Terral R Jordan
 
PDF
Fisl - Deployment
Fabio Akita
 
PDF
Deployment de Rails
elliando dias
 
PDF
Testing http calls with Webmock and VCR
Kerry Buckley
 
ODP
Otimizando seu projeto Rails
Tiago Albineli Motta
 
KEY
Site Performance - From Pinto to Ferrari
Joseph Scott
 
PDF
Play Framework: async I/O with Java and Scala
Yevgeniy Brikman
 
PDF
Ruby HTTP clients comparison
Hiroshi Nakamura
 
PDF
NGINX Can Do That? Test Drive Your Config File!
Jeff Anderson
 
PPTX
How to ensure Presto scalability 
in multi use case
Kai Sasaki
 
KEY
Resin Outperforms NginX
billdigman
 
DOCX
Network performance test plan_v0.3
David Pasek
 
PDF
VUG5: Varnish at Opera Software
Cosimo Streppone
 
PPT
Apache web server installation/configuration, Virtual Hosting
webhostingguy
 
ODP
Clug 2011 March web server optimisation
grooverdan
 
PDF
My Opera meets Varnish, Dec 2009
Cosimo Streppone
 
PPTX
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Redis Labs
 
ODP
Improving PHP Application Performance with APC
vortexau
 
Alternative Infrastucture
Marc Seeger
 
Nginx وب سروری برای تمام فصول
efazati
 
Full Stack Load Testing
Terral R Jordan
 
Fisl - Deployment
Fabio Akita
 
Deployment de Rails
elliando dias
 
Testing http calls with Webmock and VCR
Kerry Buckley
 
Otimizando seu projeto Rails
Tiago Albineli Motta
 
Site Performance - From Pinto to Ferrari
Joseph Scott
 
Play Framework: async I/O with Java and Scala
Yevgeniy Brikman
 
Ruby HTTP clients comparison
Hiroshi Nakamura
 
NGINX Can Do That? Test Drive Your Config File!
Jeff Anderson
 
How to ensure Presto scalability 
in multi use case
Kai Sasaki
 
Resin Outperforms NginX
billdigman
 
Network performance test plan_v0.3
David Pasek
 
VUG5: Varnish at Opera Software
Cosimo Streppone
 
Apache web server installation/configuration, Virtual Hosting
webhostingguy
 
Clug 2011 March web server optimisation
grooverdan
 
My Opera meets Varnish, Dec 2009
Cosimo Streppone
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Redis Labs
 
Improving PHP Application Performance with APC
vortexau
 
Ad

Recently uploaded (20)

PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
SalesForce Managed Services Benefits (1).pdf
TechForce Services
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PPTX
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
PCU Keynote at IEEE World Congress on Services 250710.pptx
Ramesh Jain
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
visibel.ai Company Profile – Real-Time AI Solution for CCTV
visibelaiproject
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Alpha Altcoin Setup : TIA - 19th July 2025
CIFDAQ
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
SalesForce Managed Services Benefits (1).pdf
TechForce Services
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
python advanced data structure dictionary with examples python advanced data ...
sprasanna11
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PCU Keynote at IEEE World Congress on Services 250710.pptx
Ramesh Jain
 

Nginx

  • 9. We Do.. 1. Database / Query Optimization 1. Code Optimization 1. Caching Server
  • 12. Agenda 1. About Nginx 2. Benchmark test with concurrent request between Apache2.2 Vs Nginx ( with Vanilla configuration) 2.1 Benchmark on Big Image 2.2 Benchmark on Static Content File i,e. (. HTML) 2.3 Benchmark on PHP file (phpinfo()) 3. Discuss Architecture of Nginx and Test result 4. How to configure PHP with Fast CGI on Nginx (Basic) 5. Question Answers
  • 13. Install nginx sudo apt-get update sudo apt-get install nginx sudo yum install epel-release sudo yum install nginx sudo /etc/init.d/nginx start
  • 14. Default Path : Configuration File Path /etc/nginx/conf.d/default.conf Document Root Path /usr/share/nginx/html
  • 16. Bench Mark for static html file Apache : ab -kc 1000 -n 10000 http://reflik.local/test.html Benchmarking reflik.local (be patient) Completed 5000 requests Completed 6000 requests Completed 8000 requests Completed 9000 requests apr_socket_recv: Connection reset by peer (104) Total of 9738 requests completed
  • 17. ab -kc 500 -n 5000 http://reflik.local/test.html This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking reflik.local (be patient) Completed 500 requests Completed 1000 requests Completed 5000 requests Finished 5000 requests
  • 18. ab -kc 1000 -n 10000 http://reflik.local/rc.jpg This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking reflik.local (be patient) Completed 1000 requests Completed 6000 requests apr_socket_recv: Connection reset by peer (104) Total of 6459 requests completed
  • 19. ab -kc 500 -n 10000 http://reflik.local/rc.jpg This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking reflik.local (be patient) apr_socket_recv: Connection reset by peer (104) Total of 488 requests completed
  • 20. ab -kc 500 -n 10000 http://reflik.local/test_web.php This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking reflik.local (be patient) apr_socket_recv: Connection reset by peer (104) Total of 799 requests completed
  • 21. ab -kc 100 -n 5000 http://reflik.local/test_web.php This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking reflik.local (be patient) Completed 500 requests Completed 5000 requests Finished 5000 requests
  • 22. continue... Server Software: Apache/2.2.15 Server Hostname: reflik.local Server Port: 80 Document Path: /test_web.php Document Length: 132634 bytes Concurrency Level: 100 Time taken for tests: 50.349 seconds Complete requests: 5000 Failed requests: 0 Write errors: 0
  • 23. Configure PHP with Nginx Files : 1. php.ini 2. /etc/nginx/conf.d/default.conf 3. /etc/php-fpm.d/www.conf
  • 25. /etc/nginx/conf.d/default.conf listen 80; server_name test.local location ~ .php$ { root /usr/share/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
  • 26. /etc/php-fpm.d/www.conf ;user = apache Replace user = nginx group = apache Replace group = nginx
  • 27. Service Start service nginx start service php-fpm start
  • 28. Benchmark On Nginx ab -kc 1000 -n 10000 http://test.local/test.html This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking test.local (be patient) Completed 1000 requests Completed 2000 requests Completed 7000 requests Completed 8000 requests
  • 29. Continue …. Server Software: nginx/1.0.15 Server Hostname: test.local Server Port: 80 Document Path: /test.html Document Length: 220 bytes Concurrency Level: 1000 Time taken for tests: 1.398 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0
  • 30. ab -kc 1000 -n 10000 http://test.local/rc.jpg This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking test.local (be patient) Completed 1000 requests Completed 2000 requests Completed 9000 requests Completed 10000 requests Finished 10000 requests
  • 31. Continue... Server Software: nginx/1.0.15 Server Hostname: test.local Server Port: 80 Document Path: /rc.jpg Document Length: 193 bytes Concurrency Level: 1000 Time taken for tests: 30.389 seconds Complete requests: 10000 Failed requests: 3285 (Connect: 0, Receive: 0, Length: 3285, Exceptions: 0)
  • 32. ab -kc 500 -n 10000 http://test.local/test_web.php This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking test.local (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests
  • 33. About Nginx It is written to solve CK10 Problem. It is based on Event-driven, asynchronous, non-blocking with single threaded architecture Apache use thread-based models for serving the request.
  • 35. Nginx Vs Apache Nginx is based on event-driven architecture. Apache is based on process-driven architecture. Nginx doesn’t create a new process for a new request. Apache creates a new process for each request.
  • 36. Continue... Nginx have less components to add more features. But Apache has tons of features and provides lot more functionality than Nginx