SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Tips for Faster Web Site Rayed Alrashed www.alriyadh.com
Contents ,[object Object],[object Object],[object Object],[object Object]
Contents ,[object Object],[object Object],[object Object],[object Object]
Front End: Test Case ,[object Object]
Front End: Fewer HTTP Requests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Front End: Fewer HTTP Requests 25 requests became 19 requests
Front End: Expires Header ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Second Request GET /image.png HTTP/1.0 Host: rayed.com If-Modified-Since: Sun, 11 Jun 2006 09:41:33 GMT HTTP/1.1 304 Not Modified Content-Type: image/png
Front End: Expires Header ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Second Request NO REQUEST
Front End: Expires Header ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Front End: Expires Header 19 requests became 1 request 172KB became 37KB Static Files Cached
Front End: Gzip Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Front End: Gzip Components 172KB became 64K 37KB became 6.5K
Front End: Gzip Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Front End: Conclusion From 25 requests to 19 From 174K to 64K 270% Faster From 25 requests to 1 From 174K to 6.5K 2700% Faster
Front End: YSlow! ,[object Object],[object Object],[object Object]
Contents ,[object Object],[object Object],[object Object],[object Object]
Application & DB: First page ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: PHP Accelerators ,[object Object],[object Object],[object Object]
Application & DB: Optimize Queries ,[object Object],[object Object],[object Object],[object Object]
Application & DB: Optimize Queries EXPLAIN SELECT * FROM `test_posts` WHERE user_id=1 ORDER BY timestamp ALTER TABLE `test_posts` ADD INDEX ( `user_id` )  ALTER TABLE `test_posts` ADD INDEX (`user_id` ,`timestamp` ) ;
Application & DB: Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Execution 30ms Execution 1000ms
Application & DB: Do it offline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Do it offline Post Picture Page Add to database 50ms Client Create thumbnail 300ms Add to search engine 300ms Email notifications 350ms Total time 1000 ms!!! Do everything at once
Application & DB: Do it offline Post Picture Page Add to database 50ms Client Add to Message Queue 50ms Total time 100 ms!!! Move what you can to offline Message Queue Offline process Create thumbnail 300ms Add to search engine 300ms Email notifications 350ms
Application & DB: Do it offline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Denormalize ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Application & DB: Scalability and Replication ,[object Object],[object Object],[object Object],[object Object]
Contents ,[object Object],[object Object],[object Object],[object Object]
Web Server: Architectures ,[object Object],[object Object],Web Server ,[object Object],[object Object],Process Client Process Client Process Client
Web Server: Architectures ,[object Object],[object Object],Web Server Process Process Process ,[object Object],[object Object],Client Client Client
Web Server: Architectures ,[object Object],[object Object],Web Server Process ,[object Object],[object Object],Client Client Client
Web Server: Architectures ,[object Object],[object Object],[object Object],[object Object],Web Server Process Client Client Client Disk PHP Process PHP Process PHP Process Other Server
Web Server: Deployment Options ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Server: Deployment Options ,[object Object],[object Object],[object Object],Apache Process Client Process Process Lighttpd Process Dynamic content Static content (images,js,css,html,pdf)
Web Server: Deployment Options ,[object Object],Apache Process Client Process Process Lighttpd Process Disk
Web Server: Deployment Options ,[object Object],[object Object],[object Object],[object Object],Apache Process Client Process Process Squid Process Disk Disk
Contents ,[object Object],[object Object],[object Object],[object Object]
Misc: Measuring ,[object Object],[object Object]
Misc:  ,[object Object],[object Object],[object Object],[object Object]
Thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
andymccurdy
 

Was ist angesagt? (20)

Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with Ansible
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginners
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Ansible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / QuickstartAnsible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / Quickstart
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
Ansible
AnsibleAnsible
Ansible
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karban
 
Ansible : what's ansible & use case by REX
Ansible :  what's ansible & use case by REXAnsible :  what's ansible & use case by REX
Ansible : what's ansible & use case by REX
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
 
Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 

Andere mochten auch

дом. задания
дом. заданиядом. задания
дом. задания
tulga0513
 
Keramik hicheel
Keramik hicheelKeramik hicheel
Keramik hicheel
saraiberh
 
тест булгаа
тест булгаатест булгаа
тест булгаа
saraiberh
 
How to find new products to license (plg journal july 2010)
How to find new products to license (plg journal july 2010)How to find new products to license (plg journal july 2010)
How to find new products to license (plg journal july 2010)
Genericlicensing.com
 
Pharma mag being seen by major clients online
Pharma mag   being seen by major clients onlinePharma mag   being seen by major clients online
Pharma mag being seen by major clients online
Genericlicensing.com
 
I am thankful for... emir bilgili
I am thankful for...   emir bilgiliI am thankful for...   emir bilgili
I am thankful for... emir bilgili
skipperlauren
 
Progetto irene simone nicole daniele 2
Progetto irene simone nicole daniele 2Progetto irene simone nicole daniele 2
Progetto irene simone nicole daniele 2
laurany2006
 
ประวัติส่วนตัว
ประวัติส่วนตัวประวัติส่วนตัว
ประวัติส่วนตัว
phannipha
 

Andere mochten auch (20)

дом. задания
дом. заданиядом. задания
дом. задания
 
Diapositivas elvia blogs
Diapositivas elvia blogsDiapositivas elvia blogs
Diapositivas elvia blogs
 
Keramik hicheel
Keramik hicheelKeramik hicheel
Keramik hicheel
 
тест булгаа
тест булгаатест булгаа
тест булгаа
 
