A recent article on the Facebook release engineering team offers a lot to learn for young engineers. At times, I have felt that many developers are blinded about the processes followed by IT and operations teams after development and testing phase is over. This article helps in overcoming more of those blind spots and goes towards the DevOps movement.
Learnings to be taken :
1) Facebook uses PHP for most of its development as it reduces the development and ramping up time. This allows organic agility to the company to move fast. However, scripting languages tend to be less efficient with CPU cycles usage. To bridge this gap and to take the advantages of compiled languages, facebook has an automated code converter from PHP to C++ which they call HipHop. Read More about HipHop.
2) Facebook’s entire code can be compiled to a binary executable, 1.5 GB in size. Hence, during a release this entire binary is pushed to all the facebook servers.
3) Testing and Release : Facebook employs automated tests and regression to find bugs. The release takes place in two phases. In the first phase the code is released to some of the servers and exposed to a fraction of the user base.
Excerpt from the article :
” Facebook is designed to be stateless and distributed, in the sense that the user’s session isn’t tied to any particular server. Any given page request can be handled by any of the servers in Facebook’s infrastructure.
That approach offers a lot of resilience. When Facebook performs an update, it doesn’t have to worry about serializing and migrating the state of user sessions. ”
Hence, a deployment doesnt require any downtime of the prod servers.
4) Feedback Analytics : Facebook uses different metrics and compares historical data to make sure everything is working fine after a release. What was interesting to learn was that they also use twitter feeds to judge positive and negative sentiments of the users after a release.
Overall an interesting article on software engineering and provides a peek into the working of facebook.