+ All Categories
Home > Technology > web performance explained to network and infrastructure experts

web performance explained to network and infrastructure experts

Date post: 16-Jul-2015
Category:
Upload: bernard-paques
View: 436 times
Download: 0 times
Share this document with a friend
Popular Tags:
82
web performance Training Session Bernard Paques, March, 2007
Transcript
Page 1: web performance explained to network and infrastructure experts

web performance Training Session

Bernard Paques, March, 2007

Page 2: web performance explained to network and infrastructure experts

why do we have to learn on web performance?

Application? Network? Hosts?

•  Bandwidth •  Latency •  Congestion

•  Client •  Server

•  Processing Time •  Sending Time

•  Too many exchanges •  Too much data •  Serialized requests …

Response times of corporate distributed applications

The network team has to take the initiative

Page 3: web performance explained to network and infrastructure experts

training on web performance

q Understanding HTTP, the web protocol §  specifications and implementations

q Best practices in web performance management §  assessment of web performance §  recommendations to web designers and to webmasters

q Troubleshooting the web §  practical steps and methodology §  mastering the toolbox

q This training is for you if: §  you have to interact with web designers or web masters, §  you would like to refine ITM positioning, §  you are curious about improving or troubleshooting web transactions.

Page 4: web performance explained to network and infrastructure experts

HTTP, the web protocol

Page 5: web performance explained to network and infrastructure experts

the world-wide web, by CERN (1994)

Page 6: web performance explained to network and infrastructure experts

what the w3 has defined:

q the idea of a boundless world in which all items have a reference by which they can be retrieved,

q the address system (URL) implemented to make this world possible, despite many different protocols,

q a network protocol (HTTP) used by native web servers giving features not otherwise available,

q a markup language (HTML) which every web client is required to understand, and is used for the transmission of basic things,

q the body of data available on the Internet using all or some of the preceding listed items.

Page 7: web performance explained to network and infrastructure experts

most related standards are freely available

q  IETF §  RFC2616 – HTTP 1.1 §  RFC2617 – HTTP authentication §  RFC2518 – WebDAV extensions §  RFC2246 – TLS 1.0 §  RFC2818 – HTTP over TLS §  RFC2109 - cookies §  RFC1952 – gzip §  RFC2045, 2046, 2047 – MIME types §  RFC4287 – ATOM 1.0

q W3C §  XML

Page 8: web performance explained to network and infrastructure experts

web server

HTTP is about clients talking to servers

IP network

web browser some HTTP request

server answer

Page 9: web performance explained to network and infrastructure experts

HTTP transactions have many attributes

Page 10: web performance explained to network and infrastructure experts

HTTP requests are chained, most often

Page 11: web performance explained to network and infrastructure experts

Style sheets

HTML mixes data and their presentation

Document structure

<html> <head> </head> <body> <h1>Le titre de ma page</h1> <hr>

<table border="1" width="80%" align="center"> <tr> <td><img src="bouquetin.gif"></td> <td>Ceci est le contenu de cette cellule. </td> </tr> </table> <hr>

</body> </html>

Content and related resources

Page 12: web performance explained to network and infrastructure experts

Extensible Markup Language, or XML for short, is a new technology for web applications.

XML is a World Wide Web Consortium standard that lets you create your own tags.

XML simplifies business-to-business transactions on the web

With XML, you can understand the meaning of the tags.

More importantly, a computer can understand them as well.

It's easier for a computer to understand that the tag <zipcode>34829</zipcode> is a zip code.

A DTD – Data Type Definition is used to identify the tags to be used in the XML message.

XML structures data

Page 13: web performance explained to network and infrastructure experts

CAM S1BOOKED/QF2/81205/USD/1/BNO 3/ 341/EOIJ1234567/65B2468/1/EA/25.20/15073

<S1CPOXMTcmd> <CCD>S1BOOKED</CCD> <CIC>QF2</CIC> <SPL>81205</SPL> <ICR>USD</ICR> <POC>1</POC> <BNO>3</BNO> <S1CPOXMT_ORDER> <TNC>341</TNC> <CPO>EOIJ1234567</CPO> <PNR>65B2468</PNR> <QTO>1</QTO> <UNT>EA</UNT> <UNP>25.20</UNP> <SSD>20030715</SSD> </S1CPOXMT_ORDER>

