Scalable Internet Architectures

Category: Hardware & DIY
Author: Theo Schlossnagle
All Hacker News 7
This Month Stack Overflow 4


by S.Lott   2019-07-21

Buy this.

by anonymous   2019-07-21

The database isn't your bottleneck.

Check your browser carefully.

For each page of HTML you're sending (on average) 8 other files, some of which may be quite large. These are your JS, CSS, graphics, etc.

The actual performance bottleneck is the browser requesting those files and accepting the bytes s... l... o... w... l... y...

To scale, then, do this.

  1. Use multiple front-ends balanced with a pure software solution like wackamole.

  2. Use proxy servers like squid to send the "other" files. They're largely static. This is where 7/8ths of the work is done downloading to the client. Don't scrimp on getting these right.

  3. Use multiple, concurrent mod_wsgi/Django to create the -- rare -- piece of dynamic HTML based on DB queries. Be sure that mod_wsgi is in daemon mode so that you can have multiple Django servers available to Apache. Build as many of these as you need. They're all identical, all in parallel, and all shared by Wackamole.

  4. Use a single, fast database like MySQL for the few things that must come from a database. MySQL will make use of multiple cores on it's server, so it will scale reasonably well without you having to do anything other than buy memory. Put this on a separate box, all by itself, dedicated and tuned for just this.

You'll find that this scales nicely. You'll find that the load is shared nicely between squid, apache, the Django daemons and the actual database. You'll also find that each part of the load (from the boring static parts to the interesting database query) happens separately and concurrently.

Finally, buy Schlossnagle's book.

by anonymous   2019-07-21

Under a certain point of view, scaling techniques are quite accepted and consolidated. So instead on relying on web links/articles, I'd read books on the topic before starting the probject.

I suggest:

  • "Scalable Internet Architectures" -
  • "The Art of Scalability" -
  • "Art of capacity Planning" -
by jqp   2017-08-19
John Allspaw's books are great. I'd recommend these also:

The Art of Scalability

Scalable Internet Architectures

Enterprise Cloud Computing

by pistoriusp   2017-08-19
Scalable Internet Architectures by Theo Schlossnagle was a good introduction for me.

by rosariom   2017-08-19

I think this is a hard one without working on a big project with senior people. I struggled with this for years and still do but have gotten a little better thanks to senior developers guiding me. I think besides reading books and attending lectures or listening in on talks online, I think you need to find a problem sizable enough and build it from scratch. My work with senior guys has shown me that designing on paper and the white board is essential to tackling the problem for understanding and eventually building it. The patterns will reveal themselves as you go through this exercise if any patterns are needed at all, and I think this is something you definitely will not learn overnight but overtime by getting your hands dirty. If you have not visited this site, please do so. It has tons of experts speaking on it. I have been able to incorporate some of what I have learned from here to the job. A quick link to how YouTube was built:

Really good talk with lots of jewels. Another good book for you:

Hope this helps.