Menu
Facebook uses a seasoned Chef to keep servers simmering

Facebook uses a seasoned Chef to keep servers simmering

Facebook found that the Chef configuration management system was best suited to controlling the company's massive infrastructure

When it comes to keeping its thousands of servers running smoothly, Facebook relies on the open source Chef configuration manager, modified slightly to handle the size of the social networking giant's huge infrastructure.

"Chef's biggest advantage for us is its flexibility," said Phil Dibowitz, a Facebook systems engineer.

Chef is one of a number of open source configuration management tools that have grown in popularity over the last few years.  As data centers grow ever larger, companies look to automate routine operations around deploying and upgrading servers, switches, OSes, databases and other components. Facebook's experience in managing its infrastructure may hold lessons for other organizations as well.  Facebook wanted "a new way to manage its systems," Dibowitz said.   Although Facebook does not reveal the total number of servers it runs, industry observers estimate it could be in the tens of thousands, at least. Surprisingly, the company only has a handful of employees -- four on latest count -- on the core infrastructure team, of which Dibowitz is a member. Prior to using Chef, Facebook had been using another open source configuration management package, called CFEngine. The deployment was growing increasingly unwieldy, however.  Using CFEngine version 2, Facebook was experiencing a rapid and unchecked proliferation of system control files.  With CFEngine, users could not edit a configuration management file directly. Instead, each time operations engineers needed to make a change to a system, they would copy a similar system file, make the necessary changes, and then submit the file back to CFEngine. "In doing so, they added a couple hundred lines of stale configuration," Dibowitz said. As a result, the infrastructure team did not know all the various configuration permutations it had on hand, or even which of the configuration settings were outdated. "It became really unsupportable," Dibowitz said. To look for a new open source configuration management system, the team ran a number of tests comparing Chef, Puppet, and Spine, which was developed by Ticketmaster.

Chef best fit the bill for a number of reasons, Dibowitz explained.

Chef offers great flexibility on how to write configuration changes, thanks in part to how it is based on Ruby, a full-fledged programming language that can be easy to learn for administrators and engineers.

"There's no limiting factor. You don't have to be in the Domain Specific Language [DSL] that CFEngine or Puppet gives you," Dibowitz said. "From there, we had a lot of power to do what we wanted."

Chef offered a number of other advantages as well. It could manage settings at a  much more granular level. It also offered more flexibility in how to manage the configuration files themselves, Dibowitz said.

Specifically, Chef provides the ability to modify a configuration file for a specific user.

"The database administrators, the Web foundation guys, the cache guys -- all these people can write just a little bit of code for just the settings they care about, and not have to worry about anything else," Dibowitz said.

For instance, if MySQL administrators need more memory for a database, they can just enter that single requirement into Chef. Any change made to a configuration file is then propagated across all of Facebook within minutes.

"If you make a change, it goes across the world in 30 minutes or less," Dibowitz said.

Giving line-of-business engineers this control, in turn, helps the core infrastructure team. "This allows us to do way more work with way fewer people," Dibowitz said.

Facebook, however, had to modify the way Chef handles out-of-date configuration changes. The software offers no easy way of automatically deleting changes when they are no longer needed. "This is not a comfortable thing to do when you are at the scale of hundreds of thousands of systems," Dibowitz said.

Typically, organizations use Chef by building their own "cookbooks," or list of configuration changes that Chef then applies to a system.

Facebook, however, took the process a step further. The company's engineers developed a set of templates for defining the defaults in each configuration file, calculating a numerical hash to match the original template.

Each time Chef runs a configuration file it can then use the hash value to delete all entries that have been designated as no longer needed.

It is an uncommon way of using Chef, Dibowitz admitted. This way of working with Chef does not require any additional tooling, though. "This is all stuff built into Chef, we're just using it differently," he said.

The company has rolled out Chef to manage all of its servers and is in the process to migrating other software and hardware onto Chef as well.

Facebook has also fed some of the code modifications it has made back to the company shepherding the Chef code base, also now called Chef, after changing its name from Opscode in December.

The engineers also wrote some additional open source utilities for Chef, some of which have been posted on GitHub. One such tool is called Grocery Delivery, which allows multiple Chef clusters to keep their cookbooks in sync. As a result of the code being on GitHub, others have contributed additional changes back to Facebook.

Perhaps most importantly for Facebook though, Chef allows system managers to have greater control of their own configurations, an approach that Dibowitz admitted has attracted some criticism, which he doesn't mind

"Our job at Facebook is to get out of the way of our engineers and let them do their jobs," Dibowitz said. "Our job is not only to make these systems reliable but also to give everyone the access they need to get their jobs done."

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

Follow Us

Join the New Zealand Reseller News newsletter!

Error: Please check your email address.

Tags softwareIT managementFacebook

Featured

Slideshows

Reseller News launches inaugural Hall of Fame lunch

Reseller News launches inaugural Hall of Fame lunch

Reseller News welcomed 2015 and 2016 inductees - Darryl Swann, Dave Rosenberg, Gary Bigwood, Keith Watson, Mike Hill and Scott Green - to the inaugural Reseller News Hall of Fame lunch, held at the French Cafe in Auckland. The inductees discussed how the channel can collectively work together to benefit New Zealand, the Kiwi skills shortage and the future of the industry. Photos by Maria Stefina.

Reseller News launches inaugural Hall of Fame lunch
Educating from the epicentre - Why distributors are the pulse checkers of the channel

Educating from the epicentre - Why distributors are the pulse checkers of the channel

​As the channel changes and industry voices deepen, the need for clarity and insight heightens. Market misconceptions talk of an “under pressure” distribution space, with competitors in that fateful “race for relevance” across New Zealand. Amidst the cliched assumptions however, distribution is once again showing its strength, as a force to be listened to, rather than questioned. Traditionally, the role was born out of a need for vendors and resellers to find one another, acting as a bridge between the testing lab and the marketplace. Yet despite new technologies and business approaches shaking the channel to its very core, distributors remain tied to the epicentre - providing the voice of reason amidst a seismic industry shift. In looking across both sides of the vendor and partner fences, the middle concept of the three-tier chain remains centrally placed to understand the metrics of two differing worlds, as the continual pulse checkers of the local channel. This exclusive Reseller News Roundtable, in association with Dicker Data and rhipe, examined the pivotal role of distribution in understanding the health of the channel, educating from the epicentre as the market transforms at a rapid rate.

Educating from the epicentre - Why distributors are the pulse checkers of the channel
Kiwi channel reunites as After Hours kicks off 2017

Kiwi channel reunites as After Hours kicks off 2017

After Hours made a welcome return to the channel social calendar last night, with a bumper crowd of distributors, vendors and resellers descending on The Jefferson in Auckland to kickstart 2017. Photos by Maria Stefina.

Kiwi channel reunites as After Hours kicks off 2017
Show Comments