</S1CPOXMTcmd> </S1CPOXMT>

Example: from SPEC2000 to XML

Page 14: web performance explained to network and infrastructure experts

<?xml version="1.0" encoding="UTF-8"?> <!ELEMENT S1CPOXMT (SPEC_HDR?, S1CPOXMTcmd)> <!ELEMENT S1CPOXMTcmd (CCD, CIC, SPL, ICR, POC, BNO?, QTL?, EVT?, S1CPOXMT_ORDER+)> <!ELEMENT S1CPOXMT_ORDER (TNC, CPO, PNR, QTO, UNT, UNP, SSD, SSM?, SHT?, QTN?, SDC?, MFR?, PRI?, ACN?, DIS?, PKG?, LSE?, PBR?, PDP?, VRN?, ACK?, POU?, CTN?, REM*)> Include SPEC HDR Include Common Support Data Dictionary

<S1CPOXMTcmd> <CCD>S1BOOKED</CCD> <CIC>QF2</CIC> <SPL>81205</SPL> <ICR>USD</ICR> <POC>1</POC> <BNO>3</BNO> <S1CPOXMT_ORDER> <TNC>341</TNC> <CPO>EOIJ1234567</CPO> <PNR>65B2468</PNR> <QTO>1</QTO> <UNT>EA</UNT> <UNP>25.20</UNP> <SSD>20030715</SSD> </S1CPOXMT_ORDER>

</S1CPOXMTcmd> </S1CPOXMT>

DTD is used to identify XML tags

Page 15: web performance explained to network and infrastructure experts
Page 16: web performance explained to network and infrastructure experts

The writeable web is a very highly fragmented environment: business (micro-transactions), process (on-demand interactions), people (user-driven innovation), information (un-correlated data)

Page 17: web performance explained to network and infrastructure experts

assessment of web performance

Page 18: web performance explained to network and infrastructure experts

web server performance

IP infrastructure

Service Security Distance Last mile Rendering

· Service Time ¹ Transfer Time º User Time

End-to-end Response Time

data center user

Page 19: web performance explained to network and infrastructure experts

(bare) performance model

Bytes / Throughput + Turns * Latency / Parallelism

Reduce turns (web designer) Reduce latency

Check size of TCP window

Response Time = Service Time + Transfer Time + User Time

Check available bandwidth Avoid drops

Page 20: web performance explained to network and infrastructure experts

bandwidth vs. distance

130

Maximum speed = distance impact (latency)

Number of lanes = bandwidth impact (throughput)

Page 21: web performance explained to network and infrastructure experts

also consider TCP built-in mechanisms

•  The window size limits the bursts sent by the sender

•  The window size is defined by the receiver (=size of buffer in memory)

•  ‘Slow-start’ is a mechanism to ensure network condition may support burstiness

•  The window is almost closed on any network problem

Server (sender) Client (receiver) Ti

me SYN

SYN ACK PACKET 1

ACK 1 PACKET 2 PACKET 3

ACK 3 PACKET 4 PACKET 5 PACKET 6 PACKET 7

ACK 7 •  •  • 

FIN FIN ACK

TCP window

TCP window increases

Page 22: web performance explained to network and infrastructure experts

what is a good performance level?

q Look at what others are doing: §  benchmark against legacy competition (e.g., Boeing vs. Airbus), §  also consider consumer sites (e.g., lastminute.com vs. airfrance.com)

q Manage user expectations §  Where do they live? §  From which network do they visit? §  What connection speed do they enjoy? §  What are the peak usage times and patterns of site visitation?

q  Integrate technical constraints §  Static or dynamic pages? §  Web content, or multimedia? §  Pure HTML, or Flash, or Java, or AJAX?

Page 23: web performance explained to network and infrastructure experts

How Users View Application Task Performance

q Satisfied §  User maintains concentration §  Performance is not a factor in the user experience §  Time limit threshold is unknowingly set by users and is consistent

