SlideShare a Scribd company logo
MORE INFORMATION AT NGINX.COM
MORE INFORMATION AT NGINX.COM
Who are we?
Floyd Smith
Technical Marketing Writer
Formerly:
•  HSBC, Apple, AltaVista
•  Author, including WordPress in
Depth
Kunal Pariani
Pre-sales engineer
Faisal Memon
Product Marketer
Patrick Nommensen
Digital Marketing Manager
MORE INFORMATION AT NGINX.COM
nginx.conf
September 7th-9th
Austin, Texas – first time out of the Bay!
www.nginx.com/nginxconf
Code: MEETUP
50% off 2-day and All-Access passes
Final day is training
MORE INFORMATION AT NGINX.COM
Good/bad/good news
Good	
  news:	
  I	
  do	
  have	
  some	
  WordPress	
  2ps,	
  and	
  can	
  point	
  you	
  to	
  
more.	
  
	
  
Bad	
  news:	
  I’ll	
  take	
  a	
  roundabout	
  route	
  to	
  get	
  there.	
  	
  
	
  
Good	
  news:	
  By	
  the	
  end	
  you’ll	
  have	
  a	
  very	
  good	
  idea	
  of	
  your	
  op2ons.	
  
	
  
Resources:	
  
1.  Our	
  master	
  NGINX/WordPress	
  2ps	
  ar2cle	
  
2.  Fresh	
  start	
  with	
  microservices	
  
3.  “NGINX	
  WordPress”	
  is	
  a	
  surprisingly	
  fruiMul	
  search	
  
MORE INFORMATION AT NGINX.COM
What will we not do?
Some questions for you all...
•  Your sites
•  Your nightmares
•  Your NGINX knowledge and use
•  Open source NGINX and NGINX
Plus
6
And now,
a little bit about NGINX...
7
MORE INFORMATION AT NGINX.COM
“… when I started NGINX, I
focused on a very specific
problem – how to handle
more customers per a
single server.”
- Igor Sysoev, NGINX creator and founder
MORE INFORMATION AT NGINX.COM
“I wanted people to use it,
so I made it open source.”
MORE INFORMATION AT NGINX.COM
•  First OSS release in 2004
•  Company founded in 2011
•  VC-backed by industry
leaders
•  500+ Customers
•  75+ Employees
Igor Sysoev, NGINX creator and founder
What is NGINX?
Internet
Webserver
Serve content from disk
Application Gateway
FastCGI, uWSGI, Passenger…
Reverse Proxy
Caching, Load Balancing…
HTTP traffic
High Concurrency for Web Scale
Source: Webfaction Blog: http://blog.webfaction.com/2008/12/a-little-holiday-present-10000-reqssec-with-nginx-2/
Low Memory Use Drives Performance
Source:	
  Webfac2on	
  Blog:	
  hOp://blog.webfac2on.com/2008/12/a-­‐liOle-­‐holiday-­‐present-­‐10000-­‐reqssec-­‐with-­‐nginx-­‐2/	
  
NGINX has become
the heart of the modern web
14
160 milliontotal sites
running on NGINX
15Source: Netcraft June 2015 Web Server Survey
51%of the Top 10,000
most visited websites
16Source: W3Techs Web Technology Survey
36%of all sites on
Amazon Web Services
17Source: W3Techs December 2013 Web Server Survey
18
Building a great application
is only half the battle,
delivering the application
is the other half.
19
MORE INFORMATION AT NGINX.COM
ü  Application Load Balancing
•  Round Robin? Least time? Least Connections?
ü  Automated Failover
ü  Session Persistence and Slow Restart
ü  Advanced Cache Controls
ü  Content switching and request routing
#1: Load Balancing and Caching
NGINX Plus features
•  SSL everywhere
•  Authentication
•  Whitelist, Blacklists, GEOIp
•  Set up smart access limits:
–  Request limiting
–  Bandwidth controls
–  Limit connections
#2: Security & Access Control
ü  Enable developers to control app delivery!
•  Manage configurations with every deployment
ü  On-the-fly load-balancing configuration
•  React in real time!
ü  No down time with live binary updates
ü  Live activity monitoring – via GUI, API, JSON
•  Enable remote logging (with syslog)
NGINX Plus feature
#3: Monitoring & Management
•  Extended HTTP status ✓
•  JSON Response ✓
•  Plug-ins for Dynatrace,
New Relic, DataDog, etc.
NGINX Plus feature
#4: Advanced Statistics
What is Nginx and Why You Should to Use it with Wordpress Hosting
MORE INFORMATION AT NGINX.COM
WordPress is Huge
About	
  a	
  quarter	
  of	
  all	
  sites	
  are	
  now	
  built	
  on	
  
