Live data from Hacker News

How Facebook pushes updates to the site

facebook.com

31–40 of 43 posts

Re: How Facebook pushes updates to the site

#31
post #17
post #2

So facebook is programed in PHP but everything on the server is in C++ thanks to "hiphop"? mind=blown

PHP is actually one of the slowest mainstream interpreted languages. At Facebook levels of scale, that becomes a serious problem.

It doesn't even take a billion hits. I'd say it's a problem as soon as you scale to a couple dozen servers. At that point you're wasting enough money running extra cores that you could have hired another dev instead. We picked up something like 6x web frontend performance by doing a pretty straightforward if tedious Java port (64-bit Sun JVM), and it also put us in a position to start using NIO (with Netty) much more heavily.

Re: How Facebook pushes updates to the site

#32
post #17

Earlier quoted context omitted.

PHP is actually one of the slowest mainstream interpreted languages. At Facebook levels of scale, that becomes a serious problem.

It doesn't even take a billion hits. I'd say it's a problem as soon as you scale to a couple dozen servers. At that point you're wasting enough money running extra cores that you could have hired another dev instead. We picked up something like 6x web frontend performance by doing a pretty straightforward if tedious Java port (64-bit Sun JVM), and it also put us in a position to start using NIO (with Netty) much more…

Interesting, thanks. I don't have experience running PHP apps beyond a few servers, and the database was always the bottleneck.

Re: How Facebook pushes updates to the site

#34
Anyone know of a more automated system to handle forward/backward compatibility? Obviously, there's a lot of manual coding work that has to be done but is there a system that categorizes these various changes (schema or new URL for a page or change in backend service interface), automatically tracks and gets rid of these dependencies after a certain period of time? To give a concrete example, let's say I switched the Facebook messages URL to "/mail" from "/messages". I would mark the old handler as deprecated and eventually, after the new changes have been pushed to everyone, the system will prompt the developer to get rid of essentially the dead code. This is a very simplified example but I believe such deprecation tracking would be useful for more complex changes too.

Re: How Facebook pushes updates to the site

#39
post #29
post #28

This is how I push updates for now: git pull lein uberjar sudo restart myprj

I like git push web http://toroid.org/ams/git-website-howto

Fabric is a nice tool for automating deployments: http://docs.fabfile.org/en/1.0.1/index.html

For example:

    fab production deploy
or:

    fab web-servers deploy
    fab database backup
.. etc.

Re: How Facebook pushes updates to the site

#40
post #9

It's interesting that their entire release architecture seems to be focused on never pushing bad things out to production, whereas given their traffic they could probably push things out much sooner (minutes after they're committed) to small parts of their overall traffic, and slowly increase the traffic on those pieces of code as they prove themselves to be stable, or quickly revert them if they're not. That would m…

You have to remember that facebook is a compiled binary (hiphop). They entered the release cycle they did vs true Continuous Integration because original compilation times for this binary were extreme. Pretty sure Chuck mentioned something in the range of 1gb binary. They've corrected the amount of time it takes to compile and can push within 15 minutes of a trunk merge, but it's stil not on the scale of a few lines here, a few lines there.
Post reply on HN