Operations 9 min read

Facebook Configurator: Managing Configuration as Code, Validation, Distribution, and Safety

The article explains Facebook's Configurator system, which treats configuration as code, uses Thrift schemas and Python scripts, provides version control, validation, automated canary testing, UI editing, and a robust distribution pipeline to prevent configuration errors across large‑scale services.

Continuous Delivery 2.0
Continuous Delivery 2.0
Continuous Delivery 2.0
Facebook Configurator: Managing Configuration as Code, Validation, Distribution, and Safety

This article, part of a Facebook Research series, introduces Facebook's configuration‑management ecosystem, which supports scenarios such as new feature flags, experiments, traffic control, topology settings, monitoring, machine‑learning model updates, and internal application behavior.

The toolset includes Configurator (providing version control, authoring, code review, automated canary testing, and distribution), Gatekeeper (controlling rollout of new features), Package Vessel (distributing large binary configs), and Sitevars (a shim for PHP front‑end products).

Configurator addresses three core challenges: configuration authoring, error prevention, and large‑scale distribution.

Facebook adopts the principle "configuration is code"; engineers write configuration code in Python and Thrift. Example files such as create_job.cinc , cache_job.cconf , and job.thrift-cvalidator generate JSON configurations that are stored in Git and can also be edited via a Web UI or API.

Modular configuration code (e.g., the reusable create_job.cinc module) enables multiple teams—scheduler, cache, and security—to generate their specific job configurations while sharing common schemas defined in job.thrift .

Maintaining configuration code is easier than editing raw JSON because dependencies can be expressed with Python imports; a Dependency Service automatically extracts relationships, recompiles affected files when a change occurs, and commits the resulting JSON files atomically.

For simple configurations, Configurator offers a UI layer; Sitevars adds a thin key‑value layer for PHP products, allowing engineers to edit values directly and optionally attach a PHP‑based checker to enforce invariants.

To prevent configuration errors, Facebook employs a multi‑layered approach: configuration validators, code review, manual testing, automated integration tests, and automated canary (gray) testing. Engineers can temporarily deploy a new config to a subset of servers, run comprehensive tests in the Sandcastle sandbox, review results in Phabricator, and, after approval, promote the change through the Canary Service to production.

pythonconfiguration managementDevOpsversion controlThriftcanary-testingcode-as-configuration
Continuous Delivery 2.0
Written by

Continuous Delivery 2.0

Tech and case studies on organizational management, team management, and engineering efficiency

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.