

First step in scaling a web site: HTTP caching - bradly
http://merbist.com/2011/07/11/first-step-in-scaling-a-web-site-http-caching/

======
lsb
This is an interesting discussion of HTTP caching, but is not the first step
in scaling a web site. Not the second or third even. The first step in scaling
a site like that, with various boxes full of information expiring at varying
periods of time, is _PROFILING._

PROFILE before optimization. Premature optimization is a bad thing.

Most of the time is spent rendering the page. Most people come to you with an
empty cache. Why is Cinema Treasures loading dozens of jQuery javascript files
from a handful of different domains? Such a waste of user time. Concatenate as
much as you can, and serve it off of a CDN.

See what takes a long time to render. See what pages are most popular. _Save
the most user-time per engineering hour you can._

~~~
kevinpet
None of the things you mention relate to scaling. Scaling is taking the site
which is functional for at least one user and ensuring that it can be used by
many users concurrently. By definition, client side performance doesn't affect
scaling.

~~~
aaronblohowiak
Profiling is one of the important parts of Scaling as well.

The Military uses the OODA (Observe-Orient-Decide-Act) loop. I think this is
the right approach for performance issues (both latency and scalability.)
Profiling, monitoring, load analysis and systems analysis all play a part in
the "Observe" step.

The other reason to profile is that it gives you a baseline for comparison so
you know if you are making improvements.

------
iaskwhy
Let's say you go with js for the user specific parts of some page. What's the
best pratice to deal with those with js disabled?

~~~
Fluxx
ESI, as it's already been pointed out, is one big way. I tend to not like
requiring JS to make my pages usable, as not everyone has JS turned on and
it's ability to work correctly in non-mainstream browsers, while improving,
can be spotty.

Really, if most pages on your site are identical for every user, sans their
name + avatar at the top, it's worth figuring out a strategy to serve the page
content from disk and swap in the dynamic parts easily without hitting your
app layer.