open-­‐source	
  WordPress	
  soVware,	
  including	
  
sites	
  for	
  eBay,	
  Mozilla,	
  RackSpace,	
  TechCrunch,	
  
CNN,	
  MTV,	
  the	
  New	
  York	
  Times,	
  the	
  Wall	
  
Street	
  Journal.	
  
WordPress.com,	
  the	
  most	
  popular	
  site	
  for	
  
user-­‐created	
  blogs,	
  also	
  runs	
  on	
  WordPress	
  
open	
  source	
  soVware.	
  
NGINX	
  powers	
  WordPress.com.	
  	
  
MORE INFORMATION AT NGINX.COM
Easy, Hard, and Optimal Solutions
The	
  easy	
  solu)on	
  is	
  to	
  totally	
  re-­‐imagine	
  the	
  
situa2on	
  and	
  not	
  change	
  your	
  core	
  code	
  and	
  
configura2on	
  at	
  all.	
  Costs	
  some	
  $	
  but	
  no	
  
trouble.	
  	
  
The	
  hard	
  solu)on	
  is	
  to	
  change	
  your	
  webserver	
  
and	
  reconfigure	
  a	
  bunch	
  of	
  stuff,	
  without	
  
spending	
  a	
  dime.	
  	
  
The	
  op)mal	
  solu)on	
  is,	
  all	
  of	
  the	
  above.	
  	
  
MORE INFORMATION AT NGINX.COM
The LAMP Bottleneck
Two	
  main	
  causes	
  of	
  boOlenecks	
  are:	
  
•  The	
  Apache	
  web	
  server	
  –	
  Apache	
  consumes	
  
substan2al	
  resources	
  for	
  each	
  and	
  every	
  
connec2on.	
  Memory	
  can	
  be	
  exhausted	
  and	
  
performance	
  slows	
  because	
  data	
  has	
  to	
  be	
  
paged	
  back	
  and	
  forth	
  to	
  disk.	
  
•  The	
  PHP/MySQL	
  interac)on	
  –	
  Together,	
  an	
  
applica2on	
  server	
  running	
  PHP	
  and	
  a	
  
MySQL	
  database	
  server	
  can	
  serve	
  a	
  
maximum	
  number	
  of	
  requests	
  per	
  second.	
  
When	
  the	
  number	
  of	
  requests	
  exceeds	
  the	
  
maximum,	
  users	
  have	
  to	
  wait.	
  Exceeding	
  
the	
  maximum	
  can	
  cause	
  significant	
  
performance	
  problems.	
  
MORE INFORMATION AT NGINX.COM
Reverse Proxy Server Plus Caching
Three	
  tricks	
  in	
  one:	
  
•  Reverse	
  Proxy	
  Server	
  –	
  
Move	
  user	
  I/O	
  to	
  an	
  
external	
  server.	
  
•  Cache	
  Sta)c	
  Files	
  –	
  
Move	
  JPEGs,	
  CSS	
  files	
  
etc.	
  to	
  the	
  reverse	
  proxy	
  
server.	
  
•  Cache	
  Dynamic	
  Files	
  –	
  
Get	
  current	
  content	
  for	
  
non-­‐logged-­‐in	
  users	
  
