Member-only story

Interesting history on scaling PHP and the birth of HHVM and Hack

Matt Glaman
3 min readAug 16, 2019

Keith Adams was on Software Engineering Daily to discuss his time at Facebook and their usage PHP. Keith Adams spent six years at Facebook and is now at Slack. What makes Facebook interesting is that they opted to make PHP scale rather than deconstructing Facebook into many different microservices (at that time.) What I did not also realize is that Slack is a PHP application as well — as Keith Adams wrote in his Taking PHP Seriously article in 2016.

When HipHop, HHVM, and advances in PHP7 were coming around I was not following all of the buzz very closely. By the time I had entered the realm of web development it was already 2012 and much of this was already underway. I ended up learning about HipHop, HHVM, and Hack as after the fact events as I attemped to track the development of PHP7.

One of the biggest problems within Facebook with PHP was CPU burn. PHP runs on a single thread for each web server request. This required a lot of CPU and made the application feel sluggish. Back in 2009, Facebook still was figuring out how it would monetize its platform. This is back when they unveiled the autocomplete feature for search when autocomplete suggestions used to “wow” and amaze us all. Remember when Facebook experimented with virtual gifts? And when games on Facebook were huge (we all had family playing Farmville.) Facebook was still in need of having to find out where money was coming from and it was aware of where it was going — to hardware.

--

--

Matt Glaman
Matt Glaman

Written by Matt Glaman

PHP software engineer, open source contributor, and speaker

No responses yet