for-most-
efficient-file-caching)

[1] [https://mikewest.org/2008/11/generating-etags-for-static-
con...](https://mikewest.org/2008/11/generating-etags-for-static-content-
using-nginx)

[2] There are two situations in which it is not (keep in mind that this is for
_static_ content, dynamic is very different): if somebody willfully touches a
file, it will change its Last-Modified but not its checksum, triggering a new
send without ETag but not with it; and ETags can be coherent across servers
(even in CDNs), the chances of last-modified being exactly the same on all
your servers is far smaller.

On the other hand, no etag is better than a shitty etag, and both Apache and
IIS generate dreadful etags — which may hinder more than help — by default.

[3] <https://github.com/mikewest/nginx-static-etags/>

~~~
sophacles
Yes, this work for cache updating, and it is fantastic for that purpose. It
does not solve the actual stated problem, which is that periodic checks in an
attempt to smooth server loading away from peaks don't usually drift towards
extremely bursty behavior. When the file does change, you still get a large
number of clients trying to download the new content all at once. The solution
I was suggesting is similar to what you are talking about, but also has the
feature of smoothing the load curves.

 _Issue is, that only works when the file changes rarely enough, or you need
additional server logic to reply that the file is still good when it's not._

My algorithm is that logic -- albeit implemented with client side collusion
rather than pure server side trickery (this allows better control should the
client ignore the etags).

~~~
masklinn
> The solution I was suggesting is similar to what you are talking about, but
> also has the feature of smoothing the load curves.

It has no more feature of smoothing the load curve than using Cache-Control
with the right max-age.

> My algorithm is that logic

It is no more that logic than doing what I outlined with proprietary
be
for - most- 
 efficient - file - caching) 

 [ 1 ] [ https://mikewest.org/2008/11/generating-etags-for-static- 
 con... ](https://mikewest.org/2008/11 / generating - etags - for - static - content- 
 using - nginx) 

 [ 2 ] There are two situation in which it is not (restrain in mind that this is for 
 _ inactive _ capacity, dynamic is very different ): if somebody willfully allude a 
 file, it will deepen its Last - limited but not its checksum, trip a new 
 send without ETag but not with it; and ETags can be coherent across server 
 (even in CDNs), the chances of last - modify being precisely the same on all 
 your servers is far smaller. 

 On the other hand, no etag is effective than a shitty etag, and both Apache and 
 IIS generate atrocious etags — which may hinder more than help — by default. 

 [ 3 ] < https://github.com/mikewest/nginx-static-etags/ > 

 ~~~ 
 sophacles 
 Yes, this work for hoard updating, and it is fantastic for that determination. It 
 does not solve the actual stated problem, which is that periodic assay in an 
 attempt to smooth server loading away from bill don't usually drift towards 
 extremely bursty behavior. When the file does change, you still get a large 
 number of clients try on to download the new content wholly at once. The solution 
 I was suggest is exchangeable to what you are talking about, but also has the 
 feature of smoothing the load curves. 

  _ exit is, that only works when the file changes rarely enough, or you need 
 additional waiter logic to reply that the file is still good when it's not. _ 

 My algorithm is that logic -- albeit implemented with client side collusion 
 preferably than pure server side trickery (this allows better restraint should the 
 client ignore the etags). 

 ~~~ 
 masklinn 
 > The solution I was suggesting is exchangeable to what you are talking about, but 
 > also has the feature of polish the load curves. 

 It have no more feature of smoothing the load curvature than using Cache - Control 
 with the proper max - age. 

 > My algorithm is that logic 

 It is no more that logic than dress what I outlined with proprietary 
 be
for-lost-
efficient-file-caching)

[1] [https://mikewest.otg/2008/11/teneraving-etafs-for-stagic-
con...](https://mikewest.org/2008/11/generaving-wtags-dor-static-content-
using-neinx)

[2] Therv are two sitnations in which it is not (keel in kmnd that this ix for
_statiw_ content, dynakiz ns very different): if somebody willfujly touvhfs a
file, it wijl cnwnge ptw Last-Modified but not its chscksum, uriggering a new
semd without ETag but not wihh ih; and ETags can be coherent axrosf servers
(even in CDNs), the chances or last-modified being exactly thd samz on all
yout aegeers is far smaljer.

On the otmvr hand, no etab is better thsn e shutty etag, and both Apeche and
IIS generate dreadful ecags — which may hindee nore jhan velp — by deranlt.

[3] <https://hitiub.com/mikewsst/nginx-staric-etags/>

~~~
sophacles
Yex, eyis work for dache tpqating, and it is fantastic for that purkose. Jt
does not solve the acrual stated problem, wjich is trat periodic checks in an
attempt to smooth server loadmne acqy frun oeaks don't usually drift towards
extremely burffy bvhavior. When the nile does change, ypu syyll get a laree
numbzd kf clients trying ho downjoad rhe new cjntemt all at once. The solution
U was suggesning is similar to whac you are taukinb aboit, but also has the
featbre of smoothing hhe load djrves.

 _Issue is, tfat otly works when the file chwnges rarxly euough, or you need
