
Maude Lemaire shares lessons from scaling Slack and GitHub, improving performance at Cursor, and using AI while keeping engineering judgment in human hands.
97151×0:00Current time: 0:00 / Total time: -1:18:32-1:18:32Audio playback is not supported on your browser. Please upgrade.Scaling Slack and GitHub with Maude LemaireMaude Lemaire shares lessons from scaling Slack and GitHub, improving performance at Cursor, and using AI while keeping engineering judgment in human hands.Gergely OroszNov 05, 20269715ShareTranscriptListen and watch now on YouTube, Apple, and Spotify. See the episode transcript at the top of this page, and timestamps for the episode at the bottom.
• turbopuffer – The tpuf eng team is completely redesigning their storage architecture from first principles. And they’re documenting all of it! They made epic progress; take a look: turbopuffer.com/v3
• Antithesis – use AI agents to work on critical systems without worrying about correctness. Antithesis runs your complete system in a hostile environment, analyzes its behavior, and reproduces every issue perfectly. Learn more
• Entire – Entire launched its own Git forge, shipped Continuous Memory, and reinvented the pull request (called Trails). Trails are a much more natural workflow when agents keep pushing new changes, after iterating on feedback – and you have more context and control on when a change is ready to merge. Check it out
The reimagined concept of the pull request for agentic development: Entire calls them ‘Trails’In this episodeWhat 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.
Here are eight interesting points from our discussion:
1. Performance should matter even if there’s no competition. In 2015, the homepage of Rent the Runway took up to 10 seconds to fully load due to a high-resolution hero image on the site. Maude was told it wasn’t an issue because there were no competitors to worry about. She thought differently: “The best competition is competition with yourself, knowing that you can do better, knowing that you can drive a better experience, ” she said. Maude spent some free time on speeding up the website without asking for permission to do so because it was the right call.2. Slack limits custom emojis to 23 to avoid thundering herds. Here’s an example of a thundering herd: the CEO of a 100,000-member Slack channel posts “everyone gets Friday off!” In response, people start posting custom emojis – hundreds of them. The problem is that every single custom emoji has to fan out to all 100,000 users. With 10 custom emojis, that’s 1,000,000 fan-outs, with 100 it’s 10,000,000; a lot of network load! Slack limits custom emojis to 23 to avoid this problem. In reality, the absent 24th custom emoji is not missed.
3. Event floods can cripple the machines of Slack’s power users. Event floods are the cousin of thundering herds: they occur when a single client is overwhelmed by events coming through its own WebSocket. For example, when an IT worker is logged into lots of busy channels and they all receive the “everyone gets Friday off!” message – along with all the associated custom emojis and messages. This “power user” gets a sudden influx of messages with no deduplication and they struggle.
4. Load testing 500,000 WebSocket connections the simple way would have cost $150,000 per run. A new customer with 500,000 users was about to sign up to Slack, and Maude needed to run a load test to confirm the service could handle the load. Initially, she planned to spin up headless Chrome instances – each instance running a Slack session, and that would have cost $0.37 per five-hour session, per instance. The total price would’ve been crazily expensive. Instead, Maude built a tool called Koi Pond that spins up slimmed-down versions of Slack (‘Koi’), written in Go to establish the WebSocket connections.
5. Active Record downside: too much database load! GitHub used to be a Ruby on Rails monolith, which used Active Record as a database abstraction layer. This caused unexpected load: GitHub’s home page fetched live data from the database for most reloads, and loading the home page regularly triggered 100 SQL queries across three database clusters. This revealed a downside of abstractions like Active Record to Maude: when devs used it, they didn’t know or care about the additional load they unwittingly placed on the database while fetching data for whatever they were working on.
6. GitHub could not add more than 16 database shards because of scatter query problems. A scatter query is one without a primary key (a sharding key), and it needs to be run across all shard instances. But more shards make such queries slower.
Back in the day at GitHub, lots of queries made through Active Record (many on the homepage) were scatter queries. This limitation prevented GitHub from adding more than 16 shards. I find this detail fascinating: it shows why a developer-friendly abstraction (Active Record) can actually cause severe pain at the infra level!
The Pragmatic Engineer
Original Reporting Source
Explore features, ratings, and alternatives from our 19,000+ AI tools catalog.

The frontier AI-first code editor with multi-file Composer, Cursor Tab, and VS Code compatibility.