SlideShare una empresa de Scribd logo
1 de 40
5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED Michael Mikikian - 1 Peeling the Web Performance Onion Drit Suljoti, Co-founder Catchpoint Systems drit@catchpoint.com
Speed Matters Shopzilla Performance 6sec to 1.2 sec Revenue +12% Pageviews+25% Yahoo 400ms improvement Traffic +9% Length of an eye blink is ~400ms
Speed Matters Amazon Latency +100ms Sales drop 1% / 250mil Google 400ms latency Searches drop 0.59%
What Impacts Speed 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED 4
What Impacts Speed 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED 5 Webpage Response (ms): 2,254 # Requests: 102 # Hosts: 11 # Connections: 16
Web Performance Optimization Reduce Pack Tight Merge Leverage Cache Partner Up
WPO Works 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED For Ethan Selzer - 7
80 / 20 Rule 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS  RESERVED 8 Steve Souders: “80% of the end-user response time is spent  on the front-end. Start there.” When things fail, a single request takes 80% of the time!
Great Performance is More than SPEED Availability  can users access it? Reliability  is it working consistently and properly?
Monitoring
Web Performance Monitoring Synthetic: simulates End User activity Measures the end to end transaction Continuous, 24x7 Detect anomalies Track performance metrics over time Measures every component
The Foundations of the Web IP
Simple HTTP Transaction DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
DNS
DNS Recommendations CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED 15 ,[object Object]
Avoid multiple CNAMEs.
Rely on distributed NS server or utilize companies like 3Crowd, Cotendo, Dyn, UltraDNS,...
Ensure DNS servers capacity.
Avoid using Registrars, usually unreliable and slow.
Do not mix Private & Public IP addresses.,[object Object]
Use Case: DNS DNS Provider Switch
Connect DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
Connect What impacts Connect times? Packet loss / network stability  Latency   Routers Load Balancers Network Cards Server Load Common issues: Bad configuration of Load Balancers, Routers, Switches and the NIC cards!  Latency/Packet Loss/Link speed TCP offloading  Capacity
Use Case: Connect
Use Case: Connect Capacity Problems at Datacenter
Wait DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
Wait What impacts Wait times? Network factors The Application code The Application Load / Capacity Any other dependencies (database lookups, other servers, apis…) Common issues: Application Load - Profile your capacity / perform load testing Database utilization, locks…,  Memory Leaks, Bugs…
Use Case: Wait
Use Case: Wait
Use Case: Wait - Database Impact DB Problems
Load/Receive DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
Load/Receive What impacts Wait times? Network factors The Application code The Application Load / Capacity Any other dependencies (database lookups, other servers, apis…) Common issues: Application Load - Profile your capacity / Load testing Database utilization, locks…,  Memory Leaks, Bugs… Bad chunked encoding!
Factors You Control Applications/System Architecture, Code, DB, SQL Queries, … Configurations Partners:  DNS, CDN, ISP Links, Datacenter, Optimization, Ads… ISP Peering  Hardware Server, CPU, RAM, I/O, Routers,… 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED For Ethan Selzer - 29
Factors You CANNOT Control Internet  Fiber cut in DC, Latency East Coast to West Coast Last Mile The internet link to the end user! End User Local Network Misconfigured router, computers downloading/uploading torrents! OS/Browser of the end user Configurations, Add-ons, installed malware… 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS  RESERVED For Ethan Selzer - 30
Parallel & Persistent HTTP Connections ,[object Object]
 DNS – Once or less per transaction per hostname,[object Object]
HTML Content Each request relies on HTTP - same rules apply! Pay attention to bottlenecks Primary URL Inline JavaScript requests Front end code impacts browser processing!
Oops … bad httpd.conf file 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS  RESERVED 34
Oops … bad httpd.conf file 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS  RESERVED 35 Apache configuration! No More Keep Alives
Monitoring Best Practices CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS  RESERVED 36 Monitor every component: ,[object Object]

Más contenido relacionado

Destacado

Where There's Smoke: Stories From DevOps Firefighters
Where There's Smoke: Stories From DevOps FirefightersWhere There's Smoke: Stories From DevOps Firefighters
Where There's Smoke: Stories From DevOps FirefightersCatchpoint Systems
 
Mastering Disasters - Velocity Ignite 2013 New York
Mastering Disasters - Velocity Ignite 2013 New YorkMastering Disasters - Velocity Ignite 2013 New York
Mastering Disasters - Velocity Ignite 2013 New YorkCatchpoint Systems
 