The 20th Century New Wave of Argentine Literature
The 20th Century New Wave of Argentine LiteratureThe 20th Century New Wave of Argentine Literature
The 20th Century New Wave of Argentine Literature
 
Cphi licensing pavillion 2011
Cphi licensing pavillion 2011Cphi licensing pavillion 2011
Cphi licensing pavillion 2011
 
How to find new products to license (plg journal july 2010)
How to find new products to license (plg journal july 2010)How to find new products to license (plg journal july 2010)
How to find new products to license (plg journal july 2010)
 
Pharma mag being seen by major clients online
Pharma mag   being seen by major clients onlinePharma mag   being seen by major clients online
Pharma mag being seen by major clients online
 
I am thankful for... emir bilgili
I am thankful for...   emir bilgiliI am thankful for...   emir bilgili
I am thankful for... emir bilgili
 
Diseminare mobilitate Grundtvig - MALTA - Empowerment in ict skills
Diseminare mobilitate Grundtvig - MALTA - Empowerment in ict skillsDiseminare mobilitate Grundtvig - MALTA - Empowerment in ict skills
Diseminare mobilitate Grundtvig - MALTA - Empowerment in ict skills
 
Talkport i believe
Talkport i believeTalkport i believe
Talkport i believe
 
Haiti
HaitiHaiti
Haiti
 
бага т
бага тбага т
бага т
 
הערות הקואליציה לדיור בר השגה לתזכיר חוק התכנית הכלכלית לשנת
הערות הקואליציה לדיור בר השגה לתזכיר חוק התכנית הכלכלית לשנתהערות הקואליציה לדיור בר השגה לתזכיר חוק התכנית הכלכלית לשנת
הערות הקואליציה לדיור בר השגה לתזכיר חוק התכנית הכלכלית לשנת
 
Lollypop Farm Volunteering in Rochester NY
Lollypop Farm Volunteering in Rochester NYLollypop Farm Volunteering in Rochester NY
Lollypop Farm Volunteering in Rochester NY
 
Tema X C. clasica
Tema X C. clasicaTema X C. clasica
Tema X C. clasica
 
Uzuulen2
Uzuulen2Uzuulen2
Uzuulen2
 
Internet intro
Internet introInternet intro
Internet intro
 
Progetto irene simone nicole daniele 2
Progetto irene simone nicole daniele 2Progetto irene simone nicole daniele 2
Progetto irene simone nicole daniele 2
 
ประวัติส่วนตัว
ประวัติส่วนตัวประวัติส่วนตัว
ประวัติส่วนตัว
 

Ähnlich wie Tips for a Faster Website

AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for Scalability
Tuenti
 

Ähnlich wie Tips for a Faster Website (20)

Caching 101
Caching 101Caching 101
Caching 101
 
5 critical-optimizations.v2
5 critical-optimizations.v25 critical-optimizations.v2
5 critical-optimizations.v2
 
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP MeetupWeb Performance, Scalability, and Testing Techniques - Boston PHP Meetup
Web Performance, Scalability, and Testing Techniques - Boston PHP Meetup
 
Make Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speedMake Drupal Run Fast - increase page load speed
Make Drupal Run Fast - increase page load speed
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Scaling 101 test
Scaling 101 testScaling 101 test
Scaling 101 test
 
Scaling 101
Scaling 101Scaling 101
Scaling 101
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Web Performance First Aid
Web Performance First AidWeb Performance First Aid
Web Performance First Aid
 
AJAX for Scalability
AJAX for ScalabilityAJAX for Scalability
AJAX for Scalability
 
Ajax For Scalability
Ajax For ScalabilityAjax For Scalability
Ajax For Scalability
 
I Can Haz More Performanz?
I Can Haz More Performanz?I Can Haz More Performanz?
I Can Haz More Performanz?
 
Configuring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web PerormanceConfiguring Apache Servers for Better Web Perormance
Configuring Apache Servers for Better Web Perormance
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
performance.ppt
performance.pptperformance.ppt
performance.ppt
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Client Side Performance @ Xero
Client Side Performance @ XeroClient Side Performance @ Xero
Client Side Performance @ Xero
 
Speed!
Speed!Speed!
Speed!
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Tips for a Faster Website

  • 1. Tips for Faster Web Site Rayed Alrashed www.alriyadh.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Front End: Fewer HTTP Requests 25 requests became 19 requests
  • 7.
  • 8.
  • 9.
  • 10. Front End: Expires Header 19 requests became 1 request 172KB became 37KB Static Files Cached
  • 11.
  • 12. Front End: Gzip Components 172KB became 64K 37KB became 6.5K
  • 13.
  • 14. Front End: Conclusion From 25 requests to 19 From 174K to 64K 270% Faster From 25 requests to 1 From 174K to 6.5K 2700% Faster
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Application & DB: Optimize Queries EXPLAIN SELECT * FROM `test_posts` WHERE user_id=1 ORDER BY timestamp ALTER TABLE `test_posts` ADD INDEX ( `user_id` ) ALTER TABLE `test_posts` ADD INDEX (`user_id` ,`timestamp` ) ;
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. Application & DB: Do it offline Post Picture Page Add to database 50ms Client Create thumbnail 300ms Add to search engine 300ms Email notifications 350ms Total time 1000 ms!!! Do everything at once
  • 27. Application & DB: Do it offline Post Picture Page Add to database 50ms Client Add to Message Queue 50ms Total time 100 ms!!! Move what you can to offline Message Queue Offline process Create thumbnail 300ms Add to search engine 300ms Email notifications 350ms
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.