Cloudflare 的站点可靠性工程(SRE)团队显著改善了其庞大的全球基础设施的配置管理可观测性,该系统由 SaltStack 驱动。面对静默故障、资源耗尽和依赖问题等导致发布停滞的问题,他们将其方法从被动的手动调试重新设计为主动的事件驱动自动化。通过开发内部框架 "Jetflow",他们现在能够将 Salt 事件与 Git 提交、外部服务故障和临时发布关联起来。该系统自动标记配置错误的根本原因,减少了手动追踪作业 ID 和筛选日志的繁琐任务。结果是发布延迟减少了 5%,SRE 的繁琐工作减少,配置变更的可审计性得到改善,这表明先进的可观测性和自动化关联对于管理 Cloudflare 规模的配置至关重要,尽管任何配置管理工具都存在固有挑战
Cloudflare recently shared how it manages its huge global fleet with SaltStack (Salt). They discussed the engineering tasks needed for the "grain of sand" problem. This concern is about finding one configuration error among millions of state applications. Cloudflare’s Site Reliability Engineering (SRE) team redesigned their configuration observability. They linked failures to deployment events. This effort reduced release delays by over 5% and decreased manual triage work.
As a configuration management (CM) tool, Salt ensures that thousands of servers across hundreds of data centers remain in a desired state. At Cloudflare’s scale, even a minor syntax error in a YAML file or a transient network failure during a "Highstate" run can stall software releases.
The primary issue Cloudflare faced was the "drift" between intended configuration and actual system state. When a Salt run fails, it doesn't just impact one server; it can prevent the rollout of critical security patches or performance features across the entire edge network.
Salt uses a master/minion setup with ZeroMQ. This makes it difficult to find out why a specific minion (agent) didn’t report its status to the master. It’s like searching for a needle in a haystack. Cloudflare identified several common failure modes that break this feedback loop:
- Silent Failures: A minion might crash or hang during a state application, leaving the master waiting indefinitely for a response.
- Resource Exhaustion: Heavy pillar data (metadata) lookups or complex Jinja2 templating can overwhelm the master's CPU or memory, leading to dropped jobs.
- Dependency Hell: A package state might fail because an upstream repository is unreachable, but the error message might be buried deep within thousands of lines of logs.
/filters:no_upscale()/news/2026/01/cloudflare-salt-configuration/en/resources/3image5-1768557185316.jpg)
Salt architecture diagram
When errors happened, SRE engineers had to manually SSH into candidate minions. They chased job IDs across masters and sifted through logs, which had limited retention. Then, they tried to connect the error to a change or environmental condition. With thousands of machines and frequent commits, the process became tedious and difficult to maintain. It offered little lasting engineering value.
To address these challenges, Cloudflare’s Business Intelligence and SRE teams collaborated to build a new internal framework. The goal was to provide a "self-service" mechanism for engineers to identify the root cause of Salt failures across servers, data centers, and specific groups of machines.
The solution involved moving away from centralized log collection to a more robust, event-driven data ingestion pipeline. This system, dubbed "Jetflow" in related internal projects, allows the correlation of Salt events with:
- Git Commits: Identifying exactly which change in the configuration repository triggered the failure.
- External Service Failures: Determining if a Salt failure was actually caused by a dependency (like a DNS failure or a third-party API outage).
- Ad-Hoc Releases: Distinguishing between scheduled global updates and manual changes made by developers.
Cloudflare changed how they manage infrastructure failures by creating a foundation for automated triage. The system can now automatically flag the specific "grain of sand", the one line of code or the one server causing a release blockage.
The shift from reactive to proactive management resulted in:
- 5% Reduction in Release Delays: By surfacing errors faster, the time between "code complete" and "running at the edge" was shortened.
- Reduced Toil: SREs no longer spend hours on "repetitive triage," allowing them to focus on higher-level architectural improvements.
- Improved Auditability: Every configuration change is now traceable through the entire lifecycle, from the Git PR to the final execution result on the edge server.
The Cloudflare engineering team observed that while Salt is a strong tool, managing it at "Internet scale" needs smarter observability. By viewing configuration management as a key data issue that needs correlation and automated analysis, they have set an example for other large infrastructure providers.
Based on the challenges Cloudflare encountered with SaltStack, it's worth noting that alternative configuration management tools like Ansible, Puppet, and Chef each bring different architectural trade-offs to the table. Ansible works without agents using SSH. This makes it simpler than Salt's master/minion setup. However, it can face performance issues at scale due to sequential execution. Puppet uses a pull-based model, where agents check in with a master server. This gives more predictable resource use but can slow down urgent changes compared to Salt's push model. Chef also uses agents but focuses on a code-driven approach with its Ruby DSL. This offers more flexibility for complex tasks but has a steeper learning curve.
Every tool will encounter its own "grain of sand" problem at Cloudflare's scale. However, the key lesson is clear: any system managing thousands of servers needs robust observability. It must also automate failure correlation with code changes and have smart triage mechanisms. This turns manual detective work into actionable insights.