q Tolerating §  Concentration is impaired §  Performance is now a factor in the user experience §  User will notice how long it is taking

q Frustrated §  Performance is typically called unacceptable §  Casual user may abandon the process §  Production user is very likely to stop working

Page 24: web performance explained to network and infrastructure experts

how Apdex works

Tolerating

ApdexT= Total samples

Satisfied 2 +

Frustrated

Satisfied

Tolerating

Good

Fair

Poor

Una

ccep

tabl

e

0.00T

0.50T

1.00T

0.85T

0.94T

0.70T

Excellent Report Group: Application User Group Time Period

Existing Task Response Time Measurement

Samples

T 1

2

3

4 5

6 F

1. Define T for the application T = the application target time (threshold between satisfied and tolerating users). F = threshold between tolerating and frustrated users is calculated (F = 4T).

2. Define a Report Group (details available are tool dependent). 3. Extract data set from existing measurements for Report Group. 4. Count the number of samples in three performance zones. 5. Calculate the Apdex formula. 6. Display Apdex result (T is always shown as part of the result).

Page 25: web performance explained to network and infrastructure experts

Apdex examples

On-line stock trading company Within the United States 0.793 Outside the United States 0.433

Retirement funds manager by their customers’ ISP

SBC (many dial-up users) 0.623 Sprint (mix of access types) 0.723 MCI (only corporate broadband access) 0.923

Supply chain management system

Original system across the United States 0.714 Adding content compression 0.904 Adding transparent turns reduction 0.944 Excel 4

Fair 3 Unax 3

Poor 3 Fair 3 Good 3

Fair 4 Good 4

Page 26: web performance explained to network and infrastructure experts

recommendations in web performance

Page 27: web performance explained to network and infrastructure experts

web deployment framework

Internet

Application

Origin Server Deployment Infrastructure

End-user

Production Interface

SSL/TLS sockets

HTTP requests

End-to-end latency

Bandwidth

Content overhead (fat index)

Page 28: web performance explained to network and infrastructure experts

the web Fat Index

q  It is a method to assess the noise / signal ratio, that is, a measurement of actual overhead

q Fat Index= 10 log( Total Bytes / Useful Bytes ) §  Total Bytes = Sum for all network bytes exchanged during transaction §  Useful Bytes = Displayed to end-user

q Typical values:

§  1.2 db for a raw text file §  13 db to 17 db for popular dynamic Internet sites §  22 db for intranet web site

Page 29: web performance explained to network and infrastructure experts

how to use the web Fat Index?

q A typical portal page: §  250 kbytes (inclusive all web objects) §  2 kbyte actually useful to end user §  Fat Index = 10 log( 250 / 2 ) = 21 dB

q Caching may help a lot, except on first access q gzip compression may save up to 5 dB

q Shape a strategy, e.g.: §  10 dB on front page (first contact with brand) §  20 dB on authentication §  10 dB during navigation after login

Page 30: web performance explained to network and infrastructure experts

where can data be cached?

Internet

Application

Origin Server

End-user

Reverse proxy cache

CDN (Akamai,

Netli)

Browser cache

Proxy cache

Page 31: web performance explained to network and infrastructure experts

how to define a caching strategy

q The impact on usability is huge §  End-user can admit delays on first access §  Usually, expectations are higher for subsequent access §  Navigating back has to be almost instantaneous

q How to not transmit same bytes again and again?

§  Browser validation §  Server validation §  Expiration scheme

q What cannot be cached?

§  Normally, web objects fetched through SSL/TLS §  The outcome of POST requests

Page 32: web performance explained to network and infrastructure experts

regular population of cache

Web Server

network Web Browser

GET /path/object

200 OK Last-Modified: <date> ETag: <unique string> Content-Length: <bytes>

Whole content is transmitted

Page 33: web performance explained to network and infrastructure experts

browser (poor) validation

Web Server

network Web Browser

GET /path/object If-Modified-Since: … If-None-Match: … 200 OK

Socket Reset 1- Whole content is transmitted despite browser indications

2 - Browser tries to break the transfer

