RailsConf2007: Scaling Twitter

3日目よかったのは、Twitter の中の人 Britt Selvitelle と Alex Payne による Scaling Twitter
4月の話 からアップデートもあり、より突っ込んだ話が聞けた。
まずは、ハードウェア構成について。

  • Mongrel across 19 cores
  • Message processing/delivery across 16 cores
  • Jabber across 2 cores
  • MySQL on one big 8 core box
  • 16GB+ for memcache across a bunch of machines
  • 32 cores total

意外にマシン数は多くない。
負荷の状況について。

  • 200 - 300 connections per second
  • Spiking at 800 connections per second
  • We've done 11,000 connections per second
  • MySQL has spiked to 2,400 quieries per second

負荷対策はとにかく memcached で、acts_as_cached を使ってるらしい。
あと、ruby で書いた分散キューシステムで書き込みをしていて、キューは memcached に載せてるのだとか。このあたり、memcached が落ちたらデータがなくなるとか考えないところがおもしろい。
http://www.slideshare.net/al3x/scaling-twitter-railsconf-2007
http://bostonsteamer.livejournal.com/875052.html