SlideShare a Scribd company logo
AD113: Speed Up Your Applications
w/ Nginx and PageSpeed
Eric McCormick
For Starters...
Thanks for coming!
Agenda
• Who’s Talking?
• Who is this for?
• What are you selling?
• Where can I use this thingamajig?
• When can I adopt it?
• Why does this benefit me?
• How should I get on this bus to crazy town?
• Demos
Who’s Talking?
Eric McCormick
Twitter: @edm00se
Blog: edm00se.io
XPages developer since ‘11
Java developer on and off since ‘02
Experimented with WebSphere and DB2
in college
Who’s Talking?... pt.2
What Is My Goal?
1. A harmonious development environment for
myself and any development staff at my
company
2. A unified theory practice of development, for
consistent cross-platform and cross-app
development behavior
3. Making all application logic and data
consistently accessible across separate, but
organic, systems
4. Making contracted development work more
easily performed
5. Automating everything I can
For my users: applications that “work well” (respond
quickly, easy to use, don’t hang around for lunch).
I Want It All
Who’s This For?
Developers!
Who’s This For?... pt.2
Specifically, web developers.
… specifically web developers that care about / have access to / can bribe an admin
for access to the full application stack
… aka web application developers
.... web app devs that want blazing fast application speed for their users, peace and
harmony, and for dogs and cats to live together.
Who’s This For?... pt.3
What you should know already:
• fundamentals of web application and XPages “stack” development
• differences of between the runtime generated markup of HTML (created by a our JEE
environment) and static HTML assets (and CSS, JS, images)
What you should get out of this:
• an understanding of how a couple excellent freely available tools can make your applications
more performant for your users
• hand off TLS/SSL cert. handling from your app server (Domino)
• provide finer grain (and automated) control over static web resources and their:
caching (what, how long, no-cache paths)
rewrites (concatenation)
compression
What you won’t get out of this:
• how to grow a beard
• many other things that go without saying
What Are You Selling?
The same as usual...
Better Web Applications!
What Are You Selling?... pt.2
What is it all about?
• Segregated application design/development is good for my users, my company, and myself (and the
other developers that we interact with)
• I blogged about development with HttpServlets in XPages (NSF-local ones, without OSGi plugins)
• I even did a Notes in 9 video on the subject (a second one bridging the gap between back-end and
front-end development should be out soon)
What does it all mean?
• I have more (than “average” XPages application) static web assets
not just CSS and JS files, but even HTML files (who knew!)
• Just as we set an HTTP API (e.g.- RESTful API endpoint) to Cache-Control: No Cache, etc., we can
cache our static assets in the user’s browser for faster loading times
for more complex setups you can even host the static assets on a dedicated server separate from a
Domino/XPages server, for faster loading times yet (and map in an Domino/XPages API assets
as an api route, e.g.- /xsp, /api, etc.)
this is not covered here (watch my blog)
What Are You Selling?... pt.3
How can I achieve all this developer + user bliss?
3 Pieces:
1. Segregated Application Design (aka- have static assets to cache)
2. Reverse Proxy (to forward our API requests without cache, respond with cached static assets)
3. Tweak, fiddle, and “enhance”
Google PageSpeed!
Wait, What?
Google PageSpeed Tools:
https://developers.google.com/speed/pagespeed/
“The PageSpeed tools analyze and optimize your site following web best practices.”
Flavors:
• Nginx or Apache webserver modules (or IIS or Apache Traffic Server ports)
relies on the PageSpeed Optimisation Library (PSOL)
• PageSpeed Insights (online, freely available, assesses both mobile and desktop versions w/ score)
demo volunteer?
• PageSpeed Chrome Extension (great for non-public use cases, lots of the same info as Insights)
demo local
• PageSpeed Service (commercially provided by Google, all PageSpeed modules, filters, infrastructure)
PageSpeed Service deactivated 03-August-2015
DEMO: PageSpeed Insights
(online, freely available, assesses both mobile and desktop
versions w/ score)
demo volunteer?
PageSpeed Insights
DEMO: PageSpeed Chrome Extension
(great for non-public use cases, lots of the same info as
Insights; also PSI tool, installable via npm)
PageSpeed Chrome Extension
Where Can I Use This Thingamajig?
In front of your application server
(it’s a reverse proxy, that’s where they live)
preferably on the same “box” (it doesn’t have to be, but
strongly advised).
is pronounced engine X.
When Can I Adopt It?
As soon as you (or a sufficiently bribed admin) can run the
install and do the necessary config (which I outline and demo
in the “how”).
Why Does This Benefit Me?
In your well structured app (you amazing developer), you now have static assets which are
fully cacheable; or not, it’s all configurable, like a choose your own adventure app server.
Your user’s application performance will only increase due to the faster responses.
You can now manage, off of your application server (Domino):
• cache control
• Gzip compression
• HTTPS/SSL/TLS certificates
• authentication (see Jesse Gallagher’s blog posts on “arbitrary authentication”, etc. with
Nginx)
Side benefit: if you’re addicted to fast apps, you’ve now opened the door to forward the
API calls mapped to the Domino/app server and host the purely static assets off of Nginx (or
Apache) for even faster applications!
One Ticket to Crazy Town Please
How do we do this? You guessed it, with Nginx + PageSpeed module!
PageSpeed module is available for:
• Apache -binary or
source builds for Debian/Ubuntu and CentOS
• Nginx, *nix only, no Windows :’-( -source builds only for Debian/Ubuntu
and CentOS
• IISpeed (port), https://www.iispeed.com/
With Nginx, you must build Nginx from source specifically configured with PageSpeed support (aka- we’re
hooking in deep).
Crazy Train… pt.2
Follow the Google PageSpeed install and build from source instructions for Nginx
on *nix (I’m using an Ubuntu 64-bit 14.04.2 LTS distro).
What do the instructions say? The short, short version is:
• install a couple dependencies
• download the PageSpeed (and PSOL) sources
• download the Nginx source
• build PSOL, then the PageSpeed module
• configure Nginx w/ PageSpeed and build
My install put things into /usr/local/nginx/.
Crazy Train… pt.3
Once that’s all done… it’s alive!
Config Anatomy
Simple (simple) HTTP server config
/usr/local/nginx/conf/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Demo pt.1
Demo 1:
a Domi-faux server behind Nginx w/
reverse proxy
psst Eric, you want the nginx.conf_simpleProxy file you saved earlier
Demo pt.2
Demo 2:
a reverse proxied server w/ PageSpeed
doing all the PageSpeed things
psst Eric, you want the nginx.conf_PageSpeed-ified file you saved earlier
Demo pt.3
Demo 3:
a server w/ Nginx handling the
HTTPS/SSL cert
psst Eric, you want the nginx.conf_withSSL file you saved earlier
Note on HTTPS Certificates
Demo 3 has a self-signed TLS certificate, generated via openssl.
Want to go that route, try this tutorial from Digital Ocean, or this one for Apache.
Alternatives:
• paid for certificate (e.g.- from GoDaddy, etc.)
• no HTTPS
• letsencrypt.org
Let’s Encrypt:
• sponsored by EFF, Mozilla, and others
• free, automated, open source
• coming soon
How Soon?
• First certificate: Week of September 7, 2015
• General availability: Week of November 16, 2015
Note on HTTPS Certificates, pt.2
Using Let’s Encrypt.org:
• can automatically configure Apache 2.x
• support for Nginx 0.8.48+ mostly working (for auto config)
• can always just generate files into local directory (regardless of auto config)
• works through Let’s Encrypt’s own root and intermediate CAs
• configurable RSA key length
• can generate quickly
from a *nix (Ubuntu, Debian, Fedora, Centos 7, Mac OS X) environment
using Docker
instructions on starting use
• you can revoke a cert (one you’ve created for that server)
Once created, either drop it in place of your self-signed or (for the fearless, until general release) let it auto
configure for you.
Not a magic solution, still essentially an intermediate “self-signed” certificate, but better than having your
users click through the scary “untrusted” screens.
Some FAQs
• Why is PageSpeed not rewriting (combining) my CSS, JS, etc. files?
link because it’s not supposed to… if filters like collapse_whitespace are working, then...
“Your resources (images, css, javascript) aren't cacheable. If PageSpeed sees cache-control headers such as
nocache or private it will not rewrite the resources.”
We tell it to forget the Cache-Control and Expires headers with proxy_hide_headers.
• Why is Nginx failing to start as soon as I enable mod_pagespeed?
you most likely have forgotten to build either PageSpeed or PSOL from source, failed to
configure Nginx correctly, or malformed your conf syntax (use semi-colons at line ends!)
• What if I want the same config on a dev box, but want to see changes?
do as this SO answer suggests and use a .htaccess file with ModPageSpeed off
• But what’s it all cost?
not a thing, it’s all free (except for the infrastructure to run an Nginx instance; which isn’t much)
• Do I really need PageSpeed for this?
No! You can achieve most, if not all, that the ngx_pagespeed modules does without PageSpeed.
It just makes it easier.
Q&A
DEMO:
(time permitting)
A taste of a freely available, developer friendly way of doing a lot of this, without a DIY server.
Q&A
Questions?
Write better, faster, stronger apps! We have the ability.

More Related Content

What's hot

jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
Bradley Holt
 
Hyperlight Websites - Chris Zacharias
Hyperlight Websites - Chris ZachariasHyperlight Websites - Chris Zacharias
Hyperlight Websites - Chris Zacharias
Christopher Zacharias
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web Applications
Stoyan Stefanov
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
Edureka!
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
Chris Love
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
David Kaneda
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and Future
Richard Worth
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010
Nicholas Zakas
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
Nicholas Zakas
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applications
qooxdoo
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
Alexandru Badiu
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
Nicholas Zakas
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
dmethvin
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
Chris Love
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas
 
High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)
Nicholas Zakas
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
FITC
 
