Search the web
Sign In
New User? Sign Up
exceptional-performance · Exceptional Performance
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Simple things people aren't doing   Message List  
Reply | Forward Message #625 of 1298 |
Re: Simple things people aren't doing

--- In exceptional-performance@yahoogroups.com, "Chris Korhonen"
<ckorhonen@...> wrote:
>
> In larger organizations it is often still the case where the web
developers
> do not have access to the production servers, or to their
configuration -
> you'll find that the actual hardware is managed by another team, or
even
> outsourced to another company, with possibly draconian procedures in
place
> for making such a low-level change.

Here's what I've found, working for a large site:

1) There is a constant tension between the content owners wanting to
see their updates instantly take effect on the live site vs. the
operations folks wanting a reasonable caching rule in place. What you
usually end up with is a compromise where the static content is usually
cached for no more than 5-15 minutes on the off chance that the content
owner updates it.

2) Since static content may be served from the company's servers or
CDN1 or CDNx at any given hour depending on bandwidth commitments and
current prices, the effective caching directives may go from 15 minutes
if served by the company directly, to a doubled 30 when served from a
CDN. This means that caching directives need to be halved on the off
chance that the content will be served from a CDN.

Combine one and two, and you get caching rules that are one quarter as
efficient as they could be.

What we are now in the process of implementing is a strategy where we
identify key files and directories that have a global impact on our
site (the low-hanging fruit), and caching them with a far-futures
expires header. In order to invalidate the end user's browser cache,
and the cache on the CDN whenever the file gets updated, we literally
change the URI for the resource.

On the server, we configure the Web servers to strip the root directory
out of the request if it matches a certain pattern (say, ver-YYYYMMDD-
sequence) and serve the physical resource without that directory. If
the request is for http://www.foo.com/ver-20081128-0/fff.gif, the
server will send the contents of http://www.foo.com/fff.gif (without
redirecting).

On the pages, we maintain a list of the last updated dates and sequence
# for that date for all of the files that we care about, and make that
list available to the code that builds the pages.

In the content for the pages, we abstract out the URL to the files to
include the information from that list.

That way, a file can get updated and published live without anyone
seeing it. Then the list gets updated and distributed. The pages then
pick up the information from the new list and insert the updated
date/sequence when the page is served, thus serving a "new" file
instead of the old one.

So far it seems to be working perfectly as long as all references to
that file have had the URL abstracted and as long as the list gets
distributed.





Wed Nov 26, 2008 1:42 pm

joewxboy
Offline Offline
Send Email Send Email

Forward
Message #625 of 1298 |
Expand Messages Author Sort by Date

So, with pagetest <http://www.webpagetest.org> having been up for 8 months now with close to 26,000 tests having been run I thought it would be worthwhile to...
Patrick Meenan
pmeenan
Offline Send Email
Nov 25, 2008
2:18 pm

That's interesting but too be honest I'm not totally shocked - the average user tends not to get deep (by choice or simply due to lack of access) into the kind...
Chris Korhonen
chriskorhonen
Offline Send Email
Nov 25, 2008
3:07 pm

I don't think it's restricted to the average user. Something like CNN.com actually has a dedicated group of SA's. Persistent connections are enabled by...
Patrick Meenan
pmeenan
Offline Send Email
Nov 25, 2008
3:21 pm

In larger organizations it is often still the case where the web developers do not have access to the production servers, or to their configuration - you'll...
Chris Korhonen
chriskorhonen
Offline Send Email
Nov 25, 2008
3:34 pm

... developers ... configuration - ... even ... place ... Here's what I've found, working for a large site: 1) There is a constant tension between the content...
Joe Pearson
joewxboy
Offline Send Email
Nov 26, 2008
1:44 pm

... We have a variation on that approach. Instead of a version number we use an MD5 of the content, and it's cached for years. That way the cache is bused...
Bill Moseley
whmoseley
Offline Send Email
Nov 26, 2008
3:53 pm

Heinlein's Razor: Never attribute to malice, what can easily be explained by stupidity. One of those adages that can help us stay sane. One of those aphorisms ...
Peter Booth
alohashirt99
Offline Send Email
Nov 26, 2008
2:06 pm

Patrick, You provided an opportunity for me to ask a question that I have been wrestling with for a long time: If you imagine a web server that returns a...
Peter Booth
alohashirt99
Offline Send Email
Nov 25, 2008
6:15 pm

Usually the conditional get is done if the resource is still in the cache but the expires date has passed. If it is before the expiration date the request...
Patrick Meenan
pmeenan
Offline Send Email
Nov 25, 2008
8:48 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help