LiveJournal Architecture
Mon, 07/09/2007 - 16:57 — Todd Hoff
A fascinating and detailed story of how LiveJournal evolved their system to scale. LiveJournal was an early player in the free blog service race and faced issues from quickly adding a large number of users. Blog posts come fast and furious which causes a lot of writes and writes are particularly hard to scale. Understanding how LiveJournal faced their scaling problems will help any aspiring website builder.
Site: http://www.livejournal.com/
Information Sources
Google Video
Tokyo Video
2005 version
Platform
LinuxMySql
Perl
Memcached
MogileFS
Apache
What's Inside?
Scaling from 1, 2, and 4 hosts to cluster of servers.Avoid single points of failure.
Using MySQL replication only takes you so far.
Becoming IO bound kills scaling.
Spread out writes and reads for more parallelism.
You can't keep adding read slaves and scale.
Shard storage approach, using DRBD , for maximal throughput. Allocate shards based on roles.
Caching to improve performance with memcached. Two-level hashing to distributed RAM.
Perlbal for web load balancing.
MogileFS, a distributed file system, for parallelism.
TheSchwartz and Gearman for distributed job queuing to do more work in parallel.
Solving persistent connection problems.