The Pragmatic Engineer

Scaling Slack and GitHub with Maude Lemaire

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Load testing should begin by identifying the product’s actual usage patterns and likely failure modes, then simulating those paths at an appropriate fidelity rather than generating arbitrary traffic.
  • Slack’s most dangerous load pattern combined WebSocket fan-out, synchronized user actions, channel reads, and emoji reactions; product decisions about which events can be dropped are part of reliability engineering.
  • A lightweight simulator with real WebSocket connections can be more repeatable and affordable than running hundreds of thousands of full headless-browser clients, provided it exercises the critical path.
  • Scatter queries become a structural scaling constraint because they must run on every shard; eliminating them in a large Rails monolith is difficult when ActiveRecord hides the generated SQL.
  • LLMs can help explore and implement performance work, but they do not reliably understand product usage, asynchronous flows, instrumentation, or edge cases without human verification.
  • Product-platform teams work best when engineers rotate between platform and product teams, preserving both system-level expertise and awareness of how products are actually shipped.

Summary

From ASCII tables to software engineering

Maude Lemaire grew up around computers: her father taught computer science, and childhood photos show her holding ASCII tables. She initially planned to study genetics and entered McGill with an aggressive course load in microbiology, molecular biology, organic chemistry, and a 19-credit semester. Within three weeks, she realized that being good at memorization did not mean enjoying it, especially while learning the Krebs cycle. She secretly swapped a biology course for introductory computer science because she feared disappointing her father, then discovered that programming felt empowering: typing instructions into a computer made her feel “like a god.”

Why Maude returned to Rent the Runway

Maude’s first job was at Rent the Runway, where she combined programming with fashion, a world familiar from watching Project Runway with her mother and using the service to rent clothes cheaply. Camille Fournier’s presence as a woman in a senior technology role also influenced her decision to return after an internship; Maude wanted to learn from her confidence and leadership. Fournier left a few months after Maude returned, but still helped her land at Slack a year later. Maude also developed a performance interest at Rent the Runway, working on optimization in her own time.

Slack’s early enterprise architecture was built around one workspace

When Maude joined Slack in 2016, the product sharded data by team or workspace. A large customer could receive a larger database, while smaller customers shared multi-tenant instances, but one customer’s data did not span multiple database shards. WebSocket connections were likewise associated with a company, so a busy organization concentrated users on one chat server. Enterprise complicated this model: Slack treated IBM’s marketing, engineering, and other groups as separate teams, then added an enterprise record above them so users could communicate across teams. IBM’s direct messages and company-wide channels consequently loaded the enterprise shard, creating a major concentration of traffic.

The Slack sidebar migration briefly erased everyone’s channels

Slack’s sidebar query combined separate tables for public channels, private channels, and group DMs through a large join or union; mention counts had similarly latency-sensitive queries. Maude migrated these tables into a unified model by copying roughly 400 SQL call sites behind a minimal class, using double writes, backfills, feature flags, shadow reads, and comparisons before switching reads. During an internal Gather Hour rollout, she forgot the new-table flag was still enabled, deleted her team’s backing data, and began a 25-minute backfill. Slack employees temporarily saw blank sidebars until she reverted to the old table, with only a colleague named Kevin immediately alerting her.

Slack’s thundering herd began with a CEO’s day off

Maude defines a thundering herd as a sudden event causing many users to perform the same actions simultaneously. Slack’s canonical example was a CEO announcing “great quarter, everyone—you all get Friday off” in a channel with 100,000 active users. The notification reached everyone over WebSockets; users opened the channel, fetched history, and added emoji reactions within seconds. Each reaction then fanned out to all connected users, so one emoji could become 100,000 messages, and multiple reactions multiplied the load. Slack prioritized text messages over emojis during overload and could drop emoji events, though Maude argued that product owners should decide what is expendable.

Event floods punished IBM’s most connected Slack user

Maude distinguishes a thundering herd from an event flood. A herd is many users responding to one event, whereas an event flood overwhelms one client with events from many places. Jeff Robke, IBM’s main Slack administrator and later a Slack product manager, was logged into roughly 30 workspaces because IBM organized departments into separate teams. A message shared across those workspaces could arrive 30 times without deduplication, overwhelming his notifications, interface, and sometimes his client. Maude noted the irony that power users and advocates often received the worst experience because they were connected to so many channels and teams.

Slack replaced $150,000 headless-browser tests with Go clients

To prepare for a customer expected to bring 500,000 or possibly a million users, Slack first used Kubernetes pods running headless Chrome instances that behaved like users. The approach cost about 37 cents per instance for a five-hour test, or roughly $150,000, and still spent much of the test recovering crashed pods. Maude’s team replaced it with lightweight Go processes that opened real WebSocket connections, issued API requests, received and sent WebSocket events, and exercised Slack’s edge cache as well as the US East 1 backend. A recorder captured API calls and WebSocket traffic from real product flows, letting product managers submit realistic scenarios to the Koi Pond load-testing system.

GitHub’s 16 shards exposed the cost of scatter queries