3 – The connection cannot be reused for other requests (HTTP 1.1)

Observed when server does not validate static content

Page 34: web performance explained to network and infrastructure experts

server (normal) validation

Web Server

network Web Browser

GET /path/object If-Modified-Since: … If-None-Match: … 304 Use local copy

One RTT per request

Page 35: web performance explained to network and infrastructure experts

cache dynamic objects (1/2)

Web Server

network Web Browser

GET /path/object

200 OK ETag: <unique string> Content-Length: <bytes>

Program steps: 1- compute page content 2- ETag = md5(content)

Page 36: web performance explained to network and infrastructure experts

cache dynamic objects (2/2)

Web Server

network Web Browser

304 Use local copy

Program steps: 1- compute page content 2- ETag = md5(content) 3- if ETags are equals, sent 304 Use local copy 4- else sent content and code 200 OK

GET /path/object If-None-Match: …

No data is transmitted if client and server have same values for ETag

Page 37: web performance explained to network and infrastructure experts

cache through expiration

Web Server

network

GET /path/object

200 OK Content-Length: <bytes> Expires: <deadline> Cache-Control: <max age>

Browser will use cached objects until time limits defined by server

Web Browser

Page 38: web performance explained to network and infrastructure experts

how to define a compression strategy?

q The impact on usability is huge §  Sensitivity to network conditions is reduced §  Impact of TCP Receive Window Size (RWIN) is reduced

q How to avoid transmit overhead? §  Compression is an effective way to approximate minimum message size

q Technology limitations §  HTTP headers are not compressed §  Compression may require more horse power on servers §  Some browsers may badly process compressed content

Page 39: web performance explained to network and infrastructure experts

how to compress dynamic objects?

Web Server

network Web Browser

GET /path/object Accept-Encoding:

200 OK Content-Encoding: gzip Content-Length: <bytes>

Program steps: 1- compute page content 2- if Accept-Encoding, compress content 3- sent content

Browser has to accept compression explicitly

Data is uncompressed on client side according to Content-Encoding

Page 40: web performance explained to network and infrastructure experts

web packaging does impact end users

Page 41: web performance explained to network and infrastructure experts
Page 42: web performance explained to network and infrastructure experts

troubleshooting the web

Page 43: web performance explained to network and infrastructure experts

start from the end-user

Security Web Server

Web Service

Database

1.  Monitor the User Experience

2. Explain overall response time by subsequent analysis on connected components

Page 44: web performance explained to network and infrastructure experts

overview of past assignments

Internet

Web servers

Origin Server

Airline

Proxy

1st hop

routing

LAN content

- Internet sub-optimal routing - polluting trafic (P2P) - poor DNS performance

- failure on the intranet - proxy delay - 1st hop congestion

DNS

P2P

Page 45: web performance explained to network and infrastructure experts

the methodology for web troubleshooting

q Ensure end users have done their homework q Agree on reference transactions to be audited

§  Documented sequence of URLs, clicks, etc.

q Profile reference transactions §  Play transactions in front of servers, and compute footprint figures.

q Capture data based on different scenarios §  Play transactions in different situations and capture data. §  Correlate these observations to estimate response time breakdown.

q  Identify main sources of latency §  This will be provided by a graphical “trace route” utility. §  Also consider proxies and gateways

Page 46: web performance explained to network and infrastructure experts

questions that end-user should answer

q Do browsers support HTTP/1.1 on workstation? q Do corporate proxies support HTTP/1.1 as well? q Less than 50 broadcast packet/s on the LAN? q Network delay and loss rate from workstation to the

proxy? (provided by ping) q Network delay and loss rate from intranet border to web

servers? (provided by ping) q Time requested to retrieve a public fixed web object

from servers? (found in proxy log) q Bandwidth utilisation of the Internet connection?

Page 47: web performance explained to network and infrastructure experts

reference transactions

q  To be discussed and provided by end-user

Page 48: web performance explained to network and infrastructure experts

sample scenarios

q Client topologies: §  Direct connection from behind the firewall §  Direct connection in front of the firewall §  Connection via Proxy-server §  Connection via ADSL link (to benchmark the corporate Internet link) §  Connection via SITA private infrastructure