Performance on the Yahoo! Homepage
Performance on the Yahoo! HomepagePerformance on the Yahoo! Homepage
Performance on the Yahoo! Homepage
Nicholas Zakas
 
14 Things You Must Do Before Launching a Website
14 Things You Must Do Before Launching a Website14 Things You Must Do Before Launching a Website
14 Things You Must Do Before Launching a Website
Zero Point Development
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Ulf Wendel
 

What's hot (20)

jQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchAppsjQuery Conference Boston 2011 CouchApps
jQuery Conference Boston 2011 CouchApps
 
Hyperlight Websites - Chris Zacharias
Hyperlight Websites - Chris ZachariasHyperlight Websites - Chris Zacharias
Hyperlight Websites - Chris Zacharias
 
Don't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web ApplicationsDon't make me wait! or Building High-Performance Web Applications
Don't make me wait! or Building High-Performance Web Applications
 
Node JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web AppNode JS Express: Steps to Create Restful Web App
Node JS Express: Steps to Create Restful Web App
 
Disrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applicationsDisrupting the application eco system with progressive web applications
Disrupting the application eco system with progressive web applications
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
 
jQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and FuturejQuery 1.9 and 2.0 - Present and Future
jQuery 1.9 and 2.0 - Present and Future
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010High Performance JavaScript - jQuery Conference SF Bay Area 2010
High Performance JavaScript - jQuery Conference SF Bay Area 2010
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
Selenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web ApplicationsSelenium RC: Automated Testing of Modern Web Applications
Selenium RC: Automated Testing of Modern Web Applications
 
