BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Presentation: Facebook: Science and the Social Graph

by Abel Avram on Mar 26, 2009 | NOTICE: The next QCon is in San Francisco Nov 3-7, Join us!

In this presentation filmed during QCon SF 2008, Aditya Agarwal discusses Facebook’s architecture, more exactly the software stack used, presenting the advantages and disadvantages of its major components: LAMP (PHP, MySQL), Memcache, Thrift, Scribe.

Watch: Facebook: Science and the Social Graph (1h)

Facebook is using LAMP stack (Linux, Apache, MySQL, PHP) plus Memcache to run their web servers. The scripting language of choice is PHP. Beside those, there are a number of services: AdServer, Search, Network Selector, News Feed, Blogfeeds, CSSParser, Mobile, ShareScraper. The services are built using a common framework made of Thrift and Scribe, plus some tools: SMC, ODS. The resulting numbers are impressive: 120M+ users, 50B+ page views per month, 50K+ applications and 400K+ developers for those applications.

Agarwal explains why they are using MySQL, PHP, Memcache, Thrift, their strengths and their weaknesses. He also shares lessons learned along the way. For example, PHP has an extensive library support for web development and works well for rapid iterations, but it does not scale well for large code bases. The extension framework is so difficult to use that developers usually avoid it. Among the advantages of using MySQL, Agarwal mentions speed and reliability. He said that Facebook hasn’t lost any data yet.

Agarwal also explains the process of servicing a page request, a feed and a search. He also answers many questions from the audience.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Download the presentation by Steve Tirtha

Hi,

can I download the presentation somewhere?

Steve

Re: Download the presentation by Dinh Pham

Re: Download the presentation by Dinh Pham

Or you can install Real Player. It will allow you to download all the slides in a bunch

hmm. by Ivan L

telling me php doesn't scale is like telling me java supports oo programming. five minutes of looking at that language told me that. the db stuff was slightly more interesting - more evidence as to the death of the traditional rdbms but in the end not that surprising. anything of facebooks scale can't support traditional clustering and has to drop to partitioning of some kind.

their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers"

Re: hmm. by Max Indelicato

"their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers""

This sounds to me like the a critique by someone who is afraid to move beyond their comfort zone.

Re: hmm. by Dan Creswell

"their platform sounds like a mess of a variety of languages. "right language for the task" sounds to me like a euphemism for "i can't really control my vastly more experienced developers""

This sounds to me like the a critique by someone who is afraid to move beyond their comfort zone.


Dunno about that but would note that Amazon also use a variety of languages and it's encouraged - Vogels says:

"You build a small team. You give them this problem. And at Amazon, they're allowed to solve that problem in any way they see fit, as long as it is through this hardened API. They can pick the tools they want. They can do any design methodology they want as long as they deliver the actual functionality that they've been tasked with......We have some requirements: that services has to be monitorable, that they have to be tractable in all sorts of different ways. But in essence, operation is all up to the service owners themselves. This allows for a large-let's say controlled chaos-which actually works very well because everybody's responsible for their own services."

Re: Download the presentation by Brian Wood

Hi Dinh,

Your link goes to one particular slide (6.swf). I can get to the others by editing the url, but is the a starting page, or a way to download all of the slides at once?

Thanks for posting this presentation.

Brian

Nice presentation by benny rio

seems like implementing SOA at lower level, great idea

Back to the future by Adrien Delorme

"[...]the other reason we use php apart from the fact that we started of on it[...]"

With this phrase I just would like to ask, what would you use if you could go back to the very beginning of Facebook with the nowadays advances ?

Java, Php, Ruby, Python etc. ?
Rails, Zend, Symfony, your framework, reinventing the wheel etc. ?

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

9 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT