Rails performance · Berube Consulting

Your Rails app got slow. Let's find out why — fast.

An endpoint that times out. A page nobody can load during business hours. An app that was snappy at a thousand rows and crawls at a million. These are acute problems, and they get solved fastest by someone who has seen the failure mode before.

That's David Berube — author of Practical Ruby Gems, technical lead behind a Rails platform serving 800,000+ actors across 45+ of the Fortune 100, and 20+ years of finding the one request that's killing everything.

Fixed-fee on the common engagements Diagnosis you keep, whatever you decide David directly — not a junior

Published, spoken, and consulted across two decades — from the Ivy League to the Fortune 100

IBM developerWorksHarvardPrincetonApressTalent Systems

When to call

Rails doesn't slow down all at once. It slows down on you.

For the CTO, VP of Engineering, or lead developer who owns a production Rails app that's gotten slow: your team is good, but this specific problem has them stuck. You want an answer fast, and you want to be told the truth.

The endpoint that times out

A request that was fine last year now takes eight seconds, and it's the one your customers hit most. Throwing dynos at it bought you a month. It's back.

Slow that grew with you

The app was quick at launch. It crawled in past a million rows and a few thousand users. The thing that made you money — more data, more traffic — is the thing breaking it.

The slowdown nobody can pin down

A few times a day latency spikes, requests queue, memory creeps up until the process restarts, then it clears. Your team has been chasing it for months and can't reproduce it on demand.

What the diagnosis covers

Find the one thing that's actually slow — and prove it.

Most Rails performance problems come down to a handful of causes. The work is knowing which one you have, measuring it, and fixing the right thing instead of guessing.

Find the real bottleneck

Profiled against real data and your actual traffic shape, not a guess. APM traces, rack-mini-profiler, and flamegraphs from stackprof — read by someone who knows what they're looking at.

N+1s & ActiveRecord

The query in a loop behind a serializer. The controller pulling 40,000 rows to render 40. The missing `includes` and the missing index. Often the fastest, cheapest win there is.

Caching & view rendering

Fragment and Russian-doll caching that never hits, a view rendering thousands of partials, heavy serialization on the hot path. Where the request actually spends its time — and how to give it back.

Jobs, memory & concurrency

Sidekiq jobs hammering the database, request queuing under load, GC pressure, and the memory bloat that forces a restart every few hours. The problems that only show up under real traffic.

A plan, in plain English

Ranked: easy wins first, then the deeper work, with the trade-offs spelled out — so your team can carry it and repeat the pattern elsewhere in the codebase.

Monitoring & habits

What to watch in your APM, which tools to keep in the toolbox (Bullet, derailed_benchmarks, memory_profiler), and the developer habits that keep the app from drifting back into trouble.

Engagements

Start with the fire, not a retainer.

Three ways in, smallest first. Fixed fees on the common ones, scoped and quoted before any work starts. You're buying a diagnosis and a fix — not a standing monthly bill.

One stalled checkout or a report that times out during a demo costs more than the smallest engagement here.

The Quick Win

One slow endpoint or page that has to get fast — now.

from $2,500

Fixed fee · usually 2–4 days

  • We take the one action, endpoint, or job that hurts
  • Profiled against a real copy of your data and traffic shape
  • N+1s, slow queries, and missing eager-loads found and fixed
  • A measured before/after on your slowest request
  • Plain-English write-up so your team can repeat the pattern
  • Fixed fee agreed up front — no open-ended hourly
  • Broad app-wide or architecture review
  • Capacity / scaling readiness work
Most common

Performance Assessment

The whole app is slow and you need to know why.

from $6,500

Fixed fee · written report

  • ActiveRecord, query, and N+1 review across the app
  • APM and profiler analysis on your real request patterns
  • Caching, view rendering, and serialization review
  • Background jobs (Sidekiq / GoodJob) and memory pressure
  • Ranked list: easy wins first, then the deeper work
  • A written report you keep, whatever you decide next
  • A walkthrough call with your engineers
  • Hands-on implementation (separate, via Durable Programming)

Deep Diagnostic

The intermittent slowdown nobody's been able to pin down.

from $12,000

Scoped per engagement

  • Everything in the Performance Assessment
  • Live paired working sessions with your team
  • Instrumentation to catch intermittent latency / timeout spikes
  • Memory-bloat, GC, and request-queuing analysis under load
  • Capacity and scaling-readiness review for a known spike
  • Direct access to David through the engagement
  • A fix-or-plan handoff at the end
  • Honest scoping — if it needs a build, you take the plan anywhere

Deciding and doing are kept separate on purpose.

The diagnosis is yours to keep and act on however you like — your team, your timeline, or hands-on implementation through Durable Programming as a separate engagement. No engagement is a setup for an upsell.

Not sure which one fits? Describe the symptom in the form below and you'll get an honest read — including "this is smaller than the Quick Win, here's what to try yourself."

How it works

From slow request to measured fix in days, not quarters

1

Tell us the symptom

A short call, or just the form. What's slow, when it started, how much it hurts. By the end you know whether this is a half-day Quick Win or a deeper assessment — and roughly what it costs.

2

Get set up on your app

Read access to the repo, a copy or representative dump of the relevant data (sanitized is fine), and your APM and production logs. NDA up front, access scoped to the minimum. We reproduce the slow request locally so the work is measured, not theoretical.

3

Diagnose and fix the urgent thing

We find the actual bottleneck and, for a Quick Win, fix it — with a measured before/after on your slowest request. For an assessment, you get a ranked written report you keep regardless of what you do next.

4

Hand off — fix, plan, or build

