Scaling Facebook Chat to 70 Million Active Users Almost Overnight
facebook.com
facebook.com
Even if Facebook isn't using XMPP per-say, they have full access to its implementations and source code for internal use for sure.
Granted, Facebook _does_ have the "slight" challenge of having 70 million active users; in light of which near everyone else's IM/XMPP networks are a mere pittance; but the core framework and algorithms are wholly addressed and implemented in XMPP standard.
It's one thing to make a more-efficient implementation of an already-existing standard that scales damn decently verses _designing_ a whole new system to serve their needs.
Note that the article doesn't once mention XMPP though.
So it's only natural that the article doesn't mention XMPP.
deploy your application to glassfish and let your AS scale it
Did I miss it, or does the note not mention how they actually implemented the notification?
Maybe he just means all friends whether they are logged in or not?
"The secret for going from zero to seventy million users overnight is to avoid doing it all in one fell swoop. We chose to simulate the impact of many real users hitting many machines by means of a "dark launch" period in which Facebook pages would make connections to the chat servers, query for presence information and simulate message sends without a single UI element drawn on the page. With the "dark launch" bugs fixed, we hope that you enjoy Facebook Chat now that the UI lights have been turned on"
Oh, they spilled the beans on using Erlang two weeks ago:
Also, I'd never heard of doing a "dark launch" before, but it sounds like a fantastic way to get early feedback from users.
They did roll out the UI over the course of several hours though.
first time i have heard a company mention, publicly, about pushing features behind the scenes and testing in realtime. ajax makes this functionality possible nowadays.
good job facebook.
The world really doesn't need another proprietary chat standard, especially one that locks people into a website.
The information wasn't incredibly in-depth but it's very cool and useful nonetheless to read about implementations like this on such a large scale. The chances of me ever creating something with the scale and resources that FB requires is pretty slim, but it's gratifying to know I've at least got a rough idea of some good ways to do it.
Now, if we could just get Twitter to do the same, perhaps someone could give them a few pointers... ;)
"Did I miss it, or does the note not mention how they actually implemented the notification?"
No, it doesn't go over that implementation, though it piqued my curiosity nonetheless. I would assume it's a time-based check on status rather than a real-time representation.
So say they have every active user on at the same time (70million), and say they have 10,000 servers. That's only 7k users per server??? Not great IMHO
Maybe if they only had 1,000 servers, then it'd be a little more impressive.
60,000 servers? Jesus christ. Are they planning to scale to take account of Alien users or something?
If they are intending to have 60K servers, they better keep a slug of that cash around to pay the electric bill!
So how many servers do you need to replace the entire Web? 60,000 doesn't sound like enough.
Erlang does a lot of the heavy lifting but even if it did everything out of the box (and it didn't), gluing it all together is no small feat.
AIM, Bonjour, Gadu-Gadu, Google Talk, GroupWise, ICQ, IRC, MSN, QQ, SILC, SIMPLE, SameTime, XMPP, Yahoo, this is a solved problem.
As for the dark launch thing, it is a fancy trick, but there are ways of doing load testing in an automated system by having test servers simulate the load from real users. This usually can give you much better data without wasting bandwidth, slowing down users' experiences, etc.
They had a problem, they solved it in a very cool fashion using the best tool for the job (Erlang), they thought of a very good way of testing the application, and they were gracious enough to share their experiences with us, other developers...
Seems like a win all around, so I'm not going to complain.