Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Slack Engineering 13 min read Case study mediumAdept

Advancing Our Chef Infrastructure: Safety Without Disruption

Slack split its single production Chef environment into six AZ-mapped environments (prod-1 to prod-6) so newly provisioned nodes no longer pull a possibly bad config from one shared source during scale-outs. prod-1 acts as an hourly canary taking the latest cookbook artifact, while prod-2 through prod-6 advance on a release train where a new version starts only after the previous one reaches prod-6. Because rollout timing is now variable, fixed cron-scheduled Chef runs were replaced by Chef Summoner, an on-node service that polls S3 signals written by Chef Librarian, applies a configurable splay, and still forces a run every 12 hours for compliance. The tradeoff is slower fleet-wide propagation in exchange for a smaller blast radius per AZ. Slack chose this over migrating to Chef Policyfiles to avoid making dozens of teams rewrite their cookbooks.

Assumes: Chef roles and environmentsAWS availability zonescanary deployments

Related posts

  • Advancing Our Chef Infrastructure

    Slack Engineering mediumAdept

    Slack evolved its Chef setup for tens of thousands of EC2 instances from a single stack, where every cookbook change hit all environments at once on the hour, into multiple sharded Chef stacks with versioned cookbook rollouts. New nodes are assigned to shards via Route53 weighted CNAMEs. Chef search for node discovery was replaced with Consul lookups run inside ruby_block resources and lazy evaluation, which breaks a circular dependency on the Nebula overlay network. A fan-out search service (Shearch) and a Go Knife replacement (Gnife) restore fleet-wide queries, and a new Chef Librarian service uploads timestamp-versioned cookbooks to all stacks and promotes them environment by environment, with state tracked in DynamoDB.

  • Shipyard: How We Built Slack’s Next-Generation EC2 Platform

    Slack Engineering mediumAdept

    Shipyard is Slack's EC2 platform that replaces continuously Chef-converged, long-lived instances with immutable, layered AMIs deployed through progressive, metric-gated rollouts. A shared hardened base image, slack-zero, is built with AWS Image Builder and published via SSM parameters, and EventBridge and Lambda trigger rebuilds of service images layered on top. Heavy work happens at bake time and only secrets and environment config are applied at boot, so instances come up in seconds. The Gondola orchestrator rolls out AMI plus versioned Chef artifacts through ASG Instance Refresh or Karpenter executors with automatic rollback. Instances are short-lived and regularly rotated, secrets refresh via Consul Template from Vault, and a Peekaboo inventory built on EventBridge, OpenSearch and Lambda gives near real-time fleet visibility.

  • Slowing Down to Speed Up – Circuit Breakers for Slack’s CI/CD

    Slack Engineering mediumAdept

    Slack added orchestration-level circuit breakers to Checkpoint, its CI/CD orchestration service, to stop cascading failures between internal systems such as GitHub Enterprise, Jenkins, test environments, Flannel, Vitess and search. CI/CD request volume grew about 10% month over month, and vertical and horizontal scaling had stopped keeping up. Checkpoint's background jobs query dependent-service health in Prometheus through Trickster. When thresholds are exceeded, the breakers open, deferring or shedding test jobs, and they close again when the services recover. The Hacklang implementation drops the half-open state because job retries and cached TTL queries handle recovery, fails closed when metric lookups error, and notifies engineers whenever a breaker changes state.

  • BuildRock: A Build Platform at Slack

    Slack Engineering mediumAdept

    Slack consolidated its sprawling, hand-managed "snowflake" Jenkins clusters into BuildRock, a build-as-a-service platform. Jenkins controllers run statelessly on Kubernetes, configured through the Configuration-as-Code (casc) plugin and Jinja2 templates, and every change flows through GitOps, so a cluster can be rebuilt identically from Git. State such as build history lives on EFS with automated backups, plugins come from central storage, vulnerability scanning runs on every build, and test and pre-staging clusters catch problems before production. Rollout was incremental: controllers moved to Kubernetes before agents, with static EC2 agents alongside ephemeral pods, and old clusters were kept on standby for fast rollback under a shared ownership model with service teams.

  • Balancing Safety and Velocity in CI/CD at Slack

    Slack Engineering mediumAdept

    Slack restructured CI for its Webapp monorepo from mostly pre-merge end-to-end testing into three tiers: a small pre-merge set (<1% of e2e tests) that blocks merges, a post-merge set (<10%) that blocks deploys, and a bi-hourly batched regression pipeline for low-criticality features. The move was driven by the arithmetic of flakiness: even a 1% per-suite flake rate across 60+ suites meant most PRs hit a flaky failure. Consecutive-failure alerts based on a state machine, per-business-area triage channels with test ownership, and a Slack bot that spins up escalation channels with the right liaisons kept the change safe. Afterwards p95 test turnaround fell over 40% to under 18 minutes, per-PR flakiness dropped over 90% to under 5%, and customer-reported defects showed no measurable increase.

The quest for software engineering knowledge.

Look:
Layout: