A better link to the myspace story. And some notes:

  • The site was tested in Perl and mysql, launched in ColdFusion (!) and Microsoft SQL.
  • Friendster started having problems in 2003 (30 sec loadtimes), when Myspace launched. Good timing.
  • The network effects (users inviting other users) started to kick in about 8 months after launch (and never stopped).
  • Every profile page displays data from multiple users, hence multiple db lookups need to be used and you can't cache too easily.
  • 5 major architecture revisions.
  • When they hit 100,000s of users in 2004 and then millions of users in 2005, lots of re-architecting was needed.
  • Since 7 million users in early 2005, the architecture has been roughly the same.
  • At 500,000 users (early 2004), the single db couldn't handle the load anymore. That sounds about right.
  • They did vertical partioning (different databases for different parts of the site), but that never lasts long. Flickr uses horizontal partioning, much better.
  • After the vertical partioning, they didn't want to do all the code rewriting involved in horizontal partitioning, and decided to just get more expensive database servers. But they ended up being way too expensive for the power you get.
  • Finally,  they started to chunck their tables in chuncks of 1 million users.
  • There was still a single database that contains the user name and password credentials for all users.
  • We are early 2005 so far.
  • They switched from Coldfusion to asp.net
  • Their architecture meant that some servers where very busy and others not. 2 people full-time redistributed data between servers.
  • Spring 2005: 17 million accounts. They added caching (way too late).



# May 1, 2007