Drupal, Android and iPhone
Drupal, Android and iPhoneDrupal, Android and iPhone
Drupal, Android and iPhone
 
High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010High Performance JavaScript - WebDirections USA 2010
High Performance JavaScript - WebDirections USA 2010
 
State of jQuery June 2013 - Portland
State of jQuery June 2013 - PortlandState of jQuery June 2013 - Portland
State of jQuery June 2013 - Portland
 
JavaScript front end performance optimizations
JavaScript front end performance optimizationsJavaScript front end performance optimizations
JavaScript front end performance optimizations
 
Browser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
 
High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)
 
Building Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOSBuilding Progressive Web Apps for Android and iOS
Building Progressive Web Apps for Android and iOS
 
Performance on the Yahoo! Homepage
Performance on the Yahoo! HomepagePerformance on the Yahoo! Homepage
Performance on the Yahoo! Homepage
 
14 Things You Must Do Before Launching a Website
14 Things You Must Do Before Launching a Website14 Things You Must Do Before Launching a Website
14 Things You Must Do Before Launching a Website
 
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQLHTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
 

Viewers also liked

PageSpeed Optimization
PageSpeed OptimizationPageSpeed Optimization
PageSpeed Optimization
Shweta Patel
 
What is SEO? Grand Rapids HUG
What is SEO? Grand Rapids HUGWhat is SEO? Grand Rapids HUG
What is SEO? Grand Rapids HUG
Kevin Dean
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentation
Justin Dorfman
 
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
Sagittarius
 
