SlideShare a Scribd company logo
Improving Web Site Performance and Scalability While Saving Money Robert Boedigheimer
About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author Wrox Author 3rd Degree Black Belt, Tae Kwon Do ASP.NET MVP http://aspadvice.com/blogs/robertb/ robertb@aspalliance.com @boedie
Performance Rules “Performance is like air, no one cares about it until there isn’t any” - Richard Campbell For most web sites, only 10-20% of response time is waiting for the HTML document to be generated and downloaded Not optimizing code! Make fewer HTTP requests Send as little as possible Send it as infrequently as possible
Saving and Making Money Less bandwidth Less servers Increased sales and traffic (http://tinyurl.com/6293c4) “Every 100 ms increase in load time of Amazon.com decreased sales by 1%” “When the home page of Google Maps was reduced from 100KB to 70-80KB, traffic went up 10% in the first week, and an additional 25% in the following three weeks” Google and others using performance to determine ranking
HTTP Hypertext Transfer Protocol Protocol defined in RFC 2068 (Http 1.1), January 1997 Request/response paradigm Header and body http://www.ietf.org/rfc/rfc2068.txt
Fiddler Tracing tool specifically for HTTP Shows complete request and response (not packets) Can save archive of session Transfer Timeline http://tinyurl.com/3drk5t
Measure IIS log files Time taken logParser 3rd Party Services Benchmark against others Servers around US and world Availability and response times every X minutes Keynote, Gomez, WebSitePulse, AlertSite
HTTP Compression Server evaluates the “Accept-Encoding” header for request, compresses resulting response Implemented in February 2003 when about 3% of Fortune 1000 web sites utilized Used 53% less bandwidth, ~25% faster Keynote measurements Now use IIS Compression (free)
HTTP Compression (cont) IIS 7 Can control when to stop using if CPU usage is too high Minimum default file size is 256K Only static compression is on by default Detailed article about enabling IIS 6 compression at http://tinyurl.com/yjdo7w
Content Expirations Client asks “if-modified-since” Small content files it is just as expensive to see if modified as to receive content Leverage user’s browser cache Setup expiration times for content folders Avoid requests for files that seldom change (.js, .css, images, etc) Rename the file if need to override browser caching
Content Expirations (cont)
CSS and JavaScript External (Almost) always put CSS and JavaScript in external files Reduces page size(s) Allows reuse Able to use expirations
ETags Used for cache validation IIS sends the ETag header in response for static files hash:changeNumber IIS 6	 changeNumber – specific to server Setup a custom response header “ETag” with no value IIS 7 changeNumber - 0 by default Completely remove header with HttpModule
Minification and Consolidation Minimize CSS and JavaScript files Remove whitespace, comments, excessive semicolons, etc Often see files named with “.min” jQuery 1.6.2 Original file size is 229 KB Minified file size is only 31 KB  (86% smaller) Minification tools JSMin Packer YUI Compressor CSSMin Microsoft Ajax Minifier(http://ajaxmin.codeplex.com/) JavaScript and CSS Command line, .dll, and build tasks
Minification and Consolidation (2) Consolidation Combine files to reduce the number of HTTP requests required MSBuild Strategy Use external files for JavaScript and CSS Minimize all JavaScript and CSS files Combine all JavaScript files into a single file (jQuery, jQuery plugins, etc) Combine all CSS files into a single file Add a unique version number to combined files so we can set a “far future” expiration to utilize browser caches effectively Avoid runtime impact by minimizing and combining at build time Only for release builds to minimize impact on developers Reference the new combined files
Minification and Consolidation (3) Implementation Visual Studio Project File (.csproj) “Touch” a .cs file to ensure rebuild MSBuild Extension Pack (http://msbuildextensionpack.codeplex.com/) Retrieve the version number for the Web Form assembly in “bin” folder MSBuildAjaxMinifier task to minimize CSS and JavaScript files MSBuild task to combine minimized files Include the combined files into project (so publish will move them) WARNING:  Watch the order of files, keep consistent with original order! Use DEBUG symbol value to determine if release mode, reference new combined files for release builds Results Home page was 46% faster!!
CSS Sprites Combine small images into a single image Use CSS to “index” into the larger image Often 70-95% of time taken for a user is time requesting components (images, .css, .js) Reduce the number of requests http://spritegen.website-performance.org/
Images JPEG (photos), PNG/GIF (rest) JPEG compression Tradeoff size vs. quality, often cut size by 50% without any impact Image optimizers Jpegtran – removes unnecessary metadata, lossless Pngcrush – PNG optimizer Smush.it, http://tinyurl.com/r4b36b
Favicon.ico Caching By default, most browsers automatically look for this file in root folder of site (use for favorites, address bar, etc) Use <link> to point to a specific image Setup to use an image with expirations
Content Delivery Network (CDN) Akamai, Limelight, Internap, Amazon Global network of servers Geographically closer to users Offloads work for your servers Typically used for static files (images, CSS, JavaScript, etc) jQuery (jQuery.com, Microsoft, Google) Host jquery library files for free
Caching Data caching (Cache), cut 50% of our SQL queries which was 72,080,000 less queries each month! Substitution Scalability, Performance, and Reliability  http://aspalliance.com/66
Server Side Viewstate (WebForms) Default hidden client field for viewstate can become very large on pages Can specify to store in session on server to avoid downloading to the client Create a new Page Adapter to specify use of Session rather than client side hidden fields Two PageStatePersister derived classes HiddenFieldStatePersister (default) SessionPageStatePersister Create .browser file in App_Browsers and configure new class <sessionPageStatehistorySize="5" />
Ajax May be times when only need to update a portion of a page jQuery .load( ) – call server and return HTML fragment .ajax( ) – call and get various types of data
Tools Performance analysis tools Review a web page for how well it implements various performance techniques like compression, expirations, etc YSlow Google PageSpeed http://code.google.com/speed/page-speed/
Multiple Domains for Static Resources Browsers will open a series of background connections to retrieve objects from web servers HTTP RFC specified using 2 connections Recent browsers have continued to increase the number used Recent testing with CDN and using 3 domains for images was about 20% faster Tradeoff of time to lookup another DNS name and benefit of multiple connections WARNING:  Need to ensure that a given image is served from the same domain or this will override browser cache and nullify expirations!
Other Ideas Pre-fetch Remove unused response headers from IIS Host static pages on cookieless domains Image width/height (faster rendering) Stylesheetsat top of pages Scripts at bottom of pages
Resources “High Performance Web Sites” by Steve Souders Pluralsight Course – Web Performance “Website Optimization” by Andrew King
Questions http://aspadvice.com/blogs/robertb/ robertb@aspalliance.com @boedie

More Related Content

What's hot

Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Mike Watson
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!
Brian Culver
 
Tech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupalTech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupal
Alfresco Software
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontendtkramar
 
Website optimization
Website optimizationWebsite optimization
Website optimization
Mindfire Solutions
 
Availing Windows Dedicated Servers of HTS Hosting
Availing Windows Dedicated Servers of HTS HostingAvailing Windows Dedicated Servers of HTS Hosting
Availing Windows Dedicated Servers of HTS Hosting
HTS Hosting
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
Arulkumar
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
Brian Huff
 
Optimizing Client-Side Performance
Optimizing Client-Side PerformanceOptimizing Client-Side Performance
Optimizing Client-Side Performanceandrew4web
 
Search engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATGSearch engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATG
Vignesh sitaraman
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
AEM HUB
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
Kenton Spence
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmNigel Price
 
Jatkoaika.com - building sports website using Drupal
Jatkoaika.com - building sports website using DrupalJatkoaika.com - building sports website using Drupal
Jatkoaika.com - building sports website using Drupal
Exove
 
MongoDB World 2019: Scaling Real-time Collaboration with MongoDB
MongoDB World 2019: Scaling Real-time Collaboration with MongoDBMongoDB World 2019: Scaling Real-time Collaboration with MongoDB
MongoDB World 2019: Scaling Real-time Collaboration with MongoDB
MongoDB
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Trivandrum
 

What's hot (20)

Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010Sql And Storage Considerations For Share Point Server 2010
Sql And Storage Considerations For Share Point Server 2010
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!
 
Tech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupalTech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupal
 
Optimising Web Application Frontend
Optimising Web Application FrontendOptimising Web Application Frontend
Optimising Web Application Frontend
 
Website optimization
Website optimizationWebsite optimization
Website optimization
 
Availing Windows Dedicated Servers of HTS Hosting
Availing Windows Dedicated Servers of HTS HostingAvailing Windows Dedicated Servers of HTS Hosting
Availing Windows Dedicated Servers of HTS Hosting
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
 
Oracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance TuningOracle UCM: Web Site Performance Tuning
Oracle UCM: Web Site Performance Tuning
 
Optimizing Client-Side Performance
Optimizing Client-Side PerformanceOptimizing Client-Side Performance
Optimizing Client-Side Performance
 
Search engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATGSearch engine optimization (seo) from Endeca & ATG
Search engine optimization (seo) from Endeca & ATG
 
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto LeiteEffectively Scale and Operate AEM with MongoDB by Norberto Leite
Effectively Scale and Operate AEM with MongoDB by Norberto Leite
 
High performance website
High performance websiteHigh performance website
High performance website
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
 
How_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_FarmHow_To_Soup_Up_Your_Farm
How_To_Soup_Up_Your_Farm
 
Jatkoaika.com - building sports website using Drupal
Jatkoaika.com - building sports website using DrupalJatkoaika.com - building sports website using Drupal
Jatkoaika.com - building sports website using Drupal
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 
MongoDB World 2019: Scaling Real-time Collaboration with MongoDB
MongoDB World 2019: Scaling Real-time Collaboration with MongoDBMongoDB World 2019: Scaling Real-time Collaboration with MongoDB
MongoDB World 2019: Scaling Real-time Collaboration with MongoDB
 
Optimize
OptimizeOptimize
Optimize
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 

Similar to Improving web site performance and scalability while saving

Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
Anup Hariharan Nair
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
Ashok Modi
 
High Performance Websites
High Performance WebsitesHigh Performance Websites
High Performance Websites
Aaron Grogg
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
Nilesh Bafna
 
Browser Caching
Browser CachingBrowser Caching
Browser Caching
Jaiswal Siddharth
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
clickramanm
 
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 KnowSpiffy
 
Speed!
Speed!Speed!
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
Michael Anthony
 
Top 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answersTop 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answers
sonia merchant
 
Top 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answersTop 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answers
Pooja Gaikwad
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
William Lee
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
Graham Johnson
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
Bastian Grimm
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityAshok Modi
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
Bastian Grimm
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
Siarhei Barysiuk
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
Rasbor.com
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
Todd Whitehead
 

Similar to Improving web site performance and scalability while saving (20)

Performance engineering
Performance engineeringPerformance engineering
Performance engineering
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
DrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizingDrupalCampLA 2011 - Drupal frontend-optimizing
DrupalCampLA 2011 - Drupal frontend-optimizing
 
High Performance Websites
High Performance WebsitesHigh Performance Websites
High Performance Websites
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Browser Caching
Browser CachingBrowser Caching
Browser Caching
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 
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
 
Speed!
Speed!Speed!
Speed!
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Top 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answersTop 15-asp-dot-net-interview-questions-and-answers
Top 15-asp-dot-net-interview-questions-and-answers
 
Top 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answersTop 15 asp dot net interview questions and answers
Top 15 asp dot net interview questions and answers
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
Html5 & less css
Html5 & less cssHtml5 & less css
Html5 & less css
 
The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013The Need for Speed - SMX Sydney 2013
The Need for Speed - SMX Sydney 2013
 
Drupal Frontend Performance and Scalability
Drupal Frontend Performance and ScalabilityDrupal Frontend Performance and Scalability
Drupal Frontend Performance and Scalability
 
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 201210 Tips to make your Website lightning-fast - SMX Stockholm 2012
10 Tips to make your Website lightning-fast - SMX Stockholm 2012
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
How to optimize your Magento store
How to optimize your Magento store How to optimize your Magento store
How to optimize your Magento store
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
 

Recently uploaded

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

Improving web site performance and scalability while saving

  • 1. Improving Web Site Performance and Scalability While Saving Money Robert Boedigheimer
  • 2. About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author Wrox Author 3rd Degree Black Belt, Tae Kwon Do ASP.NET MVP http://aspadvice.com/blogs/robertb/ robertb@aspalliance.com @boedie
  • 3. Performance Rules “Performance is like air, no one cares about it until there isn’t any” - Richard Campbell For most web sites, only 10-20% of response time is waiting for the HTML document to be generated and downloaded Not optimizing code! Make fewer HTTP requests Send as little as possible Send it as infrequently as possible
  • 4. Saving and Making Money Less bandwidth Less servers Increased sales and traffic (http://tinyurl.com/6293c4) “Every 100 ms increase in load time of Amazon.com decreased sales by 1%” “When the home page of Google Maps was reduced from 100KB to 70-80KB, traffic went up 10% in the first week, and an additional 25% in the following three weeks” Google and others using performance to determine ranking
  • 5. HTTP Hypertext Transfer Protocol Protocol defined in RFC 2068 (Http 1.1), January 1997 Request/response paradigm Header and body http://www.ietf.org/rfc/rfc2068.txt
  • 6. Fiddler Tracing tool specifically for HTTP Shows complete request and response (not packets) Can save archive of session Transfer Timeline http://tinyurl.com/3drk5t
  • 7. Measure IIS log files Time taken logParser 3rd Party Services Benchmark against others Servers around US and world Availability and response times every X minutes Keynote, Gomez, WebSitePulse, AlertSite
  • 8. HTTP Compression Server evaluates the “Accept-Encoding” header for request, compresses resulting response Implemented in February 2003 when about 3% of Fortune 1000 web sites utilized Used 53% less bandwidth, ~25% faster Keynote measurements Now use IIS Compression (free)
  • 9. HTTP Compression (cont) IIS 7 Can control when to stop using if CPU usage is too high Minimum default file size is 256K Only static compression is on by default Detailed article about enabling IIS 6 compression at http://tinyurl.com/yjdo7w
  • 10. Content Expirations Client asks “if-modified-since” Small content files it is just as expensive to see if modified as to receive content Leverage user’s browser cache Setup expiration times for content folders Avoid requests for files that seldom change (.js, .css, images, etc) Rename the file if need to override browser caching
  • 12. CSS and JavaScript External (Almost) always put CSS and JavaScript in external files Reduces page size(s) Allows reuse Able to use expirations
  • 13. ETags Used for cache validation IIS sends the ETag header in response for static files hash:changeNumber IIS 6 changeNumber – specific to server Setup a custom response header “ETag” with no value IIS 7 changeNumber - 0 by default Completely remove header with HttpModule
  • 14. Minification and Consolidation Minimize CSS and JavaScript files Remove whitespace, comments, excessive semicolons, etc Often see files named with “.min” jQuery 1.6.2 Original file size is 229 KB Minified file size is only 31 KB (86% smaller) Minification tools JSMin Packer YUI Compressor CSSMin Microsoft Ajax Minifier(http://ajaxmin.codeplex.com/) JavaScript and CSS Command line, .dll, and build tasks
  • 15. Minification and Consolidation (2) Consolidation Combine files to reduce the number of HTTP requests required MSBuild Strategy Use external files for JavaScript and CSS Minimize all JavaScript and CSS files Combine all JavaScript files into a single file (jQuery, jQuery plugins, etc) Combine all CSS files into a single file Add a unique version number to combined files so we can set a “far future” expiration to utilize browser caches effectively Avoid runtime impact by minimizing and combining at build time Only for release builds to minimize impact on developers Reference the new combined files
  • 16. Minification and Consolidation (3) Implementation Visual Studio Project File (.csproj) “Touch” a .cs file to ensure rebuild MSBuild Extension Pack (http://msbuildextensionpack.codeplex.com/) Retrieve the version number for the Web Form assembly in “bin” folder MSBuildAjaxMinifier task to minimize CSS and JavaScript files MSBuild task to combine minimized files Include the combined files into project (so publish will move them) WARNING: Watch the order of files, keep consistent with original order! Use DEBUG symbol value to determine if release mode, reference new combined files for release builds Results Home page was 46% faster!!
  • 17. CSS Sprites Combine small images into a single image Use CSS to “index” into the larger image Often 70-95% of time taken for a user is time requesting components (images, .css, .js) Reduce the number of requests http://spritegen.website-performance.org/
  • 18. Images JPEG (photos), PNG/GIF (rest) JPEG compression Tradeoff size vs. quality, often cut size by 50% without any impact Image optimizers Jpegtran – removes unnecessary metadata, lossless Pngcrush – PNG optimizer Smush.it, http://tinyurl.com/r4b36b
  • 19. Favicon.ico Caching By default, most browsers automatically look for this file in root folder of site (use for favorites, address bar, etc) Use <link> to point to a specific image Setup to use an image with expirations
  • 20. Content Delivery Network (CDN) Akamai, Limelight, Internap, Amazon Global network of servers Geographically closer to users Offloads work for your servers Typically used for static files (images, CSS, JavaScript, etc) jQuery (jQuery.com, Microsoft, Google) Host jquery library files for free
  • 21. Caching Data caching (Cache), cut 50% of our SQL queries which was 72,080,000 less queries each month! Substitution Scalability, Performance, and Reliability http://aspalliance.com/66
  • 22. Server Side Viewstate (WebForms) Default hidden client field for viewstate can become very large on pages Can specify to store in session on server to avoid downloading to the client Create a new Page Adapter to specify use of Session rather than client side hidden fields Two PageStatePersister derived classes HiddenFieldStatePersister (default) SessionPageStatePersister Create .browser file in App_Browsers and configure new class <sessionPageStatehistorySize="5" />
  • 23. Ajax May be times when only need to update a portion of a page jQuery .load( ) – call server and return HTML fragment .ajax( ) – call and get various types of data
  • 24. Tools Performance analysis tools Review a web page for how well it implements various performance techniques like compression, expirations, etc YSlow Google PageSpeed http://code.google.com/speed/page-speed/
  • 25. Multiple Domains for Static Resources Browsers will open a series of background connections to retrieve objects from web servers HTTP RFC specified using 2 connections Recent browsers have continued to increase the number used Recent testing with CDN and using 3 domains for images was about 20% faster Tradeoff of time to lookup another DNS name and benefit of multiple connections WARNING: Need to ensure that a given image is served from the same domain or this will override browser cache and nullify expirations!
  • 26. Other Ideas Pre-fetch Remove unused response headers from IIS Host static pages on cookieless domains Image width/height (faster rendering) Stylesheetsat top of pages Scripts at bottom of pages
  • 27. Resources “High Performance Web Sites” by Steve Souders Pluralsight Course – Web Performance “Website Optimization” by Andrew King

Editor's Notes

  1. Make fewer HTTP requests – images, CSS, JavaScript
  2. Tool developed by Eric Lawrence of Microsoft Troubleshoot problems(404, 3rd party issues) Useful to archive off before and after for historical purposes Can be used on own machine (ipv4.fiddler, ipv6.fiddler) (only needed on old versions!!)
  3. ~85-90% of current browsers support HTTP Compression
  4. port80software.com
  5. People suggested adding own header Etag with value “”, but this did not work on IIS 7
  6. C:\\Program Files (x86)\\Microsoft\\Microsoft Ajax Minifier 4&gt;ajaxmin c:\\inetpub\\wwwroot\\thingsToKnow\\js\\jquery-1.4.2.js -out jquery-1.4.2.ajaxMin.js 40% faster for our customers
  7. Most often the single image is smaller than the sizes added together Can use an Image Map as well if it is contiguous images on a screen (map, etc)