SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Web Performance
Server-side Tips
Andrew Kovalenko
Table of contents
➔ Nginx vs Apache
➔ Apache performance tuning
➔ Nginx performance tuning
➔ Web server accelerators
➔ Varnish
➔ PageSpeed module
Total number of websites
NetCraft: http://news.netcraft.com/archives/2013/06/06/june-2013-web-server-survey-3.html
Web server developers:
Market share of active sites
NetCraft: http://news.netcraft.com/archives/2013/06/06/june-2013-web-server-survey-3.html
Nginx vs Apache (requests/seconds)
Amazon EC2
Micro Instance
Intel(R) Xeon(R)
CPU E5-2650 0 @
2.00GHz
613 MB RAM
Ubuntu 13.10
index.html
612 B
earth.png
3.7 MB
Nginx vs Apache (memory usage)
Apache basic architecture
Nginx basic architecture
Frontend (Nginx) - backend (Apache)
Front end
Client
Back end
➔ php
...
Static content
➔ js
➔ css
➔ images
➔ video
...
Nginx config
Light content (html, css, js, xml, rss, txt) Heavy content (photo, video, audio)
➔ g-zip compression
➔ expires headers for content proxy
➔ file descriptor caching
➔ virtual folder for frequently asked content
➔ SSD
➔ cache proxied requests
worker_processes, worker_priority, worker_connections, sendfile on, access_log off, tcp_nopush on, gzip on
Apache config
Run-TimeCompile-Time
➔ load only required modules
➔ choose appropriate MPM
HTTP Compression & Caching
➔ AllowOverride
➔ FollowSymLinks and
SymLinksIfOwnerMatch
➔ Content Negotiation
➔ MPM config
➔ KeepAlive and KeepAliveTimeout
Accept-Encoding: gzip,deflate
Separate Static
RewriteCond for images
Other configs
Web server accelerators
Web server
accelerator
Compression Operating
system
Browser Caching Edge
Side
Includes
Prefetching Optimize
code
Preemptive
hostname
resolution
Ad
removal
Client
aiCache Gzip Linux All Yes No Yes Yes Yes All
Apache Traffic
Server
Linux
CACHEbox None Linux All Yes No Yes No No Yes End user/ISP
Ishlangu Gzip Linux All Yes No No Yes Yes No All
LotServer None Linux,
Windows
All No No No No No No Content
Provider
nginx Gzip Unix All Yes No No No Yes No user/ISP
Polipo None Unix, Windows All Yes No No No No No user/ISP
SiteCelerate Text & Images All Yes No Yes No No No user/ISP
Squid None Unix, Windows All Yes Yes No No No No user/ISP
Varnish Gzip on-the-fly
compression and
decompression
Unix All Yes Yes No No No If You want All
Ziproxy Images, text & any
gzippable data
Unix All No No No HTML, JS,
CSS
Yes Yes ISP
Varnish
SPDY: PageSpeed module
Supported platforms:
➔ CentOS/Fedora (32-bit and 64-bit)
➔ Debian/Ubuntu (32-bit and 64-bit)
Apache 2.2 and higher
Nginx 1.3.15 and higher, for lower versions build from sources
PageSpeed features
➔ Optimizing caching
➔ Minimizing round-trip times
➔ Minimizing request overhead
➔ Minimizing payload size
➔ Optimizing browser rendering
➔ Optimizing for mobile
all by filters...
add_instrumentation
Adds client-side latency instrumentation
Head:
window.mod_pagespeed_start = Number(new Date());
End body:
pagespeed.addInstrumentationInit('/mod_pagespeed_beacon', 'load', '', 'http://www.modpagespeed.com/add_instrumentation.html');
combine_css
local_storage_cache
resize_mobile_images
And a lot more
➔ collapse_whitespace
➔ combine_javascript
➔ dedup_inlined_images
➔ defer_javascript
➔ extend_cache
➔ extend_cache_pdfs
➔ inline_css
➔ inline_javascript
➔ inline_preview_images
➔ insert_dns_prefetch
➔ move_css_above_scripts
➔ move_css_to_head
➔ lazyload_images
➔ outline_css
➔ outline_javascript
➔ prioritize_critical_css
➔ remove_comments
➔ remove_comments
➔ remove_quotes
➔ resize_rendered_image_dimensions
➔ rewrite_css
➔ rewrite_javascript
➔ rewrite_style_attributes
➔ sprite_images
➔ trim_urls
➔ etc...