Jimenez uscanga celica. evidencias ética. ige 2°a
Jimenez uscanga celica. evidencias ética. ige 2°aJimenez uscanga celica. evidencias ética. ige 2°a
Jimenez uscanga celica. evidencias ética. ige 2°a
Taller de Etica I.G.E 2-A
 
Presentation2 manipulation
Presentation2 manipulationPresentation2 manipulation
Presentation2 manipulation
brogan95
 
Tema. Valores éticos fundamentales
Tema. Valores éticos fundamentalesTema. Valores éticos fundamentales
Tema. Valores éticos fundamentales
Taller de Ética Ing. Gestión empresarial
 
How does your media product represent particular social
How does your media product represent particular socialHow does your media product represent particular social
How does your media product represent particular social
afaman1
 
Vo ip tu empresa de telefonia
Vo ip tu empresa de telefoniaVo ip tu empresa de telefonia
Vo ip tu empresa de telefonia
Kattii Lopez
 
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
Instituto Tecnológico de Tuxtepec
 
Miniclase karinis
Miniclase karinisMiniclase karinis
Miniclase karinis
Leonarda Cruz
 
Novedades Microsoft Azure
Novedades Microsoft AzureNovedades Microsoft Azure
Novedades Microsoft Azure
Ivan Martinez
 
La importancia de google docs
La importancia de google docsLa importancia de google docs
La importancia de google docs
Marcela Herrera Diaz
 
20140705 - V2020 Annual Conf - Community Outreach_Manish
20140705 - V2020 Annual Conf - Community Outreach_Manish20140705 - V2020 Annual Conf - Community Outreach_Manish
20140705 - V2020 Annual Conf - Community Outreach_Manish
Manish Kumar
 
Cómo posicionar mi web. SEO
Cómo posicionar mi web. SEOCómo posicionar mi web. SEO
Cómo posicionar mi web. SEO
CaceresInnovacion
 
Crea a tu página web y ecommerce
Crea a tu página web y ecommerceCrea a tu página web y ecommerce
Crea a tu página web y ecommerce
CaceresInnovacion
 
Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
Ilya Grigorik
 
Mapa mental
Mapa mentalMapa mental

Viewers also liked (19)

PageSpeed Optimization
PageSpeed OptimizationPageSpeed Optimization
PageSpeed Optimization
 
What is SEO? Grand Rapids HUG
What is SEO? Grand Rapids HUGWhat is SEO? Grand Rapids HUG
What is SEO? Grand Rapids HUG
 
A web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentationA web perf dashboard up & running in 90 minutes presentation
A web perf dashboard up & running in 90 minutes presentation
 
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
Who Says Data is Boring? Digital in Kent Speed Session 12th November 2015
 
Jimenez uscanga celica. evidencias ética. ige 2°a
Jimenez uscanga celica. evidencias ética. ige 2°aJimenez uscanga celica. evidencias ética. ige 2°a
Jimenez uscanga celica. evidencias ética. ige 2°a
 
Presentation2 manipulation
Presentation2 manipulationPresentation2 manipulation
Presentation2 manipulation
 
Tema. Valores éticos fundamentales
Tema. Valores éticos fundamentalesTema. Valores éticos fundamentales
Tema. Valores éticos fundamentales
 
Seminario 3
Seminario 3Seminario 3
Seminario 3
 
How does your media product represent particular social
How does your media product represent particular socialHow does your media product represent particular social
How does your media product represent particular social
 
Vo ip tu empresa de telefonia
Vo ip tu empresa de telefoniaVo ip tu empresa de telefonia
Vo ip tu empresa de telefonia
 
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
1.1.3 valores eticos fundamentales, verdad, responsabilidad, justicia y libertad
 
Miniclase karinis
Miniclase karinisMiniclase karinis
Miniclase karinis
 