When Maude joined GitHub in 2024, a colleague warned that the company was running out of data-center space and needed both cloud migration and efficiency improvements. GitHub used Vitess, a MySQL layer that supports more dynamic resharding, but Maude found only 16 shards for all pull requests and issues. More shards were difficult because scatter queries lacked the primary key and had to run against every shard; adding shards would make those queries even more expensive. She wanted to eliminate scatter queries, but the Rails monolith made that difficult: ActiveRecord hid SQL behind layers of abstraction, and even identifying where a five-line function generated a query could be nearly impossible.

AI accelerates implementation but not platform judgment

At Cursor, Maude worked on time to first visible token, tracing the path from prompt submission through context assembly, caching, inference proxy, and streamed responses. LLMs suggested parallelizing independent tasks, but she rejected one proposal because three tasks served only about 1% of users and the longest task remained the bottleneck; extending Redis TTLs was more useful. She also found AI-generated instrumentation and tests overly naive: models often confirmed the code they had just written. Maude uses LLMs for exploration and implementation, but verifies the result manually, including with mutation testing to expose missed edge cases.

Product and platform engineers should rotate

Maude recommends cross-pollination between product and product-platform teams. Product engineers often move into platform work after encountering the same reliability or performance problem several times and wanting to solve it once for everyone. But platform engineers can become detached from the pressures of product development, especially as teams rapidly ship AI-generated code. Her proposed remedy is regular rotations: product engineers bring firsthand knowledge of current shipping patterns, while platform engineers build guardrails that warn about or stop unsafe changes. She compared the current situation to spaghetti that no longer stays on the plate, making stronger foundations and shared context essential.

Sponsors

  • Antithesis · Antithesis runs a deterministic hostile simulation combining targeted and fast testing to discover bugs, reproduce them exactly, and verify large production systems without relying only on code review. The ad cites Jane Street, Datadog, and Datadog’s verification of an event platform handling more than 100 trillion events per day.
  • TurboPuffer · TurboPuffer is presented as a fast, cheap, highly scalable vector and full-text search engine built on object storage. The ad describes TurboPuffer v3, a rewrite that improved from being 10–100 times slower than v2 to being several times faster on cold vector search, cold full-text search, and counts, while replacing its vector primary index with shared columnar storage and vectorized query execution.
  • Entire · Entire offers an AI-native Git forge with private repositories, Trails for collecting intent, code changes, and agent sessions across repositories, configurable eval gates, and continuous memory that lets agents search previous coding sessions for the reasoning behind changes.

Show notes

Brought to You By:

• Antithesis – verify your system’s correctness without human review or traditional integration tests – and avoid bugs or outages.

• turbopuffer– a vector and full-text search engine built on object storage. It’s fast, cheap, and extremely scalable.

• Entire – The Git forge for agent-human collaboration. Built for the scale and throughput of agentic coding.

—

What is involved in scaling up large, popular products at places like Slack and GitHub? 

We get an insider’s view on this from Maude Lemaire, a principal engineer and author of ‘Refactoring at Scale: Regaining Control of Your Codebase.’ She spent nearly eight years at Slack, where she led the backend performance infrastructure team, before joining GitHub to tackle database scaling challenges. Most recently, she worked on improving performance at Cursor – including time to first token.

In this episode of The Pragmatic Engineer, Maude and I dig into the challenges of scaling some of the world's largest software products. We explore how Slack handled growing numbers of enterprise customers, how it evolved its approach to load testing, and the lessons Maude learned during nearly eight years of scaling Slack's infrastructure.

She also tells us what it was like joining GitHub in 2024 when Copilot was taking off, the challenges of working with GitHub's gigantic Rails monolith, and how Maude uses AI in her work – while keeping judgment calls and decision-making firmly in her own hands.

Timestamps

00:00 Intro

03:15 Early years and path to software engineering

07:32 First job at Rent the Runway

09:17 The HipChat data leak

10:54 Joining Slack and the challenges of scaling

26:30 Load testing and thundering herds

32:29 Event floods

38:30 Evolving load testing at Slack

48:38 Joining GitHub in 2024

56:52 The challenges of the Rails monolith

1:02:26 How Maude uses AI

1:12:40 Advice for engineers interested in product/platform work

—

The Pragmatic Engineer deepdives relevant for this episode:

• Real-world engineering challenges: building Cursor

• Pushing software engineering limits with “napkin math”

• What is happening with code reviews?

• Why reliability is hard at scale: learnings from infrastructure outages 

• What is Reliability Engineering? 

• Migrations Done Well 

• Shipping to Production 

• The Platform and Program Split at Uber

• The present, past and future of GitHub

• Why performant code matters (but gets widely ignored), with Casey Muratori

• Designing Data-intensive Applications with Martin Kleppmann

—

Production and marketing by ⁠⁠⁠⁠⁠⁠⁠⁠https://penname.co/⁠⁠⁠⁠⁠⁠⁠⁠. For inquiries about sponsoring the podcast, email [email protected].



Get full access to The Pragmatic Engineer at newsletter.pragmaticengineer.com/subscribe

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file