---
title: "Advancing Our Chef Infrastructure"
description: "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."
url: "https://swe.quest/articles/advancing-our-chef-infrastructure-a81877d9ae534820"
canonical: "https://slack.engineering/advancing-our-chef-infrastructure/"
source: "Slack Engineering"
published: "2024-09-17"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["configuration","deployment","infrastructure-as-code","cloud","scalability"]
---

# Advancing Our Chef Infrastructure

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2024-09-17, 12 min read, Case study. Original: [https://slack.engineering/advancing-our-chef-infrastructure/](https://slack.engineering/advancing-our-chef-infrastructure/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Configuration management](https://swe.quest/tags/configuration.md) (Reliability & operations)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- Chef cookbooks and roles
- AWS EC2/S3/SQS ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- service discovery basics

## Keywords

Chef, Consul, Nebula, Route53, Chef Librarian, Shearch, DynamoDB, Slack

## Related posts

- [Advancing Our Chef Infrastructure: Safety Without Disruption](https://swe.quest/articles/advancing-our-chef-infrastructure-safety-without-disruption-fc96edfc3e0961ec.md): Slack Engineering · 2025-10-23 · Medium · 13 min read · Configuration management, Deployment, Infrastructure as code, Resilience, Cloud platforms
  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.
- [Shipyard: How We Built Slack’s Next-Generation EC2 Platform](https://swe.quest/articles/shipyard-how-we-built-slack-s-next-generation-ec2-platform-3563d688d7e86781.md): Slack Engineering · 2026-07-14 · Medium · 13 min read · Deployment, Cloud platforms, Infrastructure as code, Configuration management, System design
  Shipyard is Slack's EC2 platform that replaces continuously Chef-converged, long-lived instances with immutable, layered AMIs deployed through progressive, metric-gated rollouts.
- [BuildRock: A Build Platform at Slack](https://swe.quest/articles/buildrock-a-build-platform-at-slack-c8b3b87d529426f6.md): Slack Engineering · 2022-08-31 · Medium · 10 min read · CI/CD, Kubernetes, Infrastructure as code, Build systems, Developer productivity
  Slack consolidated its sprawling, hand-managed "snowflake" Jenkins clusters into BuildRock, a build-as-a-service platform.
- [How We Use Terraform At Slack](https://swe.quest/articles/how-we-use-terraform-at-slack-a1596aae0a45b4a5.md): Slack Engineering · 2022-10-25 · Medium · 14 min read · Infrastructure as code, Cloud platforms, CI/CD, Developer tools
  Slack runs roughly 1,400 Terraform state files across AWS, GCP, DigitalOcean and NS1, split per account, region and large service so each change touches fewer resources.
- [Infrastructure Observability for Changing the Spend Curve](https://swe.quest/articles/infrastructure-observability-for-changing-the-spend-curve-815f49a6391b6804.md): Slack Engineering · 2021-10-07 · Medium · 10 min read · CI/CD, Cost optimization, Observability, Resilience, Capacity planning
  Slack bent the growth curve of its webapp CI spend, which had been rising about 10% month over month, by using observability (dashboards, metrics and tracing) to drive three changes.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
