Skip to content
.md

High-Velocity Teams

When you’re merging 20, 50, or 100+ PRs per day, a merge queue isn’t optional—it’s infrastructure. At this velocity, manual coordination breaks down and broken main becomes a daily occurrence.

With 15-minute CI and a simple serial queue:

PRs/dayQueue capacityResult
2032 (8hr ÷ 15min)Manageable
5032PRs back up
10032Impossible

Without optimization, high-velocity teams hit a ceiling. PRs wait hours. Engineers lose context. Frustration spikes.

High-velocity teams need every optimization available:

Speculative checks test multiple PRs in parallel by assuming earlier ones will pass:

Parallel Testing

PR #1

Test 1+main

PR #2

Test 1+2+main

PR #3

Test 1+2+3+main

main

Three PRs merge in the time of one. Throughput triples.

Batching groups PRs into a single CI run:

Batch: PR #1, #2, #3, #4, #5
→ One CI run for 5 PRs
→ 80% CI cost reduction

Fewer CI runs means lower costs and faster feedback for everyone.

Two-step CI splits validation:

  • PR CI: Fast checks (lint, unit tests, build)
  • Queue CI: Thorough checks (integration, E2E)

This keeps PR feedback fast while the queue handles comprehensive testing.

Not all PRs are equal. Priority management lets urgent changes skip ahead:

  • Hotfixes merge immediately
  • Feature work follows normal flow
  • Docs and chores can wait

Track these metrics to know if your queue is keeping up:

MetricHealthyWarningCritical
Median wait time< 30 min30-60 min> 60 min
P95 wait time< 2 hr2-4 hr> 4 hr
Queue depth< 10 PRs10-20 PRs> 20 PRs
Failure rate< 5%5-15%> 15%

When metrics trend toward warning, investigate before they hit critical.

High-velocity teams ship small PRs:

  • Easier to review
  • Faster CI
  • Lower conflict risk
  • Simpler rollback

A team shipping 50 small PRs moves faster than one shipping 10 large PRs.

Most high-velocity teams practice trunk-based development:

  • Short-lived branches (hours, not days)
  • Frequent integration
  • Feature flags for incomplete work

The merge queue makes this safe by catching integration issues before they land.

At high velocity, manual steps become bottlenecks:

  • Auto-merge when approved and CI passes
  • Auto-assign reviewers
  • Auto-label by file paths
  • Auto-add to queue on approval

The merge queue is one piece of a fully automated pipeline.

You need to optimize when:

  • Wait times creep up — PRs taking longer to merge each month
  • Engineers complain — “The queue is always full”
  • Workarounds appear — People merging directly to main “just this once”
  • CI costs spike — Full test suite running for every PR

Address early. Small delays compound into large productivity losses.

At 20 PRs/day:

  • Serial queue, 15-minute CI
  • Comfortable margin

At 40 PRs/day:

  • Add batching (batch size 3-4)
  • Add speculative checks (depth 2)
  • Still one queue

At 70 PRs/day:

  • Split into parallel queues by area
  • Increase speculation depth
  • Add two-step CI

At 100+ PRs/day:

  • Per-team queues
  • Aggressive batching
  • Priority lanes
  • Real-time queue monitoring
  1. Do the math — Know your theoretical throughput vs. actual PR volume
  2. Use every lever — Batching, speculation, parallelism, priorities
  3. Measure constantly — Wait time is your key metric
  4. Optimize proactively — Fix slowdowns before engineers feel them
  5. Automate the pipeline — The queue is just one piece