Etsy borrows some HipHop help from Facebook

Etsy has moved from running PHP directly on the server to using Facebook's speedier open source PHP virtual machine

After borrowing Facebook open source code for running PHP programs more efficiently, Etsy won't need to grow its data center footprint this year, saving it from a significant expense.

By using Facebook's HHVM (HipHop Virtual Machine) software, Etsy doubled the work of each server, eliminating the need to purchase new servers this year, according to Dan Miller, an Etsy software engineer.

That also means Etsy can hold off on procuring extra data center space, which is even more costly than new servers, said Miller, who described Etsy's use of HHVM in greater detail in a blog post Monday.

With a user base of nearly 20 million, Etsy is a Web site devoted to selling craft items on behalf of more than a million merchants.

The site itself was built with PHP, a popular but somewhat chaotic Web programming language. As the company moved into the mobile space, it found its PHP-based codebase wasn't as well suited for serving mobile clients in addition to Web clients.

Miller led an effort to test Facebook's HHVM as an alternative to running PHP directly on its servers. Facebook created HHVM to speed up the execution of PHP code, which it needed to scale to serve its 1.4 billion users.

Using HHVM is superior to executing PHP natively in a number of ways, Miller said. HHVM recognizes when PHP code is being reused and can convert it into machine code to execute more quickly. "Now you can do the same thing with fewer CPU instructions than before," Miller said. The Facebook team also optimized the way PHP handled common functions, such as the handling of arrays.

In initial tests, Etsy had found that most of its existing PHP code could run on HHVM without modification. In fact, it found HHVM could run the PHP code twice as quickly. It quickly rolled out HHVM and now uses the software to run nearly all its user-facing services.

The only limitation that Etsy found is that some extensions to HHVM, such as those for interacting with databases or to serve as a caching layer, may not be as robust as HHVM itself. Many were written by Facebook engineers to add on to HHVM once it went open source. They weren't used in production by Facebook though, so they haven't been battle-hardened, Miller said.

Companies as large as Facebook find it necessary to build infrastructure software such as HHVM because they can't rely on "mainstream tools" to serve their massive client base, wrote IDC software development analyst Al Hilwa, in a new report on Facebook.

Releasing the software it developed in-house can help a company recruit top programming talent, as well as provide a way for the company's coders to show off their work, Hilwa noted.

Etsy is not the only large-scale Internet service to shift to HHVM. Online storage provider Box and Wordpress hosting provider WP Engine have both started using the technology as well.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags Internet-based applications and servicesapplication developmentLanguages and standardsEtsysoftwaresocial mediainternetFacebookDevelopment tools

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?