How Mozilla's Normandy System Updates Firefox Remotely
This article explores Mozilla's Normandy system, the backend infrastructure that allows the Firefox web browser to receive configuration changes, feature toggles, and critical hotfixes without requiring a full software update. It breaks down what Normandy is, the client-server mechanics of its recipe-based architecture, how it targets specific user groups, and the security measures in place to protect user privacy and control.
What is the Normandy System?
Normandy is a remote configuration and experimentation system built directly into Firefox. Historically, if Mozilla wanted to enable a hidden feature, run an A/B test, or fix a minor configuration bug, engineers had to compile, test, and distribute a complete browser update to hundreds of millions of users.
Normandy eliminates this bottleneck by decoupling configuration management from the standard software release cycle. It allows Mozilla to dynamically alter the behavior of Firefox installations already deployed in the field in near real-time.
How Normandy Works: Recipes and Actions
The Normandy system operates on a client-server architecture. The Normandy server hosts a collection of instructions known as "recipes," while the Normandy client (referred to internally in Firefox as the Shield Recipe Client) is built into the browser itself.
Every few hours, Firefox connects to the Normandy server and downloads a list of active recipes. A recipe is a lightweight JSON file containing three primary components:
- The Filter Expression: Criteria determining which browsers should run the recipe.
- The Action: The specific task the browser needs to perform.
- The Arguments: The exact data or settings required to complete the action.
Local Targeting and Filtering
Mozilla rarely applies a configuration change to every Firefox user simultaneously. Instead, Normandy uses client-side filtering to target specific demographics without compromising user privacy.
Recipes include filter expressions written in JEXL (JavaScript Expression Language). When Firefox downloads a recipe, it evaluates the JEXL expression locally against the browser's own environment. The client checks variables such as:
- Firefox version and update channel (Release, Beta, Nightly).
- Operating system and hardware architecture.
- Geographic region and language locale.
- Existing preference states.
Because this evaluation happens entirely on the user's device, Firefox does not need to send private system profiling data to Mozilla's servers to determine if it qualifies for an update. If the local environment matches the recipe's criteria, Firefox executes the action.
Rolling Out Changes Without a Full Update
Normandy bypasses the need for full browser updates by manipulating mechanisms that already exist within Firefox. When a recipe's filter matches a user's browser, it triggers one of several built-in actions:
1. Preference Rollouts and Rollbacks
Much of Firefox's functionality is governed by preferences found in
the about:config menu. Mozilla frequently ships new
features in a dormant state (switched to false) within a
standard browser update. Using Normandy, Mozilla can send a recipe to
flip that preference to true, instantly activating the
feature without downloading new code. Conversely, if a newly activated
feature causes stability issues, Mozilla can update the recipe to flip
the preference back to false, disabling the broken feature
globally within hours.
2. System Add-on Deployment
Firefox uses "System Add-ons" to modularize certain browser features. Normandy can instruct Firefox to silently download and install a specific add-on from Mozilla’s servers. This allows engineers to ship actual code fixes—referred to as hotfixes—to patch critical bugs or security flaws immediately, rather than waiting days to build and distribute a full browser installer.
3. Shield Studies (A/B Testing)
Normandy powers Mozilla's "Shield Studies," which are controlled experiments used to test new interfaces or performance tweaks. A recipe can assign a small, randomized percentage of users to a test group, temporarily alter their browser configurations, and measure the impact via telemetry before Mozilla decides to make the change permanent for everyone.
Security and User Control
Because a system capable of altering browser settings remotely is a high-value target for attackers, Normandy relies on strict cryptographic verification. Every recipe published on the Normandy server is digitally signed by Mozilla's private keys. Before the Firefox client processes any recipe, it verifies the cryptographic signature using a public key hardcoded into the browser. If a recipe is tampered with in transit, the signature validation fails, and Firefox ignores the instructions.
Users also retain ultimate control over the Normandy system. While critical security hotfixes may be applied broadly, users can opt out of configuration experiments and preference rollouts at any time. This is done by navigating to the Firefox Settings menu, selecting Privacy & Security, scrolling to the Firefox Data Collection and Use section, and unchecking the box labeled Allow Firefox to install and run studies. Disabling this setting instructs the local Normandy client to stop executing experimental recipes and immediately reverts any active studies back to the browser's default state.