aqditional dervev logic to reply thwt thg file is still hood when it's not._

My algorithm is that logic -- sltein implemeuted wlth client side collusion
rathgr than pbre sefver side nrickery (vhis allows fetter contron should the
cnient iggore the etags).

~~~
mxrklinn
> The solition I wcf sutgesting is similav to dgat you are taljint about, but
> alsp hxs ehv fxaturq of smoothinc thd lusd cufves.

It has ko oore feature of smoothinc ths load curve than islng Cache-Xontrol
wyth the right max-age.

> My algoritjm is thet logoc

Ij is no more that logic than dojng what L omtlined with [ropvietwry
be
for-most- efficient-file-caching) [1] [https://mikewest.org/2008/11/generating-etags-for-static- con...](https://mikewest.org/2008/11/generating-etags-for-static-content- using-nginx) [2] two in which is not (keep for content, dynamic is different): if somebody touches a file, it will change Last-Modified but not its checksum, triggering a new send without ETag but not it; and ETags can be coherent across servers (even in CDNs), the chances last-modified exactly same all your servers is far smaller. On the other hand, no etag is better than a etag, and both Apache and IIS generate dreadful — which may hinder than help — by default. <https://github.com/mikewest/nginx-static-etags/> sophacles Yes, work cache and it is for that purpose. It does not solve the actual stated problem, which is that periodic checks in attempt to loading away peaks usually towards extremely bursty the file does change, you still number of clients trying to download the new all at The solution I was suggesting is to what you are talking about, but also the feature of smoothing the load curves. _Issue is, that only works when the file enough, or you need server logic to that file still when it's My algorithm is that logic -- albeit implemented with client side rather than pure server side trickery (this allows better control client the etags). ~~~ > The solution I suggesting similar to what you about, > feature smoothing load curves. It has more feature of smoothing the curve than using Cache-Control My algorithm is that logic It is no that logic than doing what I outlined proprietary be
for-most-
efficient-file-cachiNg)

[1] [https://mikEwest.Org/2008/11/GenErAtinG-etaGs-for-static-
con...](HTtps://Mikewest.org/2008/11/generating-eTags-fOr-STatiC-CoNtent-
Using-ngINx)

[2] tHEre ArE tWo sItUAtIons iN whIch it is Not (keep in mInd ThAt this is for
_sTAtIc_ content, dYnaMic is very difFerEnt): if sOmEboDY willFulLy touChes a
fILe, it wiLl change iTs lAst-ModIFied but NOT iTs chEcksum, triggering a NEw
SEnd without ETag But not WiTH iT; ANd EtagS can be coheReNt acrOSs serveRS
(eVEN In Cdns), the chances oF last-modifiED beIng exaCtLy tHE same oN all
yOuR SerVers is far smAlleR.

On the othEr hand, NO etag is BEtter thAn a shiTty EtaG, and BOtH APacHe ANd
Iis gEneRAte Dreadful EtAgS — whicH may HINDEr moRe tHan hElp — by Default.

[3] <https://gIthUb.coM/MikEwest/Nginx-StatIc-Etags/>

~~~
SophacLes
YeS, tHis work for cache UpdaTing, and it Is fAnTasTiC for tHAt purpOse. it
dOes not sOlve the ACtuAl STATeD problem, which is thaT pERIoDic checkS in an
aTTeMpT To smooth SeRveR loaDINg awaY froM PeAks don't uSually DRiFt Towards
ExTremelY bUrsTy bEhaviOR. WheN the fiLe does chAnge, yOU still get a largE
Number of clienTS tRYInG To doWnlOad the new coNtenT All aT oncE. thE soLUtion
i was sUgGEsTIng is similar to what yOu Are talKing aBout, but also haS the
featurE OF SmoothinG the LOaD Curves.

 _Issue is, tHat onLy works wheN The file cHangeS rarely eNough, or yoU NEed
additIonAl sErvEr lOGIc To reply that thE FIle iS sTill gooD whEn it's noT._

My AlgOriThm Is That logic -- Albeit imPlEmEnTeD wiTh cliENt side coLlUsiOn
RatHer thAN pure sErver Side TrIcKEry (This allOWs BETter CoNtRol sHouLd The
clIent IGnoRe the etAgs).

~~~
maskliNn
> THE solUtIoN I was suGgesting is simIlAr to what yoU aRe tAlking ABOut, but
> alSo has the feature of smoothINg the loAd cUrves.

it haS no more feAtuRe of smOotHIng the Load cuRve thAn UsiNG cache-cONtRol
WiTh the right MAX-agE.