Novedades Microsoft Azure
Novedades Microsoft AzureNovedades Microsoft Azure
Novedades Microsoft Azure
 
La importancia de google docs
La importancia de google docsLa importancia de google docs
La importancia de google docs
 
20140705 - V2020 Annual Conf - Community Outreach_Manish
20140705 - V2020 Annual Conf - Community Outreach_Manish20140705 - V2020 Annual Conf - Community Outreach_Manish
20140705 - V2020 Annual Conf - Community Outreach_Manish
 
Cómo posicionar mi web. SEO
Cómo posicionar mi web. SEOCómo posicionar mi web. SEO
Cómo posicionar mi web. SEO
 
Crea a tu página web y ecommerce
Crea a tu página web y ecommerceCrea a tu página web y ecommerce
Crea a tu página web y ecommerce
 
Pagespeed what, why, and how it works
Pagespeed   what, why, and how it worksPagespeed   what, why, and how it works
Pagespeed what, why, and how it works
 
Mapa mental
Mapa mentalMapa mental
Mapa mental
 

Similar to AD113 Speed Up Your Applications w/ Nginx and PageSpeed

JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
ElifTech
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
Twinbit
 
Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web development
Stevie T
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
Michael Choi
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
SiteGround.com
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
Scaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkScaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic Beanstalk
Lushen Wu
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
Brian Benz
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
Tyto Software
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
Mbakaya Kwatukha
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
Ulrich Krause
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
Lars Vogel
 
In Act Developers Platform
In Act Developers PlatformIn Act Developers Platform
In Act Developers Platform
Eris Ristemena
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
Vladimir Ilic
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 

Similar to AD113 Speed Up Your Applications w/ Nginx and PageSpeed (20)

JS digest. Decemebr 2017
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
 
Drupal performance and scalability
Drupal performance and scalabilityDrupal performance and scalability
Drupal performance and scalability
 
Intro to advanced web development
Intro to advanced web developmentIntro to advanced web development
Intro to advanced web development
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
Scaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic BeanstalkScaling Django Apps using AWS Elastic Beanstalk
Scaling Django Apps using AWS Elastic Beanstalk
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Sahi Principles and Architecture
Sahi Principles and ArchitectureSahi Principles and Architecture
Sahi Principles and Architecture
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
In Act Developers Platform
In Act Developers PlatformIn Act Developers Platform
In Act Developers Platform
 
Improving Drupal Performances
Improving Drupal PerformancesImproving Drupal Performances
Improving Drupal Performances
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 

Recently uploaded

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
Axel Rennoch
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
Priyanka Aash
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
Ivanti
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
Priyanka Aash
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
Jimmy Lai
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
shyamraj55
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Kunal Gupta
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
BrainSell Technologies
 

Recently uploaded (20)