q Service variations: §  Direct connection to servers. §  Connection to alternate servers (e.g., HTTP/1.1 instead of HTTP/1.0) §  Connection to third party, for instance Akamai or equivalent.

Page 49: web performance explained to network and infrastructure experts

start with internal tests

q Play reference transactions with your laptop, from within the intranet, through the proxy and directly

q  In the background, record data §  At the network level, with Application Vantage or Sniffer or … §  At the application level, with TracePlus or Tamper Data or HTTPWatch, … §  At the screen level, with SnagIt or Camcorder or …

q  In case of security concerns, you may import Sniffer captures made by the Third Party into Application Vantage

Page 50: web performance explained to network and infrastructure experts

Sample internal tests

intranet

SITA laptop

Internet

Proxy

TCP/80 & 443

Airbus

Singapore Airlines

Legacy AOLS

New Access Layer

SITA ATEX

Page 51: web performance explained to network and infrastructure experts

Border tests

q First, launch PingPlotter to capture data related to network routes to servers.

q Play reference transactions with your laptop, from the demilitarized zone, or just in front of the ISP router

q  In the background, record data §  At the network level, with Application Vantage or Sniffer or … §  At the application level, with TracePlus or Tamper Data or HTTPWatch, … §  At the screen level, with SnagIt or Camcorder or …

Page 52: web performance explained to network and infrastructure experts

Airbus

Sample border tests

Corporate PACNet

Singapore Airlines intranet Legacy

AOLS

New Access Layer

SITA laptop

Internet

Page 53: web performance explained to network and infrastructure experts

Benchmark test (optional)

q First, launch PingPlotter to capture data related to network routes to servers.

q Play reference transactions with your laptop, from the demilitarized zone, or just in front of the ISP router

q  In the background, record data §  At the network level, with Application Vantage or Sniffer or … §  At the application level, with TracePlus or Tamper Data or HTTPWatch, … §  At the screen level, with SnagIt or Camcorder or …

Page 54: web performance explained to network and infrastructure experts

Singapore Airlines premises

Airbus

Sample benchmark test

SITA laptop

Legacy AOLS

New Access Layer

Standalone Broadband Internet

Page 55: web performance explained to network and infrastructure experts

Service variation (optional)

q Play reference transactions with your laptop against various hosts

q  In the background, record data §  At the network level, with Application Vantage or Sniffer or … §  At the application level, with TracePlus or Tamper Data or HTTPWatch, … §  At the screen level, with SnagIt or Camcorder or …

Page 56: web performance explained to network and infrastructure experts

Sample tests related to web acceleration

intranet

SITA laptop

Internet

Airbus Singapore Airlines

New Access Layer

Akamai data center Proxy

Page 57: web performance explained to network and infrastructure experts

useful tools

q Trace routes through the Internet §  PingPlotter, from Nessoft

q Network Capture and Analysis §  Application Vantage, from Compuware §  Sniffer §  Ethereal

q Web Capture and Analysis §  TracePlus Web Detective, from SST §  HTTPWatch §  Tamper Data

q Screen capture §  SnagIt, from TechSmiths Corporation §  Camcorder

Page 58: web performance explained to network and infrastructure experts

PingPlotter

q Use it during border or benchmark tests, to capture data related to end-to-end network path.

q Check every increase of round-trip-time. Is it expected (an ocean to cross) or suspect (a congestion)?

q High-level of latency on first hop proves undersizing of the Internet link to the ISP.

q  If you suspect a congestion, capture data early in the morning, during business hours and late at night.

q  If the tool reports on changing routes, augment duration of capture to prove flapping.

q Drops of ICMP packets are rarely correlated to application poor performance, except above 30% loss.

Page 59: web performance explained to network and infrastructure experts

CPA to Europe, through PCCW

China

USA

France

260 ms due to the Pacific Ocean

and USA size

100 ms due to the

Atlantic Ocean

Page 60: web performance explained to network and infrastructure experts

Regular link to Toulouse

U.A.E.

USA

Europe

expected

175 ms + loss

Page 61: web performance explained to network and infrastructure experts

Air China Infrastructure Assessment Packet loss: Path from Beijing to Europe I

Average Round

Trip Time To

Airbus = 354 ms

No Packet

Loss

Page 62: web performance explained to network and infrastructure experts

Air China Infrastructure Assessment Packet loss: Path from Beijing to Europe II

Average Round

Trip Time To

Airbus = 465 ms

AlmostNo

Packet Loss

Round Trip Time has increased with 100 ms

from day 1 to day 3

Page 63: web performance explained to network and infrastructure experts

Alternatives to PingPlotter

q Some airlines may not let you plug your PC into their network

q Ask for MRTG diagrams instead

Page 64: web performance explained to network and infrastructure experts

Application Vantage

q Capture network packets (= Sniffer) q Allows for graphical handling of them (# Sniffer)

§  Clean the capture (remove packets afterwards) §  Compute footprints

q Shows network errors and retransmissions §  Configure the software to change some errors to warnings

q Allows for a number of complementary tests §  Number of sockets open §  Time to open a socket (SYN-ACK) compared to RTT §  Size of TCP receive window

Page 65: web performance explained to network and infrastructure experts
Page 66: web performance explained to network and infrastructure experts
Page 67: web performance explained to network and infrastructure experts
Page 68: web performance explained to network and infrastructure experts
Page 69: web performance explained to network and infrastructure experts
Page 70: web performance explained to network and infrastructure experts
Page 71: web performance explained to network and infrastructure experts
Page 72: web performance explained to network and infrastructure experts
Page 73: web performance explained to network and infrastructure experts
Page 74: web performance explained to network and infrastructure experts

TracePlus or HTTPWatch

q Capture web transactions, as seen at browser level q Useful to assess proxy efficiency

§  Compare time to first byte through the proxy with time to first byte on direct access

q Look at response header to check: §  Cacheability of web objects §  Compression §  Web errors (404, 500, …)

Page 75: web performance explained to network and infrastructure experts

Explain proxy impact

corporate ADSL Proxy

Airbus Emirates

Server

33 seconds

49 seconds

Page 76: web performance explained to network and infrastructure experts

Indirect proof of proxy impact

corporate Internet Proxy/NTLM

Airbus Cathay Pacific

Server

Pilot Response Time Network Delay

9:00 9:15 9:30

323 ms 25 s

50 s

9:00 9:15 9:30

Page 77: web performance explained to network and infrastructure experts

SnagIt

q A straightforward capture tool q Make it visual to help motivate decisions

§  90 seconds, does it mean something to you? §  Provide a 90 seconds video, this will make a big difference §  Example: transaction using free ADSL link compared to transaction through

corporate saturated link §  Put several videos on same slide, and trigger all of them at the same time

Page 78: web performance explained to network and infrastructure experts

Knowledge test: how would you prove:

Internet

web servers

Origin Server

users

Proxy

1st hop

routing

LAN content

- Internet sub-optimal routing - polluting trafic (P2P) - poor DNS performance

- failure on the intranet - proxy delay - 1st hop congestion

DNS

P2P

Page 79: web performance explained to network and infrastructure experts

lessons learnt

Page 80: web performance explained to network and infrastructure experts

golden rules for web robustness Web definition Where is the competition? Set objectives for end-user response times Ask for XHTML/CSS Set data URLs for next 10 years

Web deployment HTTP/1.1 Compress dynamic web pages Validate dynamic web pages Expire static objects

Web development < 20 objects/page < 100 kbytes/HTML 20 dB Fat Index on 1st access, 10 dB afterwards Minimum Javascript No Java applet

Fat Index= 10 log( Total Bytes / Useful Bytes )

Page 81: web performance explained to network and infrastructure experts

takeaways

q Understanding HTTP, the web protocol §  do your homework, and read specifications

q Best practices in web performance management §  ask the network team to sponsor you to enter web teams

q Troubleshooting the web §  if it is not in the IETF specification, it will happen… §  use your brain and ask your peers

Page 82: web performance explained to network and infrastructure experts

Thank you [email protected]


Recommended