
How Facebook Copes with Scale: Three Approaches - Katydid
http://www.theplatform.net/2015/09/18/three-secrets-of-how-facebook-copes-with-scale/
======
merb
I always wondered how much power could be saved if those platforms would be
implemented nearer to the metal. I mean I don't want to flame PHP, etc.. but I
think running at the scale of Facebook it will definitely matter which
language you use, especially in the matter of computing power, I mean Facebook
could throw enough people at anything so the choice of language shouldn't be a
problem.

That's why I don't get it, why they wrote Hack/etc. When I would be Facebook I
would've tried to write something like JPHP where PHP could run on top of the
JVM, since that introduces way more languages like Scala, Groovy, Java itself.
However they gone from PHP to their self hosted language where it will even be
hard to find developers when Hack won't grow.

~~~
gt565k
Check out whats app's architecture

"Our results have demonstrated the fantastic scalability of Erlang, and in
this talk we will share some of the discoveries and modifications we have made
along the path to supporting millions of connected users per server. "

[https://vimeo.com/44312354](https://vimeo.com/44312354)

Some of the speculations about why facebook bought them is their architecture
build on top of Erlang

~~~
simonw
Facebook Chat was originally written in Erlang:
[https://www.facebook.com/notes/facebook-engineering/chat-
sta...](https://www.facebook.com/notes/facebook-engineering/chat-stability-
and-scalability/51412338919) \- but they ended up switching it from Erlang to
C++: [https://www.quora.com/When-did-Facebook-switch-away-from-
usi...](https://www.quora.com/When-did-Facebook-switch-away-from-using-Erlang-
for-Facebook-Chat)

------
adamnemecek
Good thing that those graphs have the y-axis labeled.

------
ckluis
40 PB a day for photos...

~~~
mikegioia
This is the part that I have trouble wrapping my head around. If you're
_adding_ 40 PB of photos per day, and if you can somehow get say $0.01/GB [1]
then that's adding $400,000 per day in storage costs.

Facebook doesn't/can't/won't delete photos so how on earth is this
sustainable? After 10-20 years wouldn't hosting costs just be too high to
function?

[1] Aaverage cost per GB in 2014 was $0.03:
[http://www.statisticbrain.com/average-cost-of-hard-drive-
sto...](http://www.statisticbrain.com/average-cost-of-hard-drive-storage/)

~~~
daigoba66
At scale it must get cheaper. For example AWS Glacier is only $0.007 per GB
ignoring bandwidth.

~~~
ra1n85
Glacier wouldn't fit this model, as it's based on access frequency and not
storage volume.

------
ape4
Just a now on facebook I clicked on a friend's name (a link) and after waiting
about a minute I gave up. But I am not going to complain (to them) since its
free.

~~~
brozak
"free"