once	
  per	
  second.	
  Then	
  
for	
  10/50/100	
  requests	
  
per	
  second,	
  serve	
  the	
  
(briefly)	
  cached	
  file.	
  	
  
MORE INFORMATION AT NGINX.COM
OPEN SOURCE
PLUS
FEATURES
REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING GUI VISUALIZATION
SSL EMBEDDED SCRIPT LANGUAGE EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS CONFIGURATION RESTFUL API
What’s inside NGINX Plus?
30
MORE INFORMATION AT NGINX.COM
The LEMP Solution
Two	
  steps	
  to	
  LEMP:	
  
•  Replace	
  LAMP	
  (Linux-­‐Apache-­‐MySQL-­‐PHP)	
  with	
  LEMP	
  (Linux-­‐(e)NGINX-­‐MySQL-­‐PHP)	
  	
  	
  
–	
  NGINX	
  is	
  faster	
  and	
  more	
  stable.	
  
•  Make	
  Needed	
  Updates:	
  
1.	
  Permalinks	
  instead	
  of	
  .htaccess	
  	
  2.	
  Caching	
  with	
  FastCGI	
  Cache	
  etc.	
  	
  
3.	
  Implement	
  security	
  precau2ons	
  4.	
  Configure	
  WordPress	
  Mul2site	
  w/proper	
  file	
  
structure	
  
MORE INFORMATION AT NGINX.COM
1. Permalink Support for NGINX
•  Why	
  .htaccess	
  is	
  bad	
  
•  NGINX	
  config	
  
	
  
server {
server_name example.com www.example.com;
root /var/www/example.com/htdocs;
index index.php;
 
access_log /var/log/nginx/
example.com.access.log;
error_log /var/log/nginx/
example.com.error.log;
location / {
try_files $uri $uri/ /index.php?
$args;
}
}
MORE INFORMATION AT NGINX.COM
2. Configure NGINX for FastCGI (or ...)
•  FastCGI	
  is	
  most	
  popular	
  and	
  most	
  flexible	
  
•  W3	
  Total	
  Cache,	
  WP	
  Super	
  Cache,	
  and	
  others	
  work	
  well	
  too	
  	
  
	
  
fastcgi_cache_path /var/run/nginx-cache levels=1:2
keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
 