Más contenido relacionado

La actualidad más candente

ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen Oxford
Phil Pursglove
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
Krivoy Rog IT Community
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
Chau Thanh
 
ASP.NET Scalability - WebDD
ASP.NET Scalability - WebDDASP.NET Scalability - WebDD
ASP.NET Scalability - WebDD
Phil Pursglove
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Atwix
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
camp_drupal_ua
 

La actualidad más candente (17)

ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen Oxford
 
kranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High loadkranonit S06E01 Игорь Цинько: High load
kranonit S06E01 Игорь Цинько: High load
 
Redis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button gamesRedis : Database, cache, pub/sub and more at Jelly button games
Redis : Database, cache, pub/sub and more at Jelly button games
 
Performance Web
Performance WebPerformance Web
Performance Web
 
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG LondonASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
ASP.NET Scalability - WebDD
ASP.NET Scalability - WebDDASP.NET Scalability - WebDD
ASP.NET Scalability - WebDD
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
 
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
Pankov Artem.Improving drupal performance www.hr portal.ru.DrupalCamp Kyiv 2011
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007
 
Sơ lược kiến trúc hệ thống Zing Me
Sơ lược kiến trúc hệ thống Zing MeSơ lược kiến trúc hệ thống Zing Me
Sơ lược kiến trúc hệ thống Zing Me
 
Cache hcm-topdev
Cache hcm-topdevCache hcm-topdev
Cache hcm-topdev
 
StripeEu Twistedbytes Presentation
StripeEu Twistedbytes PresentationStripeEu Twistedbytes Presentation
StripeEu Twistedbytes Presentation
 
MySQL on AWS RDS
MySQL on AWS RDSMySQL on AWS RDS
MySQL on AWS RDS
 
Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0Webinar: Introduction to MongoDB 3.0
Webinar: Introduction to MongoDB 3.0
 
WiredTiger & What's New in 3.0
WiredTiger & What's New in 3.0WiredTiger & What's New in 3.0
WiredTiger & What's New in 3.0
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
 

Destacado

Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
Vikram g b
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
Vikram g b
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
webhostingguy
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
mohamedmoharam
 
Chp 7 online customer behavior
Chp 7 online customer behaviorChp 7 online customer behavior
Chp 7 online customer behavior
cheqala5626
 

Destacado (17)

Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Web Presence Strategy
Web Presence StrategyWeb Presence Strategy
Web Presence Strategy
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
 
Web Server Load Balancing
Web Server Load BalancingWeb Server Load Balancing
Web Server Load Balancing
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
 
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on TomcatApache TomEE, Java EE 6 Web Profile {and more} on Tomcat
Apache TomEE, Java EE 6 Web Profile {and more} on Tomcat
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
 
Web Server Hardware and Software
Web Server Hardware and SoftwareWeb Server Hardware and Software
Web Server Hardware and Software
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance Tips
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
 
E Retailing
E RetailingE Retailing
E Retailing
 
Apache
ApacheApache
Apache
 
Chp 7 online customer behavior
Chp 7 online customer behaviorChp 7 online customer behavior
Chp 7 online customer behavior
 

Similar a Web Performance Part 3 "Server-side tips"

WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
codearachnid_test
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http accelerator
no no
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 

Similar a Web Performance Part 3 "Server-side tips" (20)

WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
WordCamp RVA
WordCamp RVAWordCamp RVA
WordCamp RVA
 
WordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdfWordCamp RVA 2011 - Performance & Tuning.pdf
WordCamp RVA 2011 - Performance & Tuning.pdf
 
WordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & TuningWordCamp RVA 2011 - Performance & Tuning
WordCamp RVA 2011 - Performance & Tuning
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Web Performance Optimization
Web Performance OptimizationWeb Performance Optimization
Web Performance Optimization
 
Front-end performances
Front-end performancesFront-end performances
Front-end performances
 
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
Accelerate graphics performance with ozone-gbm on Intel based Linux desktop s...
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
Performance Improvements in Browsers
Performance Improvements in BrowsersPerformance Improvements in Browsers
Performance Improvements in Browsers
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Drupal Performance
Drupal PerformanceDrupal Performance
Drupal Performance
 
Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012Lifting the Blinds: Monitoring Windows Server 2012
Lifting the Blinds: Monitoring Windows Server 2012
 
Wt vs phalcon
Wt vs phalconWt vs phalcon
Wt vs phalcon
 
Rit 2011 ats
Rit 2011 atsRit 2011 ats
Rit 2011 ats
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http accelerator
 
VMworld 2013: A Technical Deep Dive on VMware Horizon View 5.2 Performance an...
VMworld 2013: A Technical Deep Dive on VMware Horizon View 5.2 Performance an...VMworld 2013: A Technical Deep Dive on VMware Horizon View 5.2 Performance an...
VMworld 2013: A Technical Deep Dive on VMware Horizon View 5.2 Performance an...
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
 

Más de Binary Studio

Más de Binary Studio (20)

Academy PRO: D3, part 3
Academy PRO: D3, part 3Academy PRO: D3, part 3
Academy PRO: D3, part 3
 
Academy PRO: D3, part 1
Academy PRO: D3, part 1Academy PRO: D3, part 1
Academy PRO: D3, part 1
 
Academy PRO: Cryptography 3
Academy PRO: Cryptography 3Academy PRO: Cryptography 3
Academy PRO: Cryptography 3
 
Academy PRO: Cryptography 1
Academy PRO: Cryptography 1Academy PRO: Cryptography 1
Academy PRO: Cryptography 1
 
Academy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobXAcademy PRO: Advanced React Ecosystem. MobX
Academy PRO: Advanced React Ecosystem. MobX
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
 
Binary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: JS team project - OrderlyBinary Studio Academy 2017: JS team project - Orderly
Binary Studio Academy 2017: JS team project - Orderly
 
Binary Studio Academy 2017: .NET team project - Unicorn
Binary Studio Academy 2017: .NET team project - UnicornBinary Studio Academy 2017: .NET team project - Unicorn
Binary Studio Academy 2017: .NET team project - Unicorn
 
Academy PRO: React native - miscellaneous
Academy PRO: React native - miscellaneousAcademy PRO: React native - miscellaneous
Academy PRO: React native - miscellaneous
 
Academy PRO: React native - publish
Academy PRO: React native - publishAcademy PRO: React native - publish
Academy PRO: React native - publish
 
Academy PRO: React native - navigation
Academy PRO: React native - navigationAcademy PRO: React native - navigation
Academy PRO: React native - navigation
 
Academy PRO: React native - building first scenes
Academy PRO: React native - building first scenesAcademy PRO: React native - building first scenes
Academy PRO: React native - building first scenes
 
Academy PRO: React Native - introduction
Academy PRO: React Native - introductionAcademy PRO: React Native - introduction
Academy PRO: React Native - introduction
 
Academy PRO: Push notifications. Denis Beketsky
Academy PRO: Push notifications. Denis BeketskyAcademy PRO: Push notifications. Denis Beketsky
Academy PRO: Push notifications. Denis Beketsky
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 
Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3Academy PRO: Docker. Lecture 3
Academy PRO: Docker. Lecture 3
 
Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2Academy PRO: Docker. Lecture 2
Academy PRO: Docker. Lecture 2
 
Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1Academy PRO: Docker. Lecture 1
Academy PRO: Docker. Lecture 1
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 

