

CS193H: High Performance Web Sites - AbyCodes
http://cs193h.stevesouders.com/

======
mmaunder
This isn't bad, but it's client focused. Perhaps there should be a second
module that focuses on specific web server architectures (apache vs nginx and
lighttpd), reverse proxying performance, performance of web servers talking to
different data stores and the performance of those stores. Also server-side
caching architectures as well as server hardware and what works best for web
servers, caching servers and data stores.

~~~
Mikushi
Agreed on that. I am actually currently working on a book (PHP oriented) on
high performance / traffic website architecture.

Worked 4 years at a Top50 Alexa and been eager to share my knowledge (was
forbidden to talk publicly about most of it while i was working there).

~~~
buro9
I also agree.

I started a proposal for Wiley publishing a long time ago on caching and
networking for high performance web sites. Then I became employed by a company
that forbade me from sharing (grrr) so I stopped.

I felt when writing the proposal though, that the solution isn't just client,
just network, just server, or just anything... it's the combination of all
parts and knowing how a change in one place impacts another part and how to
balance them all to achieve the goal.

Even then, it's a stepped thing. A solution for a small but fast and resilient
web site looks very different to a solution for a very large, distributed and
fast web site.

A book should really include the basics building blocks in all major areas,
and then offer suggestions on how to apply those building blocks at different
levels of scale.

~~~
Mikushi
Indeed. I am trying to involve a former colleague of mine who is a specialist
in front-end development and optimization to complete what knowledge i have on
this front.

I have been actually thinking about asking HN or other about what they would
like to see in this kind of book (keep in mind this is very PHP oriented as
it's my specialty), instead of trying to come up with one myself and missing
some important point.

I am also thinking into recycling presentation i was hosting at internal IT
gathering, on very wide subject range (internal working of PHP and how to take
advantage of that knowledge, Varnish usage, HTML5 video, How to profile a PHP
application with XHProf and what to look for), and make video presentation out
of them. Or may be just bundling this in the book, not really sure yet.

------
jmilloy
How is there an entire class devoted to "Rule 5: Put stylesheets at the top"?
Yes, I clicked through the slides; it took 2 minutes.

~~~
johnx123-up
Yep, I'm now skeptical about Stanford quality...

------
cleverjake
Steve Sounders is a wealth of information. His http archive
(<http://httparchive.org/>) is already showing fundamental changes in design,
as well as regularly giving good tips on high-scalability sites. I am jealous
of those who get to take the full course. =]

------
dlauer
I don't get it, where's the class on multi-tier server architecture? Load-
balancing techniques? Server scaling? Database / backend performance best
practices? I appreciate the focus on the front-end, and YSlow best practices,
but I'm surprised that this kind of class is completely neglecting the backend
- which is just as, if not more important, for scaling a major production
website.

~~~
chubot
Actually the entire premise of Steve's book is that he was in charge of
performance/latency at Yahoo, and started out looking for issues in the
backend.

But when he measured end-user latency, he realized that all the issues were in
the front end. It doesn't make sense to start tweaking 100,000 lines of C++
code to shave 1 ms from the backend response time when you're taking 200-300ms
to load JavaScript and such.

I think this is probably a common performance characteristic at large
companies; perhaps not small ones. At small ones you probably have a database
bottleneck. But at companies Yahoo/Google the backend engineers have generally
optimized things quite a lot (partly because that kind of work is rewarded),
and there's a lot of flab in the front end.

------
prophetjohn
I know it's not technically computer science and it's more vocational, but I
wish my school offered classes like these. Something like this would be more
beneficial to me than, say, Theory of Automata, I think.

~~~
lightcatcher
really? I'm actually glad my school doesn't offer vocational classes like
this. Optimizing a website on the client side is the sort of thing you read a
blog post for and then go do. I don't enjoy it at all when I actually have to
do it, I certainly wouldn't want to take a course where I have to do this.

~~~
beagledude
that may be the newbest thing I've read on hacker news. It only shows you
haven't worked in high performance environments.

~~~
lightcatcher
Do you believe that there aren't more useful things to learn in school? Stuff
like this is fairly trivial to teach to yourself. I believe the time would be
better served by taking a class in something like game theory or any one of
the other mind-expanding courses offered (especially at a school like
Stanford).

As for the actual content of the class, all you really need to tell someone is
that various things can make pages load slowly, and then link them to some
guide such as this: <http://developer.yahoo.com/performance/rules.html> .

Also, I still have this opinion after working last summer in what I would
consider a high performance environment at a YC company.

~~~
simonw
I actually think high performance web architecture could make for an excellent
mind-broadening course. Consider the things you need a deep understanding of:

\- DNS, how it works, DNS level load balancing, DNS client implementations in
operating systems

\- Internet routing architecture and CDNs

\- Browser internals: how modern browsers access the network, how their
parsers work, how they parallelise requests

\- In-depth understanding of both JavaScript and the DOM

\- How CSS style engines work

\- Different image file formats

\- How compression works

\- How to introspect and monitor web page performance

\- How to reverse-engineer complex web sites

~~~
lightcatcher
I agree all of these things would be good to learn in a course. I think a
course that taught these things would be better structured as a course that
teaches about these, and then at some point have a 15 minute talk (or a
set/project) about how these concepts affect the load time for web pages and
how one can make pages load faster.

There is a course at my school that's somewhat similar to this
(<http://courses.cms.caltech.edu/cs144/> ), but it looks at web from a very
theoretical level. Out of the list you posted above, it definitely teaches
about how the internet is architechted (and therefore why CDN's are a good
idea). DNS is covered in a networking class, and compression (lossy and
lossless) is addressed in other classes.

It seems like many of the things this Stanford course teaches are things that
CS students should already know from other CS classes and they just have to
figure out how to apply them. The class seems like it could be a valuable
introduction to non CS majors who just want to understand how the web works so
they can build some web app or something.

------
etherealG
Anyone know where this falls in the standard computer science course?

~~~
tikhonj
I'm guessing that this is more of a seminar-type class rather than a standard
core CS course. It's very specialized and narrow and doesn't really fit into a
standard CS education. I suspect the professor just really wanted to teach it,
as opposed to the department deeming it a necessary part of the curriculum.
Also, at my school classes starting with 19- are usually either seminars,
student-taught or in "beta"; the numbering at Stanford might be similar.

As an aside, some of these classes can be really awesome. Some nice examples
at my school have included a popular cloud class and--particularly epic--a
Starcraft-AI class. These are definitely not part of our core curriculum, but
they are nice complements to staples like introduction to AI (the prerequisite
for the Starcraft course).

~~~
etherealG
thanks for the clarification, that starcraft AI course sounds great! which
school do you go to?

~~~
tikhonj
I go to Berkeley. The Starcraft AI class was structured around writing a bot
to compete in a tournament which it ended up winning. I think there was a mix
of graduate and undergraduate students. Unfortunately, I'm not sure they're
doing it again.

------
riffraff
did anyone else just assume by default this was cs193h-class.org ?

~~~
blcArmadillo
haha. yes.

~~~
worldimperator
I guess after the first three weeks of ai-class.com, judging from the several
stability adventures, the makers of the site could offer the knowledge of that
course as well ;-)