Tripwire march april 2011 v2
Tripwire march april 2011 v2Tripwire march april 2011 v2
Tripwire march april 2011 v2ruralfringe
 
Catastrohpic out-of-pocket payment for health care and its impact on househol...
Catastrohpic out-of-pocket payment for health care and its impact on househol...Catastrohpic out-of-pocket payment for health care and its impact on househol...
Catastrohpic out-of-pocket payment for health care and its impact on househol...Jeff Knezovich
 
Plan clases raiza
Plan clases raizaPlan clases raiza
Plan clases raizaRaiza Ramos
 
Ode à Natureza
Ode à NaturezaOde à Natureza
Ode à Natureza110262
 
3改善地層下陷
3改善地層下陷3改善地層下陷
3改善地層下陷twnewone1
 
Crunch and sip!!
Crunch and sip!!Crunch and sip!!
Crunch and sip!!y3ehps
 
презентация1
презентация1презентация1
презентация1Slava Bogdan
 
BCG Online- Hvordan Internettet forvandler den danske økonomi
BCG Online- Hvordan Internettet forvandler den danske økonomiBCG Online- Hvordan Internettet forvandler den danske økonomi
BCG Online- Hvordan Internettet forvandler den danske økonomiFrontPage Google
 
SA Youth Sex Survey 2011 - by Young Africa Live
SA Youth Sex Survey 2011 - by Young Africa LiveSA Youth Sex Survey 2011 - by Young Africa Live
SA Youth Sex Survey 2011 - by Young Africa LivePraekelt Foundation
 
Pollution ppt-090720025050-phpapp02
Pollution ppt-090720025050-phpapp02Pollution ppt-090720025050-phpapp02
Pollution ppt-090720025050-phpapp02younisnas
 
Procedure writing lesson 2 presentation
Procedure writing lesson 2 presentationProcedure writing lesson 2 presentation
Procedure writing lesson 2 presentationmrswato
 

Destacado (20)

Where There's Smoke: Stories From DevOps Firefighters
Where There's Smoke: Stories From DevOps FirefightersWhere There's Smoke: Stories From DevOps Firefighters
Where There's Smoke: Stories From DevOps Firefighters
 
Mastering Disasters - Velocity Ignite 2013 New York
Mastering Disasters - Velocity Ignite 2013 New YorkMastering Disasters - Velocity Ignite 2013 New York
Mastering Disasters - Velocity Ignite 2013 New York
 
Tripwire march april 2011 v2
Tripwire march april 2011 v2Tripwire march april 2011 v2
Tripwire march april 2011 v2
 
Catastrohpic out-of-pocket payment for health care and its impact on househol...
Catastrohpic out-of-pocket payment for health care and its impact on househol...Catastrohpic out-of-pocket payment for health care and its impact on househol...
Catastrohpic out-of-pocket payment for health care and its impact on househol...
 
Plan clases raiza
Plan clases raizaPlan clases raiza
Plan clases raiza
 
Singapore property weekly issue 1
Singapore property weekly issue 1Singapore property weekly issue 1
Singapore property weekly issue 1
 
Ode à Natureza
Ode à NaturezaOde à Natureza
Ode à Natureza
 
3改善地層下陷
3改善地層下陷3改善地層下陷
3改善地層下陷
 
As4tcp paper
As4tcp paperAs4tcp paper
As4tcp paper
 
Crunch and sip!!
Crunch and sip!!Crunch and sip!!
Crunch and sip!!
 
презентация1
презентация1презентация1
презентация1
 
BCG Online- Hvordan Internettet forvandler den danske økonomi
BCG Online- Hvordan Internettet forvandler den danske økonomiBCG Online- Hvordan Internettet forvandler den danske økonomi
BCG Online- Hvordan Internettet forvandler den danske økonomi
 
презентация2
презентация2презентация2
презентация2
 
澎湖
澎湖澎湖
澎湖
 
SA Youth Sex Survey 2011 - by Young Africa Live
SA Youth Sex Survey 2011 - by Young Africa LiveSA Youth Sex Survey 2011 - by Young Africa Live
SA Youth Sex Survey 2011 - by Young Africa Live
 
Ethics 4
Ethics 4Ethics 4
Ethics 4
 
Nama
NamaNama
Nama
 
Pollution ppt-090720025050-phpapp02
Pollution ppt-090720025050-phpapp02Pollution ppt-090720025050-phpapp02
Pollution ppt-090720025050-phpapp02
 
Fm & Wc Analysis
Fm & Wc AnalysisFm & Wc Analysis
Fm & Wc Analysis
 