(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 
Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
(CISOPlatform Summit & SACON 2024) Orientation by CISO Platform_ Using CISO P...
 
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python CodebaseEuroPython 2024 - Streamlining Testing in a Large Python Codebase
EuroPython 2024 - Streamlining Testing in a Large Python Codebase
 
Integrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecaseIntegrating Kafka with MuleSoft 4 and usecase
Integrating Kafka with MuleSoft 4 and usecase
 
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptxDublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
Dublin_mulesoft_meetup_Mulesoft_Salesforce_Integration (1).pptx
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Acumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptxAcumatica vs. Sage Intacct _Construction_July (1).pptx
Acumatica vs. Sage Intacct _Construction_July (1).pptx
 

AD113 Speed Up Your Applications w/ Nginx and PageSpeed

  • 1. AD113: Speed Up Your Applications w/ Nginx and PageSpeed Eric McCormick
  • 3. Agenda • Who’s Talking? • Who is this for? • What are you selling? • Where can I use this thingamajig? • When can I adopt it? • Why does this benefit me? • How should I get on this bus to crazy town? • Demos
  • 4. Who’s Talking? Eric McCormick Twitter: @edm00se Blog: edm00se.io XPages developer since ‘11 Java developer on and off since ‘02 Experimented with WebSphere and DB2 in college
  • 5. Who’s Talking?... pt.2 What Is My Goal? 1. A harmonious development environment for myself and any development staff at my company 2. A unified theory practice of development, for consistent cross-platform and cross-app development behavior 3. Making all application logic and data consistently accessible across separate, but organic, systems 4. Making contracted development work more easily performed 5. Automating everything I can For my users: applications that “work well” (respond quickly, easy to use, don’t hang around for lunch). I Want It All
  • 7. Who’s This For?... pt.2 Specifically, web developers. … specifically web developers that care about / have access to / can bribe an admin for access to the full application stack … aka web application developers .... web app devs that want blazing fast application speed for their users, peace and harmony, and for dogs and cats to live together.
  • 8. Who’s This For?... pt.3 What you should know already: • fundamentals of web application and XPages “stack” development • differences of between the runtime generated markup of HTML (created by a our JEE environment) and static HTML assets (and CSS, JS, images) What you should get out of this: • an understanding of how a couple excellent freely available tools can make your applications more performant for your users • hand off TLS/SSL cert. handling from your app server (Domino) • provide finer grain (and automated) control over static web resources and their: caching (what, how long, no-cache paths) rewrites (concatenation) compression What you won’t get out of this: • how to grow a beard • many other things that go without saying
  • 9. What Are You Selling? The same as usual... Better Web Applications!
  • 10. What Are You Selling?... pt.2 What is it all about? • Segregated application design/development is good for my users, my company, and myself (and the other developers that we interact with) • I blogged about development with HttpServlets in XPages (NSF-local ones, without OSGi plugins) • I even did a Notes in 9 video on the subject (a second one bridging the gap between back-end and front-end development should be out soon) What does it all mean? • I have more (than “average” XPages application) static web assets not just CSS and JS files, but even HTML files (who knew!) • Just as we set an HTTP API (e.g.- RESTful API endpoint) to Cache-Control: No Cache, etc., we can cache our static assets in the user’s browser for faster loading times for more complex setups you can even host the static assets on a dedicated server separate from a Domino/XPages server, for faster loading times yet (and map in an Domino/XPages API assets as an api route, e.g.- /xsp, /api, etc.) this is not covered here (watch my blog)
  • 11. What Are You Selling?... pt.3 How can I achieve all this developer + user bliss? 3 Pieces: 1. Segregated Application Design (aka- have static assets to cache) 2. Reverse Proxy (to forward our API requests without cache, respond with cached static assets) 3. Tweak, fiddle, and “enhance” Google PageSpeed!
  • 12. Wait, What? Google PageSpeed Tools: https://developers.google.com/speed/pagespeed/ “The PageSpeed tools analyze and optimize your site following web best practices.” Flavors: • Nginx or Apache webserver modules (or IIS or Apache Traffic Server ports) relies on the PageSpeed Optimisation Library (PSOL) • PageSpeed Insights (online, freely available, assesses both mobile and desktop versions w/ score) demo volunteer? • PageSpeed Chrome Extension (great for non-public use cases, lots of the same info as Insights) demo local • PageSpeed Service (commercially provided by Google, all PageSpeed modules, filters, infrastructure) PageSpeed Service deactivated 03-August-2015
  • 13. DEMO: PageSpeed Insights (online, freely available, assesses both mobile and desktop versions w/ score) demo volunteer? PageSpeed Insights
  • 14. DEMO: PageSpeed Chrome Extension (great for non-public use cases, lots of the same info as Insights; also PSI tool, installable via npm) PageSpeed Chrome Extension
  • 15. Where Can I Use This Thingamajig? In front of your application server (it’s a reverse proxy, that’s where they live) preferably on the same “box” (it doesn’t have to be, but strongly advised). is pronounced engine X.
  • 16. When Can I Adopt It? As soon as you (or a sufficiently bribed admin) can run the install and do the necessary config (which I outline and demo in the “how”).
  • 17. Why Does This Benefit Me? In your well structured app (you amazing developer), you now have static assets which are fully cacheable; or not, it’s all configurable, like a choose your own adventure app server. Your user’s application performance will only increase due to the faster responses. You can now manage, off of your application server (Domino): • cache control • Gzip compression • HTTPS/SSL/TLS certificates • authentication (see Jesse Gallagher’s blog posts on “arbitrary authentication”, etc. with Nginx) Side benefit: if you’re addicted to fast apps, you’ve now opened the door to forward the API calls mapped to the Domino/app server and host the purely static assets off of Nginx (or Apache) for even faster applications!
  • 18. One Ticket to Crazy Town Please How do we do this? You guessed it, with Nginx + PageSpeed module! PageSpeed module is available for: • Apache -binary or source builds for Debian/Ubuntu and CentOS • Nginx, *nix only, no Windows :’-( -source builds only for Debian/Ubuntu and CentOS • IISpeed (port), https://www.iispeed.com/ With Nginx, you must build Nginx from source specifically configured with PageSpeed support (aka- we’re hooking in deep).
  • 19. Crazy Train… pt.2 Follow the Google PageSpeed install and build from source instructions for Nginx on *nix (I’m using an Ubuntu 64-bit 14.04.2 LTS distro). What do the instructions say? The short, short version is: • install a couple dependencies • download the PageSpeed (and PSOL) sources • download the Nginx source • build PSOL, then the PageSpeed module • configure Nginx w/ PageSpeed and build My install put things into /usr/local/nginx/.
  • 20. Crazy Train… pt.3 Once that’s all done… it’s alive!
  • 21. Config Anatomy Simple (simple) HTTP server config /usr/local/nginx/conf/nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
  • 22. Demo pt.1 Demo 1: a Domi-faux server behind Nginx w/ reverse proxy psst Eric, you want the nginx.conf_simpleProxy file you saved earlier
  • 23. Demo pt.2 Demo 2: a reverse proxied server w/ PageSpeed doing all the PageSpeed things psst Eric, you want the nginx.conf_PageSpeed-ified file you saved earlier
  • 24. Demo pt.3 Demo 3: a server w/ Nginx handling the HTTPS/SSL cert psst Eric, you want the nginx.conf_withSSL file you saved earlier
  • 25. Note on HTTPS Certificates Demo 3 has a self-signed TLS certificate, generated via openssl. Want to go that route, try this tutorial from Digital Ocean, or this one for Apache. Alternatives: • paid for certificate (e.g.- from GoDaddy, etc.) • no HTTPS • letsencrypt.org Let’s Encrypt: • sponsored by EFF, Mozilla, and others • free, automated, open source • coming soon How Soon? • First certificate: Week of September 7, 2015 • General availability: Week of November 16, 2015
  • 26. Note on HTTPS Certificates, pt.2 Using Let’s Encrypt.org: • can automatically configure Apache 2.x • support for Nginx 0.8.48+ mostly working (for auto config) • can always just generate files into local directory (regardless of auto config) • works through Let’s Encrypt’s own root and intermediate CAs • configurable RSA key length • can generate quickly from a *nix (Ubuntu, Debian, Fedora, Centos 7, Mac OS X) environment using Docker instructions on starting use • you can revoke a cert (one you’ve created for that server) Once created, either drop it in place of your self-signed or (for the fearless, until general release) let it auto configure for you. Not a magic solution, still essentially an intermediate “self-signed” certificate, but better than having your users click through the scary “untrusted” screens.
  • 27. Some FAQs • Why is PageSpeed not rewriting (combining) my CSS, JS, etc. files? link because it’s not supposed to… if filters like collapse_whitespace are working, then... “Your resources (images, css, javascript) aren't cacheable. If PageSpeed sees cache-control headers such as nocache or private it will not rewrite the resources.” We tell it to forget the Cache-Control and Expires headers with proxy_hide_headers. • Why is Nginx failing to start as soon as I enable mod_pagespeed? you most likely have forgotten to build either PageSpeed or PSOL from source, failed to configure Nginx correctly, or malformed your conf syntax (use semi-colons at line ends!) • What if I want the same config on a dev box, but want to see changes? do as this SO answer suggests and use a .htaccess file with ModPageSpeed off • But what’s it all cost? not a thing, it’s all free (except for the infrastructure to run an Nginx instance; which isn’t much) • Do I really need PageSpeed for this? No! You can achieve most, if not all, that the ngx_pagespeed modules does without PageSpeed. It just makes it easier.
  • 28. Q&A DEMO: (time permitting) A taste of a freely available, developer friendly way of doing a lot of this, without a DIY server.
  • 29. Q&A Questions? Write better, faster, stronger apps! We have the ability.