DEV Community

Sam Gutentag
Sam Gutentag

Posted on

The Merge Queue Scaling Problem Every Growing Team Hits

You know that moment when your team grows from 15 to 30 engineers and suddenly everything feels slower despite having more people?

I've been diving deep into why this happens and how advanced merge queues solve it.

The Stale CI Problem

Your PR passes all tests, you merge it, main breaks. Sound familiar?

This happens because your PR tested against old main, not the main that exists after other PRs merge first.

Basic vs Advanced Solutions

GitHub's merge queue: ✅ Fixes stale CI, ❌ Creates new bottlenecks
Trunk's approach: ✅ Fixes stale CI, ✅ Optimizes for scale

The Key Insight

Not all changes are equal:

  • Docs update: 2 minutes
  • API change: 15 minutes
  • DB migration: 45 minutes

Why should the docs update wait for the migration?

Advanced Features That Matter

🚀 Parallel queues (independent changes don't block each other)
💰 Batching (test 3 compatible PRs as one unit)
⚡ Optimistic merging (fast PRs don't wait for slow ones)

Real Numbers

Customer with 50 engineers:

  • CI costs: $15K → $4K monthly
  • Merge time: 45min → 12min average
  • Main branch health: 60% → 99% uptime

Read more at https://trunk.io/blog/outgrowing-github-merge-queue

What's your merge queue horror story? 👇

Top comments (0)