Último (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Web Performance Part 3 "Server-side tips"

  • 2. Table of contents ➔ Nginx vs Apache ➔ Apache performance tuning ➔ Nginx performance tuning ➔ Web server accelerators ➔ Varnish ➔ PageSpeed module
  • 3. Total number of websites NetCraft: http://news.netcraft.com/archives/2013/06/06/june-2013-web-server-survey-3.html
  • 4. Web server developers: Market share of active sites NetCraft: http://news.netcraft.com/archives/2013/06/06/june-2013-web-server-survey-3.html
  • 5. Nginx vs Apache (requests/seconds) Amazon EC2 Micro Instance Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz 613 MB RAM Ubuntu 13.10 index.html 612 B earth.png 3.7 MB
  • 6. Nginx vs Apache (memory usage)
  • 9. Frontend (Nginx) - backend (Apache) Front end Client Back end ➔ php ... Static content ➔ js ➔ css ➔ images ➔ video ...
  • 10. Nginx config Light content (html, css, js, xml, rss, txt) Heavy content (photo, video, audio) ➔ g-zip compression ➔ expires headers for content proxy ➔ file descriptor caching ➔ virtual folder for frequently asked content ➔ SSD ➔ cache proxied requests worker_processes, worker_priority, worker_connections, sendfile on, access_log off, tcp_nopush on, gzip on
  • 11. Apache config Run-TimeCompile-Time ➔ load only required modules ➔ choose appropriate MPM HTTP Compression & Caching ➔ AllowOverride ➔ FollowSymLinks and SymLinksIfOwnerMatch ➔ Content Negotiation ➔ MPM config ➔ KeepAlive and KeepAliveTimeout Accept-Encoding: gzip,deflate Separate Static RewriteCond for images Other configs
  • 12. Web server accelerators Web server accelerator Compression Operating system Browser Caching Edge Side Includes Prefetching Optimize code Preemptive hostname resolution Ad removal Client aiCache Gzip Linux All Yes No Yes Yes Yes All Apache Traffic Server Linux CACHEbox None Linux All Yes No Yes No No Yes End user/ISP Ishlangu Gzip Linux All Yes No No Yes Yes No All LotServer None Linux, Windows All No No No No No No Content Provider nginx Gzip Unix All Yes No No No Yes No user/ISP Polipo None Unix, Windows All Yes No No No No No user/ISP SiteCelerate Text & Images All Yes No Yes No No No user/ISP Squid None Unix, Windows All Yes Yes No No No No user/ISP Varnish Gzip on-the-fly compression and decompression Unix All Yes Yes No No No If You want All Ziproxy Images, text & any gzippable data Unix All No No No HTML, JS, CSS Yes Yes ISP
  • 14. SPDY: PageSpeed module Supported platforms: ➔ CentOS/Fedora (32-bit and 64-bit) ➔ Debian/Ubuntu (32-bit and 64-bit) Apache 2.2 and higher Nginx 1.3.15 and higher, for lower versions build from sources
  • 15. PageSpeed features ➔ Optimizing caching ➔ Minimizing round-trip times ➔ Minimizing request overhead ➔ Minimizing payload size ➔ Optimizing browser rendering ➔ Optimizing for mobile all by filters...
  • 16. add_instrumentation Adds client-side latency instrumentation Head: window.mod_pagespeed_start = Number(new Date()); End body: pagespeed.addInstrumentationInit('/mod_pagespeed_beacon', 'load', '', 'http://www.modpagespeed.com/add_instrumentation.html');
  • 20. And a lot more ➔ collapse_whitespace ➔ combine_javascript ➔ dedup_inlined_images ➔ defer_javascript ➔ extend_cache ➔ extend_cache_pdfs ➔ inline_css ➔ inline_javascript ➔ inline_preview_images ➔ insert_dns_prefetch ➔ move_css_above_scripts ➔ move_css_to_head ➔ lazyload_images ➔ outline_css ➔ outline_javascript ➔ prioritize_critical_css ➔ remove_comments ➔ remove_comments ➔ remove_quotes ➔ resize_rendered_image_dimensions ➔ rewrite_css ➔ rewrite_javascript ➔ rewrite_style_attributes ➔ sprite_images ➔ trim_urls ➔ etc...