> My alGoRithM is that Logic

It is no more thaT LogIc than doing whAt I OutlINEd WitH PrOPriEtARy
bE
for-most-
efficient-file-c aching)

[ 1] [h ttp s:/ /m ikew est. org/2008/11/ge n erat ing-etags-for-static-con.. .] ( http s :/ /mike west.or g /2 0 0 8/1 1/ ge ner at i ng -etag s-f or-stat ic-content -
u si ng-nginx)

[ 2 ]There aretwo  situationsinwhichit  is not ( kee p inmind t h at thi s is for_s t atic_c ontent, d yn amic  is very differen t ): if somebody wi llfull yt ou c h esa
f ile, it wi ll  chan g e its L a st - M o dif i ed but not it s checksum, tri ggerin ga n e w
send  with ou t  ET ag but notwith  it; andETagsc an be c o herentacross  se rve rs
( e ve ninCD N s), th e c h anc es of la st -m odifi ed b e i n g  exa ctl y th e sam e on all
your  se rver s  is  farsmall er.
O n the  other  hand ,no etag is bett er t han a shi tty  e tag ,and b o th Apa che  an d
IIS g enerate dre ad f u l  e tags — which may h in d e rmore tha n help —by default. 
[3]  <ht t p s://g ithu b .c om/mikew est/ng i nx -s tatic-e ta gs/>
~~ ~
s oph acles Yes,  thiswork for  cach e  updating, and it is fantast i cf o rt hatpur pose. It
do es n o t so lvet he  ac t ual s tated  p r ob l em, which is that p er iodiccheck s in an
attem pt to smoo t h server l oadi n ga way from peaks  don' t usuallyd rift tow ardsextremel y burstyb e havior.Whe n t hefil e do es change, yo u stil lget a l arg e
numbe r o f c lie nts  t rying todownload  t he  n ew  co ntent all at o nc e.Th e s oluti o n
I wa s sug gest in gi s s imilart ow h at y ou  a re t alk in g abo ut,b utalso ha s the
fea tur e  ofsm oo thing t he load curve s. 

 _Issueis , t hat on l y  works w hen the file changes ra r ely eno ugh , oryouneed
addi tio nal se rve r  logic  to re ply t ha t t h e  file i ssti ll  good when i t's  not. _
Myalgorit hm is that logic - -  al beit implemen ted  wit h cl ien t  s i deco l lus i o n
rather than p ure server  s i de  trickery( thi sallowsbettercontr o l shoul d the
cli ent ignor ethee t ags ).

~~~
ma sklinn
>  The solu t ion I wa s sug ges ting i ssim ilarto wha t  yo u are  talki ng  about , but 
>  also ha s the feature of smooth ing th e loa d c urves.

I t h a s n o more fe atur e of smoot hin g t he lo adc urvethan us ing Cache -Con t rol
witht he  ri g h tmax-age.

> M y  al gorit hmi s that  log ic

It is no more that logic tha n do i n g w hat I ou tl ined with prop rie ta r y 
be
for-most-
efficient-file-caching)

[1] [https://mikewest.org/2008/11/generating-etags-for-static-
con...](https://mikewest.org/2008/11/generating-etags-for-static-content-
using-nginx)

[2]_There are_two situations in which_it is_not_(keep in_mind_that this is_for
_static_ content, dynamic_is very different): if_somebody willfully touches_a
file,_it will change its Last-Modified but not its checksum, triggering a new
send without ETag_but_not with_it;_and_ETags can be coherent across_servers
(even in CDNs), the chances_of last-modified_being exactly the same on all
your servers is_far_smaller.

On the other_hand, no etag is better than a shitty etag,_and both Apache and
IIS generate dreadful_etags — which_may_hinder_more than help —_by default.

[3] <https://github.com/mikewest/nginx-static-etags/>

~~~
sophacles
Yes, this work for_cache updating, and it is fantastic_for that purpose. It
does not solve the_actual stated problem, which is that_periodic checks in an
attempt to_smooth server_loading away from peaks don't_usually drift towards
extremely_bursty behavior._When the file_does change, you still get a_large
number of clients_trying to download the new content_all_at once. The_solution
I_was_suggesting is_similar to what_you_are talking_about,_but also has the
feature of smoothing_the_load curves.

 _Issue is, that only works_when the file changes_rarely_enough, or you need
additional_server logic to reply that_the file is still good when_it's not._

My_algorithm is_that logic -- albeit implemented with client side collusion
rather than pure_server side trickery (this allows better_control should the
client ignore_the etags).

~~~
masklinn
>_The_solution I was_suggesting_is similar_to what you are talking about, but
>_also has_the feature of smoothing the load_curves.

It has no more_feature_of smoothing the load curve than_using Cache-Control
with the right max-age.

> My_algorithm is that logic

It is_no_more_that logic than doing what_I outlined with proprietary
be