Slashdot Mirror


Scaling Facebook To 140 Million Users

1sockchuck writes "Facebook now has 140 million users, and in recent weeks has been adding 600,000 new users a day. To keep pace with that growth, the Facebook engineering team has been tweaking its use of memcached, and says it can now handle 200,000 UDP requests per second. Facebook has detailed its refinements to memcached, which it hopes will be included in the official memcached repository. For now, their changes have been released to github."

14 of 178 comments (clear)

  1. Re:I have been wondering for a while... by larry+bagina · · Score: 5, Informative

    Myspace used to run on cold fusion but switched to .NET. facebook runs on LAMP, though they have a customized MySQL and a customized linux kernel with support for the hierarchial page pinning algorithm.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  2. Re:The problem of Facebook by clone53421 · · Score: 2, Informative

    Yes, you can delete your account... not sure if Facebook purges the data from their servers, but it shouldn't be accessible to anyone else after you delete your profile.

    You can also set it so that only certain groups of people (or no one at all) can see your profile, customizable on an item-by-item basis (including various things like phone, address, profile picture, status, birthday, birth year, friends list, bio, wall posts, videos, pictures) and/or comment on your wall, pictures/videos, or send you messages.

    You can also tell it not to let search engines like Google find your profile, which I'd also recommend.

    Actually, if you really want to play with it, I'd recommend that you register under a fake name and fool around with the security settings. If you're satisfied that it's private enough for your tastes you can put your real name and info up.

    --
    Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
  3. Re:Business plan? by clone53421 · · Score: 2, Informative

    Advertising, I assume.

    --
    Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
  4. Re:Wow by madhurms · · Score: 5, Informative

    From hardware perspective, Facebook uses 10,000 web servers and 1800 database servers to handle the massive traffic.

  5. Re:I have been wondering for a while... by duguk · · Score: 4, Informative

    Nope. Facebook has more unique visitors per month, MySpace had approximately 106 millions users as of 8th September 2008, and FTFS, facebook has 140 million (Wikipedia says 120 million.)

  6. Re:[Unintelligible] Facebook [Unintelligible] by CannonballHead · · Score: 2, Informative

    I could be wrong, but I think that's two words. :)

  7. Re:Wow by madhurms · · Score: 5, Informative

    And they also use about 200 memcached servers to speed things up.

    Source: http://frro.net/blog/2008/04/26/just-how-big-is-facebooks-infrastructure/

  8. Re:Blaming Linux... by blitzkrieg3 · · Score: 3, Informative

    2. If you'd read the next sentence right after your bold line, you'd notice they were talking about a kernel lock. Not a lock in memcached. Thats a totally valid reason to blame linux.

    How do you hope to architect a fix for this? Thought I don't know the specifics, they said that they were using the same UDP socket to transmit from multiple threads. That means you have one kernel space data structure across the entire UDP/IP stack being shared by multiple threads. Therefore you need a lock around updates to that data structure.

    Until we see some atomic sendto() operations this is not going to change.

  9. Re:Thank goodness by Coopa · · Score: 3, Informative

    I recently had trouble with my copy of Firefox on my home desktop. Even though adblock and filterset updater were installed i wasn't blocking any ads (i've since fixed it).

    I was amazed at how many sites i regularly frequent that are now plastered in ads and horrible to use.

  10. Re:Pretty impressive operation - NOT! by Anonymous Coward · · Score: 1, Informative

    I don't know the details of the 3 other problems, but using separate udp sockets for replies to break up low level contention is straight out of unp - off the top of my head I've used it on at least 2 projects on solaris. Doesn't sound like a linux problem to my way of thinking.

  11. Re:[Unintelligible] Facebook [Unintelligible] by Anonymous Coward · · Score: 1, Informative

    It's not incorrect:
    http://en.wikipedia.org/wiki/American_and_British_English_differences#Numbers

  12. Re:Blaming Linux... by Chirs · · Score: 3, Informative

    Mutexes aren't always slow. In the uncontended case they don't require a system call (although they do require an atomic operation which involves some inter-processor signalling).

    Lockless algorithms are generally harder to get right, from what I've seen. It's not just locking the cpus for a cycle, but you also need to worry about using memory barriers (generally written in assembly) to enforce correct visibility across all cpus in the system.

    There are guys on comp.programming.threads that spend a *lot* of time trying to perfect them, and there are often subtle errors that pop up later on. Given the number of problems that regular lock-based algorithms cause, I'd only use lockless if it's absolutely necessary.

  13. Re:Wow by Anonymous Coward · · Score: 1, Informative

    If you'd RTFA, you'd see it says: We use more than 800 servers supplying over 28 terabytes of memory to our users.

    http://www.facebook.com/note.php?note_id=39391378919&id=9445547199&index=0

  14. Re:[Unintelligible] Facebook [Unintelligible] by iNaya · · Score: 2, Informative

    Five words in correct English you insenstive clod! The only time I hear those numbers without "and" in them is when I hear American being spoken.

    --
    The Unicode standard is over 20 years old. Why does Slashdot not support it?