Procedure writing lesson 2 presentation
Procedure writing lesson 2 presentationProcedure writing lesson 2 presentation
Procedure writing lesson 2 presentation
 

Similar a Web Performance Optimization Techniques

Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser NetwrokingShuya Osaki
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketShahriar Hyder
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docxmydrynan
 
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdfKrishnaShah908060
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009Cathie101
 
Caching Techniquesfor Content Delivery
Caching Techniquesfor Content DeliveryCaching Techniquesfor Content Delivery
Caching Techniquesfor Content Deliverysanjoysanyal
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)maamir farooq
 
02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptxALI2H
 
some fundamental topics to remember when starting with HTML
some fundamental topics to remember when starting with HTMLsome fundamental topics to remember when starting with HTML
some fundamental topics to remember when starting with HTMLfaiz324545
 
Presentation on Application layer_201.pdf
Presentation on Application layer_201.pdfPresentation on Application layer_201.pdf
Presentation on Application layer_201.pdfprince2412001
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systemsReza Gh
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdfEidTahir
 
Http2 protocol changes
Http2 protocol changesHttp2 protocol changes
Http2 protocol changesMark Friedman
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network servicesUc Man
 

Similar a Web Performance Optimization Techniques (20)

Primer to Browser Netwroking
Primer to Browser NetwrokingPrimer to Browser Netwroking
Primer to Browser Netwroking
 
Taking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocketTaking a Quantum Leap with Html 5 WebSocket
Taking a Quantum Leap with Html 5 WebSocket
 
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018  Ho.docxCSE422 Section 002 – Computer Networking Fall 2018  Ho.docx
CSE422 Section 002 – Computer Networking Fall 2018 Ho.docx
 
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf
3150710_CN_GTU_Study_Material_Presentations_Unit-2_13082021073829PM.pdf
 
Appl layer
Appl layerAppl layer
Appl layer
 
Internet
InternetInternet
Internet
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
 
Caching Techniquesfor Content Delivery
Caching Techniquesfor Content DeliveryCaching Techniquesfor Content Delivery
Caching Techniquesfor Content Delivery
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)
 
Web server
Web serverWeb server
Web server
 
Http2
Http2Http2
Http2
 
02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx02_Chapter_2_V6_LV.pptx
02_Chapter_2_V6_LV.pptx
 
some fundamental topics to remember when starting with HTML
some fundamental topics to remember when starting with HTMLsome fundamental topics to remember when starting with HTML
some fundamental topics to remember when starting with HTML
 
Chapter2 Application
Chapter2 ApplicationChapter2 Application
Chapter2 Application
 
Presentation on Application layer_201.pdf
Presentation on Application layer_201.pdfPresentation on Application layer_201.pdf
Presentation on Application layer_201.pdf
 
Distributed web based systems
Distributed web based systemsDistributed web based systems
Distributed web based systems
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdf
 
Http2 protocol changes
Http2 protocol changesHttp2 protocol changes
Http2 protocol changes
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 