Small fixes often ship inside the engagement. Bigger work becomes a clear plan you can run with your own team, or implement through Durable Programming as a separate engagement. Your call, no pressure.

Who does the work

You're hiring judgment under pressure — and the person who has it.

Berube Consulting is David Berube's advisory practice. Rails performance is one of the things he is genuinely best at: telling a slow query from an N+1 from a rendering problem, reading an unfamiliar app fast, and keeping a level head while it's on fire. That's the product — not a ticket queue.

  • 20+ years of Ruby, Rails, and production systems work
  • Architected the Rails platform behind an 800,000+ actor database used across 45+ of the Fortune 100
  • Author of Practical Ruby Gems (Apress) and several other books on software development
  • Rails performance & schema reviews on AWS RDS, into the millions of rows — you work with David directly
~5s → ~1.2s
One CattleSoft Rails page, single large account, inside a day of setup
800k+
Rows in the actor database behind the Rails platform David built
20+
Years finding the request that's killing everything
“The folks at Durable Programming did an exceptional job upgrading our Rails application. Throughout the process they were responsive, patient, and communicative.”
Kim Carter · QED Foundation

On a Ruby on Rails engagement. Berube Consulting diagnoses and plans; when the work calls for hands-on building, it runs through Durable Programming as a separate engagement.

A straight answer

Sometimes the honest answer is "this one's hard."

Not every performance problem has a clean, same-day win. Latency that spikes for a few minutes a couple of times a day — request queuing, a job storm, memory creeping up until the process restarts — is genuinely difficult, and sometimes the first real job is just instrumenting the app so the event gets captured at all. When that's the situation, you'll hear it plainly, you'll see what's being found as it's found, and you won't get a hard, half-finished hunt dressed up as a victory. Independent advice is worth paying for precisely because it isn't steered toward telling you what you'd like to hear.

Questions

What people ask before they send the slow endpoint

How fast can you actually turn this around?

A Quick Win usually lands in a few days — sometimes the same week. The classic version: you hand over a slow endpoint and a copy of the data, we profile it, find the bottleneck, and come back with a measured fix. One CattleSoft page went from about 5 seconds to about 1.2 seconds on a single large account inside a day of getting set up. That's one page on one dataset, not a blanket promise — but acute, well-scoped Rails performance problems often move that fast.

Do you fix it, or just tell me what’s wrong?

Both are on the table, and they're deliberately kept separate. Berube Consulting diagnoses and advises — that's this engagement. If the fix is an eager-load, a query rewrite, or a cache, it often gets handled inside the diagnostic. If it turns into real implementation work, that runs through Durable Programming (a separate firm, same David) as its own engagement — or you take the plan to your own team. There's no assumption a diagnosis turns into a build.

What do you need from us to start?

Enough to reproduce the problem: the repo (read access is fine), a copy or representative dump of the relevant data, and access to whatever APM you run (New Relic, Scout, Skylight, Datadog) plus production logs. For the deeper work, the slow endpoints, the request volume, and someone on your side who can answer questions about the app. We scope access to the minimum, sign an NDA up front, and work to your security requirements.

Our slowdown is intermittent and we can’t reproduce it. Can you still help?

That's the Deep Diagnostic, and it's honest about being the hard case. Latency spikes that show up a few times a day — request queuing, a job storm, memory creeping up until the dyno restarts — are genuinely difficult, and sometimes the first job is just instrumenting the app so the event gets captured at all (request-level traces, GC stats, rack-mini-profiler in staging, a memory profiler under real load). We'll tell you what we're finding as we go, and we won't dress up a hard, unfinished hunt as a clean win.

Is this just adding eager-loading and indexes?

Sometimes the answer really is an `includes` or a missing index, and if that's the whole fix we'll tell you so instead of inflating the engagement. More often it's a mix: an N+1 hidden behind a serializer, a controller loading 40,000 rows to render 40, a view that renders thousands of partials, a Sidekiq job hammering the database, a cache that never hits, or memory bloat forcing restarts. The point is to find the actual bottleneck — with a profiler, not a checklist.

What Rails versions and stacks do you work with?

Ruby on Rails across the versions you'll find in production, from older 4.x/5.x apps through current. Postgres or MySQL underneath, Sidekiq / GoodJob / Resque for jobs, Redis, Puma, Hotwire or a JS front end — the performance work applies across them. Tooling is the usual Ruby kit: rack-mini-profiler, the Bullet gem, derailed_benchmarks, stackprof / vernier, memory_profiler, and your APM. The database underneath is often the real bottleneck, and that's squarely in scope.

Who actually does the work?

David Berube, directly — not a junior assigned to your account. He co-founded Casting Frontier and was its technical lead through a 2020 acquisition by Talent Systems, architecting the Rails platform behind a database of 800,000+ actors used across 45+ of the Fortune 100. He wrote *Practical Ruby Gems* (Apress) and several other books on software development, and has 20+ years of production Ruby and Rails behind him. Rails performance is one of the things he is genuinely best at.

How much will it cost?

The prices above are honest starting points. A tightly-scoped Quick Win on one endpoint is the cheapest door in; a full assessment or an intermittent-slowdown hunt costs more because it's more work. We scope and quote before starting, the common engagements are fixed-fee, and you'll know the number before you commit. If your problem is smaller than the smallest tier, we'll say so.

Get a read on it

Send the symptom. Get an honest answer.

Tell us what's slow and when it started. You'll get a read on whether it's a quick fix or a deeper problem — usually within one business day. The first call costs nothing.

Only used to reply — no list, no spam.

An honest read within one business day. No sales pressure, and the first call costs nothing.

Or email djberube@berubeconsulting.com · (603) 574-4766