# DB optimization

> Evil Martians run an audit and propose a **radical performance optimization plan** accounting for traffic and database specifics, so you can scale peacefully.

- URL: https://evilmartians.com/services/performance-scalability

---

---

*Book a free 30-minute call to discuss how we can resolve your bottlenecks in a matter of weeks.* [Contact Evil Martians](https://evilmartians.com/contact-us)

---

## Evil Martians method

First, we measure flamegraphs, allocation tracking, query analysis. Partition, [fair prioritization scheme](https://evilmartians.com/chronicles/fair-multi-tenant-prioritization-of-sidekiq-jobs-and-our-gem-for-it), [circuit breakers](https://evilmartians.com/chronicles/circuit-breakers-and-ruby-in-2025-dont-break-your-launch) are some of the tools we reach for often. When Rails is the wrong tool for one hot path, we [reach for Go, C, or Rust](https://evilmartians.com/chronicles/baking-with-rails-at-scale-recipes-in-ruby-cookware-from-go-c-rust) for that path and leave the rest alone.

Our Head of Backend, Vladimir Dementyev, wrote [Layered Design for Ruby on Rails Applications](https://www.packtpub.com/en-us/product/layered-design-for-ruby-on-rails-applications-9781801813785), now in its second edition.

Growing faster than your infrastructure? [Book a free 30-min call today](#book-a-call).

## Social proof

### Gusto

The whole engagement, including why a company with this much engineering talent hires consultants: [Why Gusto hired Evil Martians for Sidekiq infrastructure](https://evilmartians.com/chronicles/why-gusto-hired-evil-martians-for-sidekiq-infrastructure).

[Gusto](https://evilmartians.com/clients/gusto) runs payroll, benefits, and HR for more than 500,000 businesses, on one of the largest Rails monoliths anywhere, and crossed $1B in annual revenue in May 2026. Evil Martians worked on the infrastructure behind their background jobs.

In a time of rapid change and acceleration, it was amazing to see Andrey able to step in and create value so quickly.

### Whop

[Whop](https://evilmartians.com/clients/whop) serves millions of users and needed off PostgreSQL without a maintenance window. We [moved 750GB of production data to PlanetScale with zero downtime](https://evilmartians.com/chronicles/migrating-whop-from-postgresql-to-planetscale-zero-downtime), running dual databases through the cutover and reconciling the schema dialects as we went. We also [cut their Rails test suite and CI time in half](https://evilmartians.com/chronicles/the-whop-chop-how-we-cut-a-rails-test-suite-and-ci-time-in-half), twice.

<blockquote class="twitter-tweet" data-dnt="true"><a href="https://twitter.com/jsharkey/status/1905671665566027823"></a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

### More teams we scaled

- **[bolt.new](https://evilmartians.com/clients/stackblitz):** our partnership runs since 2021. We built the performance infrastructure that carried it [from zero to $40M+ ARR in five months](https://evilmartians.com/chronicles/bolt-new-from-stackblitz-how-they-surfed-the-ai-wave-with-no-wipeouts).
- **[Tines](https://evilmartians.com/clients/tines):** 100x performance improvements in the target areas of their security automation platform.
- **[Doximity](https://evilmartians.com/clients/doximity):** [Go-powered real-time features](https://evilmartians.com/chronicles/growing-pains-and-a-dose-of-go-real-time-features-for-this-rails-app) inside their Rails app.
- **[Wallarm](https://evilmartians.com/clients/wallarm):** optimized the Go event-processing pipeline behind their high-throughput security data.
- **[NATS](https://evilmartians.com/clients/nats):** made their Ruby SDK 3x faster.
- **[Steel](https://evilmartians.com/clients/steel):** backend services built inside their TypeScript monorepo.
