CS193H: High Performance Web Sites
cs193h.stevesouders.com
cs193h.stevesouders.com
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).
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.
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.
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.
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.
- 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
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.
There are many ways to get this material. I taught this Stanford class in 2008. You can use the class syllabus for free ( http://cs193h.stevesouders.com/ ). You can pay to watch 20+ hours of videos through Stanford ( http://scpd.stanford.edu/search/publicCourseSearchDetails.do... ). All the lectures are based on my two books (High Performance Web Sites and Even Faster Web Sites). Each book has a companion website with examples etc ( http://stevesouders.com/hpws/ and http://stevesouders.com/efws/ ). And there are blog posts that summarize each chapter ( http://developer.yahoo.com/blogs/ydn/posts/2007/04/rule_1_ma... and http://www.stevesouders.com/blog/2009/04/23/even-faster-web-... ).
Hopefully there's a format and price point that works for most people. Read my blog and follow me on Twitter to stay up to date. @souders
Sure, there's a blog or a doctoral thesis that I can read to get an understanding of these things, but hearing it from someone who's been there and has made the mistakes is invaluable. Plus, it's often hard to motivate myself to learn about these things that are less interesting to me, but critical to my future employment when I'm taking 17 hours and working as part of a Java development team part time.
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).