Users expect websites and applications to be quick and reliable. A slow user experience can have a significant impact on your business. Join us for this webinar where we will show you a number of ways you can use NGINX and other tools and techniques to supercharge your application delivery, including:
- Client Caching
- Content Delivery Networks (CDN)
- OCSP stapling
- Dynamic Content Caching
View full webinar on demand at http://bit.ly/nginxsupercharge
2. About this webinar
Users expect websites and web apps to be quick and reliable. Yet, the rapid pace of
technology and the growing number of device types can present challenges for
developers. The good news is that there are a number of tools and techniques you can
use to supercharge application delivery to satisfy your users. Join this webinar to learn
about the impact of slow application delivery on user experience and business. Then
see ways that NGINX can help, including: Ways to improve application load times, how
to absorb flash floods of web traffic, when and how to take advantage of load
balancing, and more.
3. Who are you? Who am I?
• Introductions and poll
Owen Garrett
Head of
Products
Nginx, Inc.
Who?
What?
Where?
• Please use the Q&A for questions and comments
4. First steps at Application Delivery
• Igor Sysoev
• Systems Administrator at Rambler.ru
– Apache admin and module developer
• Addressing the ‘C10K’ problem
– Developed front-end accelerator
– NGINX 0.1.0, released October 4th 2004
6. Your users are in charge
You may own the content and features, but your users are the ones in charge
They alone decide:
Which sites they visit The apps they need
The performance
they’ll tolerate
When to give up
If you can’t provide your users with what they need, when they need it, they will go elsewhere.
If you page has not loaded within 3 seconds, up to 40% of your users will give up on you.
7. Every user counts…
• It does not matter how busy your site is…
– Flash Crowd
– HTTP Post Attack, Slow Read Attack
… they don’t know or care!
“We want you to be able to flick from one page to another as
quickly as you can flick a page on a book. So we’re really aiming
very, very high here… at something like 100 milliseconds.”
Urs Hölzle, Senior VP Operations, Google
10. 4 opportunities to optimize
Internet
Python
Ruby
node.js
Java
Client Device Network Application Stack Code
11. Improve performance on Client Device
• Reduce HTTP GETs and bandwidth:
– Merge and reduce resources
– Smart control of client caching
• Rearrange resources to speed up rendering
• Your options:
– Preprocess in Asset Pipeline
– In-app (Google Pagespeed)
– As-a-Service
12. Improve performance on the Network
• Faster resource downloads:
– Content Delivery Network
– Google SPDY
– OCSP stapling
• Your options:
– Use a CDN
– Use NGINX+
13. Improve performance of the Application Stack
• What do we mean?
Internet
• The ‘Application Stack’ bridges HTTP traffic
to your code, APIs and Static content
Your code:
• Python, Ruby,
node.js, Java
APIs
• Internal and
External APIs
“Static” Content
• On disk
• In database
HTTP
14. Three steps to a faster application
Optimize HTTP processing
Cache common responses
Be smart with your traffic
15. What is the challenge with HTTP?
Hundreds of concurrent
connections…
require hundreds of heavyweight
threads or processes…
competing for limited
CPU and memory
Client-side:
Slow network
Multiple connections
HTTP Keepalives
Server-side:
Limited concurrency
16. Let’s see it in action…
SlowHTTPTest
code.google.com/p/slowhttptest/
:80
WordPress
Standard install with sample content
17. NGINX architecture
Hundreds of concurrent
connections…
handed by a small number of
multiplexing processes,…
typically one process
per core
18. NGINX transforms application performance
Internet
Slow, high-concurrency N
internet-side traffic
Fast, efficient
local-side traffic
• NGINX has almost-unlimited concurrency
– Transforms worst-case traffic to best-case
– Maximizes application utilization
19. Let’s see it in action…
SlowHTTPTest
code.google.com/p/slowhttptest/
:8080
N+
NGINX+ and WordPress
Standard install with sample content
20. Cache common responses
GET /logo.png
GET /logo.png
Hybrid on-disk and
in-memory cache
N+
21. What about dynamic content?
• Some content appears to be un-cacheable
– Use client-side or server-side page assembly
– Use cache keys
– Use cache purging
– Use fast cache times
22. Let’s see it in action…
SlowHTTPTest
code.google.com/p/slowhttptest/
:8080
N
NGINX+ and WordPress
Standard install with sample content
23. Be smart with your traffic
• Reduce bandwidth requirements per client
– Content Compression reduces text and HTML
• Typically about 70% reduction
– Image resampling reduces JPEG size
• Prioritize and rate-limit requests and responses
– Queues, Rate-limits, Honeypots, ACLs
• Use NGINX Plus to its full potential
24.
25. Closing thoughts
• Application Performance is key to Application Success
• Four areas you should focus on:
– The Application
– The Client
– The Network
– The Application Stack
• NGINX is used by 39.6% of the top 10,000 sites
26. Find out more
• http://nginx.com
– Webinars, Documentation, Free Trial
• http://nginx.org
– Open Source, Community, Documentation
• @nginx, @nginxorg
• http://nginx.com/nginxconf/
Hinweis der Redaktion
Story starts with a single guy, Igor Sysoev
What was originally a tool for managing concurrency hos evolved into a Web Application Accelerator
Not because of vision but user driven innovation
Poll – what is your role/
Web developer
App developer
Operations
DevOPs
Something else…
Many options: CDN, page structure, google pagespeed/yahoo yslow
What does performance
Fundamental problem – if your application infrastructure is slow or overloaded, you’re stuck!
In build pipeline (pre-processing) – Grails or Grunt
This is a challenge for your web developers
Preferred options - asset pipelines, not pagespeed
Application stack – typically made up of many off-the-shelf components – web server, app server, database, web application framework
Load Balancing
Security
Web Application Firewall
Web Server
Caching
Process Management
Request Scheduling
Model–view–controller
Code Lifecycle
Code Management
WebSockets
URL Mapping
SSL and TLS termination
Templating
Form Validation
Challenge is that few (if any) of these components are optimized for performance. They are all designed to improve developer productivity
What works well in a development environment does not automatically translate to good performance in production.
This is exactly the problem that Igor was wrestling with at Rambler in 2004.
Top 37%
These tend to be successful websites, generating revenue and featuring well in google search results
siege -c 320 -t 30s -d 10 -H "Connection: Keep-Alive" http://apache-int:80/10k.html <- max out concurrency slots in apache
ab -t 10 http://apache-int:80/10k.html <- try to get a few resources
siege -c 300 -t 60s -d 10 -H "Connection: Keep-Alive" http://apache-int:8080/10k.html
ab -t 10 http://apache-int:8080/10k.html
tc qdisc add dev eth1 root netem delay 2ms