Web Performance Optimization Techniques

  • 1. 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED Michael Mikikian - 1 Peeling the Web Performance Onion Drit Suljoti, Co-founder Catchpoint Systems drit@catchpoint.com
  • 2. Speed Matters Shopzilla Performance 6sec to 1.2 sec Revenue +12% Pageviews+25% Yahoo 400ms improvement Traffic +9% Length of an eye blink is ~400ms
  • 3. Speed Matters Amazon Latency +100ms Sales drop 1% / 250mil Google 400ms latency Searches drop 0.59%
  • 4. What Impacts Speed 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED 4
  • 5. What Impacts Speed 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED 5 Webpage Response (ms): 2,254 # Requests: 102 # Hosts: 11 # Connections: 16
  • 6. Web Performance Optimization Reduce Pack Tight Merge Leverage Cache Partner Up
  • 7. WPO Works 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED For Ethan Selzer - 7
  • 8. 80 / 20 Rule 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS RESERVED 8 Steve Souders: “80% of the end-user response time is spent on the front-end. Start there.” When things fail, a single request takes 80% of the time!
  • 9. Great Performance is More than SPEED Availability can users access it? Reliability is it working consistently and properly?
  • 11. Web Performance Monitoring Synthetic: simulates End User activity Measures the end to end transaction Continuous, 24x7 Detect anomalies Track performance metrics over time Measures every component
  • 12. The Foundations of the Web IP
  • 13. Simple HTTP Transaction DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
  • 14. DNS
  • 15.
  • 17. Rely on distributed NS server or utilize companies like 3Crowd, Cotendo, Dyn, UltraDNS,...
  • 18. Ensure DNS servers capacity.
  • 19. Avoid using Registrars, usually unreliable and slow.
  • 20.
  • 21. Use Case: DNS DNS Provider Switch
  • 22. Connect DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
  • 23. Connect What impacts Connect times? Packet loss / network stability Latency Routers Load Balancers Network Cards Server Load Common issues: Bad configuration of Load Balancers, Routers, Switches and the NIC cards! Latency/Packet Loss/Link speed TCP offloading Capacity
  • 25. Use Case: Connect Capacity Problems at Datacenter
  • 26. Wait DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
  • 27. Wait What impacts Wait times? Network factors The Application code The Application Load / Capacity Any other dependencies (database lookups, other servers, apis…) Common issues: Application Load - Profile your capacity / perform load testing Database utilization, locks…, Memory Leaks, Bugs…
  • 30. Use Case: Wait - Database Impact DB Problems
  • 31. Load/Receive DNS Lookup: The client tries to resolve the domain name for the request. Client sends DNS Query to local ISP DNS server. DNS server responds with the IP address for hostname.com Connect: Client establishes TCP connection with the IP address of hostname.com Client sends SYN packet. Web server sends SYN-ACK packet. Client answers with ACK packet, concluding the three-way TCP connection establishment. Send: Client sends the HTTP request to the web server. Wait: Client waits for the server to respond to the request. Web server processes the request, finds the resource, and sends the response to the Client. Client receives the first byte of the first packet from the web server, which contains the HTTP Response headers and content. Load: Client loads the content of the response. Web server sends second TCP segment with the PSH flag set. Client sends ACK. (Client sends ACK every two segments it receives. from the host) Web server sends third TCP segment with HTTP_Continue. Close: Client sends a a FIN packet to close the TCP connection.
  • 32. Load/Receive What impacts Wait times? Network factors The Application code The Application Load / Capacity Any other dependencies (database lookups, other servers, apis…) Common issues: Application Load - Profile your capacity / Load testing Database utilization, locks…, Memory Leaks, Bugs… Bad chunked encoding!
  • 33. Factors You Control Applications/System Architecture, Code, DB, SQL Queries, … Configurations Partners: DNS, CDN, ISP Links, Datacenter, Optimization, Ads… ISP Peering Hardware Server, CPU, RAM, I/O, Routers,… 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED For Ethan Selzer - 29
  • 34. Factors You CANNOT Control Internet Fiber cut in DC, Latency East Coast to West Coast Last Mile The internet link to the end user! End User Local Network Misconfigured router, computers downloading/uploading torrents! OS/Browser of the end user Configurations, Add-ons, installed malware… 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2010 . ALL RIGHTS RESERVED For Ethan Selzer - 30
  • 35.
  • 36.
  • 37. HTML Content Each request relies on HTTP - same rules apply! Pay attention to bottlenecks Primary URL Inline JavaScript requests Front end code impacts browser processing!
  • 38. Oops … bad httpd.conf file 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS RESERVED 34
  • 39. Oops … bad httpd.conf file 5/19/2011 CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS RESERVED 35 Apache configuration! No More Keep Alives
  • 40.
  • 41. Setup monitoring for every key provider / hostname / requests
  • 42. DNS
  • 44. if Multiple datacenters, monitor them individuallyBaseline very often, track improvement or degradation Keep an eye on performance during critical business hours (Volume) Compare data pre-release and post release Review Daily / Weekly /Monthly Alerts on % delta
  • 45.
  • 47. IE 9 – Developer tool
  • 51. Yslow
  • 54.
  • 55. Google Page speed (http://pagespeed.googlelabs.com/)
  • 56. Closing the Loop Monitor Action Plan  Optimize Monitor… do it again It isn’t over till it’s over. And it’s never over. It is not a sprint, it is a never ending marathon!
  • 57. CATCHPOINT SYSTEMS . CONFIDENTIAL . © 2011 . ALL RIGHTS RESERVED 39 THANK YOU. http://blog.catchpoint.com @catchpoint
  • 58.
  • 59. Where is the problem? is it specific to a country? a city? a customer? a datacenter?
  • 60. Who is affected? All customers? Some customers? Just the monitoring tools?
  • 61. When did it start? Does it always happen? is it sporadic?
  • 62. Why?Did something change? Did we roll out something? Did the environment change? Did the customer behavior change?
  • 63. How did this happen? Change management? Router upgrade? Did someone upload a crazy ad?