Live data from Hacker News

Is it possible to host Facebook on AWS?

blog.sqlizer.io

31–40 of 164 posts

Re: Is it possible to host Facebook on AWS?

#31
Since we're guesstimating numbers a lot, it would be interesting to also guesstimate the human resources costs required to run the infrastructure: X electrical engineers, Y cooling engineers, Z SREs, W infrastructure devops ppls, etc.

Using the cloud you don't need X,Y,Z and presumably will need less of W. Assuming a 100+k/year salary, that's like 200+k/year total cost of employment. If X+Y+Z-ΔW ~= 1000, then the cloud provides a 200M savings on that front. The real number is probably 2x 3x higher, but I'm not going to bother going back and updating the guesstimates.

Re: Is it possible to host Facebook on AWS?

#32
post #17
post #15

Earlier quoted context omitted.

That's exactly why only a fool will use reactjs in their web design, because FB will put you out of business and if you sue them for infringing your patents, your reactjs license is revoked

I didn't know this, this needs to be more well known. How does this affect libraries like preact?

It's not accurate. Facebook offers a blanket patent license with React, and the patent license (not the software license — just the patent one) terminates if you sue Facebook for patent infringement. And of course, if you sue them for any other reason, nothing happens at all. And even if the patent license is terminated, AFAIK React isn't known to be patent-encumbered.

Acting like this is some landmine that allows Facebook to just put anyone they dislike out of business is ridiculous. Other JavaScript frameworks like Angular and Ember don't even include patent clauses, so even if Facebook revokes the patent grant, that leaves you in the same position that you're in by default with Angular. The license even specifically allows you to counter-sue Facebook if they already have a lawsuit against you.

Re: Is it possible to host Facebook on AWS?

#33
post #15
post #9

Earlier quoted context omitted.

I suppose the reason Facebook doesn't resell their infrastructure is because their endgame is to _be_ the internet. From their point of view, any site you're on that isn't Facebook is their competition.

That's exactly why only a fool will use reactjs in their web design, because FB will put you out of business and if you sue them for infringing your patents, your reactjs license is revoked

I see lots of down voting on this person, but not many replies. Is there truth to this comment? Is React licensing something companies should avoid?

Re: Is it possible to host Facebook on AWS?

#34

Reddit and Netflix are hosted on AWS so yes you could. You wouldn't run it the same as if you had your own infrastructure though, and probably you would run it more horizontal and cached but it could be done much cheaper than this estimate. On your own environments you can use larger servers, dbs and sharding or clustering is closer. But the cloud is different and you'd be able to run it but differently. The cloud de…

> Reddit and Netflix are hosted on AWS so yes you could. Those are read-heavy properties (yes, even Reddit, a miracle of aggressive caching). Don't underestimate Facebook's write load, which is the bloody difficult thing to scale.

Not sure if I buy that Reddit is read-heavy compared to Facebook, got any data on that?

Re: Is it possible to host Facebook on AWS?

#35

I think a lot of the smaller details this article glosses over contribute to FB's ability to run on so few machines. For example, comparing my anecdotes of FB's internal network (they probably have the most organized/mature IPv6 network on the planet) with those of my AWS public cloud experience, I'd reckon that a lot of FB applications would require architectural redesigns to operate in that kind of environment. The…

> The real question isn't "can FB be hosted on AWS?", it's "why isn't FB competing with AWS?" because what they've already got is much better for the range of applications that they deploy. This. When they bought Parse I thought for sure they would get into the same business as AWS / Azure / etc but then they phased it out. Their have so much network infrastructure I thought for sure they would want to offer such ser…

Interestingly, Parse was hosted on AWS until the very end even after being bought by Facebook.

Re: Is it possible to host Facebook on AWS?

#36
post #5
post #2

> If we take the 2012 estimate to be true, Facebook’s server capacity outstrips Moore’s Law. As well as inflation, and all manner of other totally irrelevant concepts.

It could be relevant if there is some fixed refresh cycle of servers. That is, newer servers can serve more end users because of the faster cpu, drives, etc. The author seems to have skipped the concept though.

Yeah, I looked through the article, but never does he mention that one rack of today's server vintage might have an extra order of magnitude more RAM, if not cores, than one from 5 years ago.

Ten years ago, four-core Barcelona Opterons were so hot and in high demand that, if you wanted to be on the latest servers, you had to show a performance boost worth the premium. Sometime this year you'll be able to buy dual processor Naples systems with 64 cores (128 threads).

Re: Is it possible to host Facebook on AWS?

#37
post #9

Earlier quoted context omitted.

I suppose the reason Facebook doesn't resell their infrastructure is because their endgame is to _be_ the internet. From their point of view, any site you're on that isn't Facebook is their competition.

FB open sourced their infrastructure. Anyone can lift these designs and build their data centers using identical specs. http://www.opencompute.org/wiki/Server/SpecsAndDesigns

...which gives you a moderately-expensive pile of laser-focused hardware and nothing to run on it. Far less than half the infrastructure story.

(Not that I'm criticizing Facebook. Open-sourcing code is hard -- see Borg.)

Re: Is it possible to host Facebook on AWS?

#38
post #34

Earlier quoted context omitted.

> Reddit and Netflix are hosted on AWS so yes you could. Those are read-heavy properties (yes, even Reddit, a miracle of aggressive caching). Don't underestimate Facebook's write load, which is the bloody difficult thing to scale.

Not sure if I buy that Reddit is read-heavy compared to Facebook, got any data on that?

No comparison -- I wouldn't buy that either. Just saying they're an eyeball property, with a somewhat moderate write load all things considered. Many billions of page views versus their ~millions DAUs is my gut feeling there, since there are probably far more people reading threads off of Akamai than interacting.

Little bit (somewhat outdated) here: http://highscalability.com/blog/2013/8/26/reddit-lessons-lea...

Re: Is it possible to host Facebook on AWS?

#39
post #14

Earlier quoted context omitted.

I imagine the lifetime savings of having a backend in Go is dwarfed by the one-time cost of such a migration. That's why they invented Hack and HHVM in the first place -- it was a cheap-enough compromise that didn't require rewriting the whole code base.

IIRC, Facebook uses (their derivative of) PHP to collect data from a number of services in different languages over Thrift, which they developed. PHP is the presentation layer. Much of the actual logic is in C++, Java, and maybe even Go by now.

(Former Facebook employee)

The VAST majority of online serving code at Facebook is written in Hack (PHP) and is part of a gigantic codebase called fbwww. Backend services that do heavy lifting (mostly search, feed ranking, ad matching, TAO, various caches, proxies, etc) are fairly light on business logic and written in C++.

It isn't a microservices architecture at all: they only move stuff to C++ for latency and efficiency reasons. For instance most of the ad stack is written in Hack, but certain key pieces use C++ for better performance. I'm not aware of any Java or Go code that is part of the online serving stack.

Re: Is it possible to host Facebook on AWS?

#40
post #24

I think a lot of the smaller details this article glosses over contribute to FB's ability to run on so few machines. For example, comparing my anecdotes of FB's internal network (they probably have the most organized/mature IPv6 network on the planet) with those of my AWS public cloud experience, I'd reckon that a lot of FB applications would require architectural redesigns to operate in that kind of environment. The…

One of the big things it glosses over is core counts... counting "servers" ignores that AWS has current-gen instance families with as few as 32 VCPUs in their largest instance type versus 128 VCPUs in the x1 family. If you look at multiple generations of families the difference between "servers" becomes even more stark.

PleSe expand on this
Post reply on HN