`
`
`
`O’REILLY w
`
`Hmmc- 11' tmw'x
`
`
`
`Web Caching
`
`Duane Wesscls
`
`O’REILLY'
`mam; - Cmnbrh'go - Fumbdm - K6!” - Parts -W - 1'}:ng - Tokyo
`
`
`
`mm
`by Duane- Weaacls
`Fm'rigm 0 mm fi'iteilly at: Associates, In. All rights mn‘td.
`Printed In the United Stairs of America.
`
`Published by D'Ilcllly at mate-.5. Inn. Ifll Mutts Sun-t. Mammal. CA 954172.
`
`Elm Nathan Taking-m and Paula lit-mum
`
`WHEN Leann: Clark: Say-Irma
`
`Dflmflfllflnfl: Edie Freedman
`
`muting my:
`Jtmt: 21!":
`
`First Edition.
`
`Nutshell Ilantibtmk. 1114: Nulahdl Hamlin-alt mm. and flu: D'Ilcilly Riga m mgistmd
`tacit-marks rt! D'Rellly & Associates. Inc. Many of the minutioris used by manut’actumts
`:IJ'HI 5.:le todlstlnguish lhclt pttxlum are claimed :5 tndcmatks. Whim- than: dujgmutms
`“PM" in Ihi's bank. and URL-lily & Aivxiatcs. Inc. was aware O! a "adamant dalm. mi.-
`drsignalinnr- haw been printed in caps or initial Cflpci. The association batman Ill: imam: vi
`a lock thrush and wcb caching is a trademark {1F (J'Iimlly a White—‘8». me.
`
`While cvtn' precauthn has been when L11 m: pmpamflm affl'll‘i hook, the pubLt-ihrraswmcs
`no mmnsibflity for crrm Ol' omissions. or for damages lemmas from me use oi the
`Informatim contained hit-win.
`
`Library 9}"fungus: aluminium-Mum» Data
`W’s-Mela. Dunne.
`Wed: Caching}Duane Wen-1:18
`p. cm.
`ISBN 166592-5fo
`1. (Zach: I'm-man: 2. 8mm [Cmnpulu' pu'clgmrnsl 5. Software ctmliflumtinn
`management. -I_ “Judd. Wide Web. I. Till:
`fiW.m W45 30H!
`001.5%th
`
`mutuaanj
`
`ISBN: 1-56593-536-X
`IC]
`
`
`
`L3 wcmmmr
`
`If
`
`they access it. It's much more eFficient to transfer the page once. cache ii. and then
`serve future requests dirwrly From the cache.
`in order for cuclthg to be elk-Clive. the following conditions must be met:
`
`I Client requests musl exhibit Inc-Jilly of reference.
`I
`The mat ofcaching mum he 1e.“ than the eon of direct retrieval.
`
`ill-i:- cm a'.nrl.rira'l.'el-,.I «meiotic dual the first require-them is rrue. Certain web sites are
`very popular. Classic examples are the starting ranges for Nelstupe and Min-(mm
`browsers. Others include searching and mdcxing sit-25 such as Yahuol and
`Alluvifla. Ewnt-lxrfiul
`silt-s.
`such use
`thorn:
`fur
`the Olympics. NASA} Mars
`Pathfinder mission. and World Cup Street. hemme- exrrcmely popular for dag-'5 or
`mks all a time. Finally. every Lndividufl has a few lama-ire pages that he or she
`Vieils ran a regular basis.
`
`It's not always obvious that the second reqque-ment is true. Wt- need to compare
`the omits of caching In the cunt; of not caching. Numenno.‘ [slum rule-1' film the
`analysis me oi which are easier to measure than othem To calculate the mm of
`caching, we can add up the trails for hardware. .mftix'are. and staff lime lo admin-
`ister the system. We also need to consider the time users save wailing for [urges to
`load [harem-y] and the cost of Internet bandwidth.
`Let's take a (Mr look at the lhr'ee primary lune-file of uniting web mnlerll:
`
`To rrurltc web pages load faster (reduce lalencyl
`I
`I To reduce wide area bandwidth usage
`I To reduce Ihe load placed (in (their: servers
`
`1.3.} Larenqu
`Mte-tcjrrel'efi to delays in the lmremrissltm of dale from one point to another. The
`transmission of data over electrical or optical cireuils L5 limited by the speed. of
`light. In fact. elem-rent and uptieul pulses travel at approximately nun-think the
`Speed HF light in Wires and fibers. Mentally. it takes at least 25 milliseconds lo
`send :1 packet arm the “.5. In make. it lakes a link: longer. sat,- alaour 50 mil-
`lisecond-i. Tmmnic delays arr: in the lflO—millhiccmd range.
`
`Another source of latent-5.r is network congestion. when network links are close to
`full urilizeritm, packers experience queuing delays imide mule-rs and swirehees.
`Queuing. which can occur at any number of points along a. path. is oceasiomlly :
`strum: of significant delay. 1It'hen :r devioe‘s queue is full. it is Forced to discard
`trimming (or oulatfingr random. With refinish: PMS. such as: TCP. Inst packers
`
`