server {
server_name example.com www.example.com;
root /var/www/example.com/htdocs;
index index.php;
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log;
set $skip_cache 0;
# POST requests and URLs with a query string should always go to PHP…
	
  
MORE INFORMATION AT NGINX.COM
3. Secure NGINX
•  Best	
  to	
  do	
  this	
  at	
  reverse	
  proxy	
  server	
  *and*	
  at	
  webserver	
  
	
  
# Restrict access to WordPress dashboard
location /wp-admin {
deny 192.192.9.9;
allow 192.192.1.0/24;
allow 10.1.1.0/16;
deny all;
# Deny access to uploads that aren’t images, videos, music, etc.
location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ {
deny all;
}
	
  
App Delivery
ControllerDatabase
App Servers
Web Servers
N
You can add us to your current stack today
App Delivery
ControllerStorage
App Servers
Web Servers
N
N
N
You can add us to your current stack today
MORE INFORMATION AT NGINX.COM
Or... Eff it, let’s just do microservices
Moving from monolith to microservices
Application
Delivery
Monolithic
Application
Clustered
Database
Deployment
Platform
Architecture 38
Application delivery for microservices
NGINX is in each microservice,
ensuring they are:
•  Connected
•  Served
•  Authenticated
•  Secured
•  Cached
•  Load Balanced
•  Scaled
39
You can also use NGINX in your API Gateway
40
NGINX Plus provides:
•  Integration
•  Security
•  Request Routing
•  Optimization
•  Scalability
MORE INFORMATION AT NGINX.COM
Flawless application delivery made easy
41
Load Balancer Monitoring &
Management
Web ServerContent Cache Streaming Media
Thank You
nginx.com | @nginx

More Related Content

PPTX
Flawless Application Delivery with NGINX Plus
PDF
Monitoring Highly Dynamic and Distributed Systems with NGINX Amplify
PPTX
The 3 Models in the NGINX Microservices Reference Architecture
PPTX
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
PPTX
Simplify Microservices with the NGINX Application Platform
PPTX
Reduce IT Spend with Software Load Balancing
PPTX
3 Ways to Automate App Deployments with NGINX
PPTX
Supercharge Application Delivery to Satisfy Users
Flawless Application Delivery with NGINX Plus
Monitoring Highly Dynamic and Distributed Systems with NGINX Amplify
The 3 Models in the NGINX Microservices Reference Architecture
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
Simplify Microservices with the NGINX Application Platform
Reduce IT Spend with Software Load Balancing
3 Ways to Automate App Deployments with NGINX
Supercharge Application Delivery to Satisfy Users

What's hot (20)

PPTX
Secure Your Apps with NGINX Plus and the ModSecurity WAF
PPTX
NGINX MRA Fabric Model Release and Ask Me Anything Part 4
PPTX
NGINX for Application Delivery & Acceleration
PPTX
Improve App Performance & Reliability with NGINX Amplify
PDF
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
PDF
Overview of SSL: choose the option that's right for you
PPTX
NGINX Microservices Reference Architecture: Ask Me Anything
PPTX
Managing Traffic Spikes This Holiday Season
PPTX
Benchmarking NGINX for Accuracy and Results
PDF
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
PPTX
What's New in NGINX Plus R10?
PDF
Virus Bulletin 2012
PPTX
NGINX, Istio, and the Move to Microservices and Service Mesh
PPTX
NGINX Plus PLATFORM For Flawless Application Delivery
PPTX
Botconf ppt
PDF
Sullivan heartbleed-defcon22 2014
PDF
Securing your web infrastructure
PDF
Altitude San Francisco 2018: HTTP Invalidation Workshop
PPTX
Latest Trends in Web Application Security
PPTX
Fastly CEO Artur Bergman at Altitude NYC
Secure Your Apps with NGINX Plus and the ModSecurity WAF
NGINX MRA Fabric Model Release and Ask Me Anything Part 4
NGINX for Application Delivery & Acceleration
Improve App Performance & Reliability with NGINX Amplify
NGINX Amplify: Monitoring NGINX with Advanced Filters and Custom Dashboards
Overview of SSL: choose the option that's right for you
NGINX Microservices Reference Architecture: Ask Me Anything
Managing Traffic Spikes This Holiday Season
Benchmarking NGINX for Accuracy and Results
DockerCon Live 2020 - Securing Your Containerized Application with NGINX
What's New in NGINX Plus R10?
Virus Bulletin 2012
NGINX, Istio, and the Move to Microservices and Service Mesh
NGINX Plus PLATFORM For Flawless Application Delivery
Botconf ppt
Sullivan heartbleed-defcon22 2014
Securing your web infrastructure
Altitude San Francisco 2018: HTTP Invalidation Workshop
Latest Trends in Web Application Security
Fastly CEO Artur Bergman at Altitude NYC
Ad

Similar to What is Nginx and Why You Should to Use it with Wordpress Hosting (20)

PPTX
Maximizing PHP Performance with NGINX
PPTX
Delivering High Performance Websites with NGINX
PPTX
Drupal 8 and NGINX
PDF
Website & Internet + Performance testing
PDF
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
PPTX
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
PDF
20 tips for website performance
PPTX
JS digest. Decemebr 2017
PDF
12-Step Program for Scaling Web Applications on PostgreSQL
PDF
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
PDF
Web performance optimization - MercadoLibre
PDF
Web performance mercadolibre - ECI 2013
PPTX
5 things you didn't know nginx could do velocity
PPTX
Northeast PHP - High Performance PHP
PPTX
WordPress performance tuning
PDF
How to be Successful with Responsive Sites (Koombea & NGINX) - English
PDF
Thinking Beyond Core Web Vitals - Web performance optimisations for the harsh...
PPTX
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
PPTX
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
PPTX
Background processing with hangfire
Maximizing PHP Performance with NGINX
Delivering High Performance Websites with NGINX
Drupal 8 and NGINX
Website & Internet + Performance testing
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Speed Up WordPress Websites - Part 1 - WordPress Cairo Meetup
20 tips for website performance
JS digest. Decemebr 2017
12-Step Program for Scaling Web Applications on PostgreSQL
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Web performance optimization - MercadoLibre
Web performance mercadolibre - ECI 2013
5 things you didn't know nginx could do velocity
Northeast PHP - High Performance PHP
WordPress performance tuning
How to be Successful with Responsive Sites (Koombea & NGINX) - English
Thinking Beyond Core Web Vitals - Web performance optimisations for the harsh...
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
Background processing with hangfire
Ad

Recently uploaded (20)

PPTX
Power Point - Lesson 3_2.pptx grad school presentation
DOCX
Unit-3 cyber security network security of internet system
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
artificial intelligence overview of it and more
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
newyork.pptxirantrafgshenepalchinachinane
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PPT
Ethics in Information System - Management Information System
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Power Point - Lesson 3_2.pptx grad school presentation
Unit-3 cyber security network security of internet system
SASE Traffic Flow - ZTNA Connector-1.pdf
artificial intelligence overview of it and more
Cloud-Scale Log Monitoring _ Datadog.pdf
WebRTC in SignalWire - troubleshooting media negotiation
newyork.pptxirantrafgshenepalchinachinane
Decoding a Decade: 10 Years of Applied CTI Discipline
Job_Card_System_Styled_lorem_ipsum_.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PptxGenJS_Demo_Chart_20250317130215833.pptx
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Mathew Digital SEO Checklist Guidlines 2025
Ethics in Information System - Management Information System
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Module 1 - Cyber Law and Ethics 101.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰

What is Nginx and Why You Should to Use it with Wordpress Hosting

  • 2. MORE INFORMATION AT NGINX.COM Who are we? Floyd Smith Technical Marketing Writer Formerly: •  HSBC, Apple, AltaVista •  Author, including WordPress in Depth Kunal Pariani Pre-sales engineer Faisal Memon Product Marketer Patrick Nommensen Digital Marketing Manager
  • 3. MORE INFORMATION AT NGINX.COM nginx.conf September 7th-9th Austin, Texas – first time out of the Bay! www.nginx.com/nginxconf Code: MEETUP 50% off 2-day and All-Access passes Final day is training
  • 4. MORE INFORMATION AT NGINX.COM Good/bad/good news Good  news:  I  do  have  some  WordPress  2ps,  and  can  point  you  to   more.     Bad  news:  I’ll  take  a  roundabout  route  to  get  there.       Good  news:  By  the  end  you’ll  have  a  very  good  idea  of  your  op2ons.     Resources:   1.  Our  master  NGINX/WordPress  2ps  ar2cle   2.  Fresh  start  with  microservices   3.  “NGINX  WordPress”  is  a  surprisingly  fruiMul  search  
  • 5. MORE INFORMATION AT NGINX.COM What will we not do?
  • 6. Some questions for you all... •  Your sites •  Your nightmares •  Your NGINX knowledge and use •  Open source NGINX and NGINX Plus 6
  • 7. And now, a little bit about NGINX... 7
  • 8. MORE INFORMATION AT NGINX.COM “… when I started NGINX, I focused on a very specific problem – how to handle more customers per a single server.” - Igor Sysoev, NGINX creator and founder
  • 9. MORE INFORMATION AT NGINX.COM “I wanted people to use it, so I made it open source.”
  • 10. MORE INFORMATION AT NGINX.COM •  First OSS release in 2004 •  Company founded in 2011 •  VC-backed by industry leaders •  500+ Customers •  75+ Employees Igor Sysoev, NGINX creator and founder
  • 11. What is NGINX? Internet Webserver Serve content from disk Application Gateway FastCGI, uWSGI, Passenger… Reverse Proxy Caching, Load Balancing… HTTP traffic
  • 12. High Concurrency for Web Scale Source: Webfaction Blog: http://blog.webfaction.com/2008/12/a-little-holiday-present-10000-reqssec-with-nginx-2/
  • 13. Low Memory Use Drives Performance Source:  Webfac2on  Blog:  hOp://blog.webfac2on.com/2008/12/a-­‐liOle-­‐holiday-­‐present-­‐10000-­‐reqssec-­‐with-­‐nginx-­‐2/  
  • 14. NGINX has become the heart of the modern web 14
  • 15. 160 milliontotal sites running on NGINX 15Source: Netcraft June 2015 Web Server Survey
  • 16. 51%of the Top 10,000 most visited websites 16Source: W3Techs Web Technology Survey
  • 17. 36%of all sites on Amazon Web Services 17Source: W3Techs December 2013 Web Server Survey
  • 18. 18
  • 19. Building a great application is only half the battle, delivering the application is the other half. 19
  • 20. MORE INFORMATION AT NGINX.COM
  • 21. ü  Application Load Balancing •  Round Robin? Least time? Least Connections? ü  Automated Failover ü  Session Persistence and Slow Restart ü  Advanced Cache Controls ü  Content switching and request routing #1: Load Balancing and Caching NGINX Plus features
  • 22. •  SSL everywhere •  Authentication •  Whitelist, Blacklists, GEOIp •  Set up smart access limits: –  Request limiting –  Bandwidth controls –  Limit connections #2: Security & Access Control
  • 23. ü  Enable developers to control app delivery! •  Manage configurations with every deployment ü  On-the-fly load-balancing configuration •  React in real time! ü  No down time with live binary updates ü  Live activity monitoring – via GUI, API, JSON •  Enable remote logging (with syslog) NGINX Plus feature #3: Monitoring & Management
  • 24. •  Extended HTTP status ✓ •  JSON Response ✓ •  Plug-ins for Dynatrace, New Relic, DataDog, etc. NGINX Plus feature #4: Advanced Statistics
  • 26. MORE INFORMATION AT NGINX.COM WordPress is Huge About  a  quarter  of  all  sites  are  now  built  on   open-­‐source  WordPress  soVware,  including   sites  for  eBay,  Mozilla,  RackSpace,  TechCrunch,   CNN,  MTV,  the  New  York  Times,  the  Wall   Street  Journal.   WordPress.com,  the  most  popular  site  for   user-­‐created  blogs,  also  runs  on  WordPress   open  source  soVware.   NGINX  powers  WordPress.com.    
  • 27. MORE INFORMATION AT NGINX.COM Easy, Hard, and Optimal Solutions The  easy  solu)on  is  to  totally  re-­‐imagine  the   situa2on  and  not  change  your  core  code  and   configura2on  at  all.  Costs  some  $  but  no   trouble.     The  hard  solu)on  is  to  change  your  webserver   and  reconfigure  a  bunch  of  stuff,  without   spending  a  dime.     The  op)mal  solu)on  is,  all  of  the  above.    
  • 28. MORE INFORMATION AT NGINX.COM The LAMP Bottleneck Two  main  causes  of  boOlenecks  are:   •  The  Apache  web  server  –  Apache  consumes   substan2al  resources  for  each  and  every   connec2on.  Memory  can  be  exhausted  and   performance  slows  because  data  has  to  be   paged  back  and  forth  to  disk.   •  The  PHP/MySQL  interac)on  –  Together,  an   applica2on  server  running  PHP  and  a   MySQL  database  server  can  serve  a   maximum  number  of  requests  per  second.   When  the  number  of  requests  exceeds  the   maximum,  users  have  to  wait.  Exceeding   the  maximum  can  cause  significant   performance  problems.  
  • 29. MORE INFORMATION AT NGINX.COM Reverse Proxy Server Plus Caching Three  tricks  in  one:   •  Reverse  Proxy  Server  –   Move  user  I/O  to  an   external  server.   •  Cache  Sta)c  Files  –   Move  JPEGs,  CSS  files   etc.  to  the  reverse  proxy   server.   •  Cache  Dynamic  Files  –   Get  current  content  for   non-­‐logged-­‐in  users   once  per  second.  Then   for  10/50/100  requests   per  second,  serve  the   (briefly)  cached  file.    
  • 30. MORE INFORMATION AT NGINX.COM OPEN SOURCE PLUS FEATURES REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING GUI VISUALIZATION SSL EMBEDDED SCRIPT LANGUAGE EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS CONFIGURATION RESTFUL API What’s inside NGINX Plus? 30
  • 31. MORE INFORMATION AT NGINX.COM The LEMP Solution Two  steps  to  LEMP:   •  Replace  LAMP  (Linux-­‐Apache-­‐MySQL-­‐PHP)  with  LEMP  (Linux-­‐(e)NGINX-­‐MySQL-­‐PHP)       –  NGINX  is  faster  and  more  stable.   •  Make  Needed  Updates:   1.  Permalinks  instead  of  .htaccess    2.  Caching  with  FastCGI  Cache  etc.     3.  Implement  security  precau2ons  4.  Configure  WordPress  Mul2site  w/proper  file   structure  
  • 32. MORE INFORMATION AT NGINX.COM 1. Permalink Support for NGINX •  Why  .htaccess  is  bad   •  NGINX  config     server { server_name example.com www.example.com; root /var/www/example.com/htdocs; index index.php;   access_log /var/log/nginx/ example.com.access.log; error_log /var/log/nginx/ example.com.error.log; location / { try_files $uri $uri/ /index.php? $args; } }
  • 33. MORE INFORMATION AT NGINX.COM 2. Configure NGINX for FastCGI (or ...) •  FastCGI  is  most  popular  and  most  flexible   •  W3  Total  Cache,  WP  Super  Cache,  and  others  work  well  too       fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m; fastcgi_cache_key "$scheme$request_method$host$request_uri";   server { server_name example.com www.example.com; root /var/www/example.com/htdocs; index index.php; access_log /var/log/nginx/example.com.access.log; error_log /var/log/nginx/example.com.error.log; set $skip_cache 0; # POST requests and URLs with a query string should always go to PHP…  
  • 34. MORE INFORMATION AT NGINX.COM 3. Secure NGINX •  Best  to  do  this  at  reverse  proxy  server  *and*  at  webserver     # Restrict access to WordPress dashboard location /wp-admin { deny 192.192.9.9; allow 192.192.1.0/24; allow 10.1.1.0/16; deny all; # Deny access to uploads that aren’t images, videos, music, etc. location ~* ^/wp-content/uploads/.*.(html|htm|shtml|php|js|swf)$ { deny all; }  
  • 35. App Delivery ControllerDatabase App Servers Web Servers N You can add us to your current stack today
  • 36. App Delivery ControllerStorage App Servers Web Servers N N N You can add us to your current stack today
  • 37. MORE INFORMATION AT NGINX.COM Or... Eff it, let’s just do microservices
  • 38. Moving from monolith to microservices Application Delivery Monolithic Application Clustered Database Deployment Platform Architecture 38
  • 39. Application delivery for microservices NGINX is in each microservice, ensuring they are: •  Connected •  Served •  Authenticated •  Secured •  Cached •  Load Balanced •  Scaled 39
  • 40. You can also use NGINX in your API Gateway 40 NGINX Plus provides: •  Integration •  Security •  Request Routing •  Optimization •  Scalability
  • 41. MORE INFORMATION AT NGINX.COM Flawless application delivery made easy 41 Load Balancer Monitoring & Management Web ServerContent Cache Streaming Media