
Ruby on Rails Performance: 7 Lessons from Scaling FirstPromoter
When your Rails app grows from a handful of users to millions of referrals across thousands of programs, performance becomes the whole job. I work on FirstPromoter , an affiliate tracking platform powering 7,000+ affiliate programs. Over the years we've had to figure out how to keep things fast as the traffic kept growing. Here's what a typical week looks like in production: That's more than double the throughput from last year (15.7M → 35.5M) — while simultaneously making things faster. We process payment webhooks from Stripe, Chargebee, Braintree, and Paddle — about 1.47 million per day. Each one needs to be fast and reliable because it directly affects revenue attribution for our customers. Here are seven lessons we learned the hard way. 1. Counter Caching Saves More Than You Think Our dashboard showed counts everywhere — active promoters per campaign, pending referrals, total commissions. Each one a COUNT(*) query hitting PostgreSQL in real time. Rails' built-in counter_cache got u
Continue reading on Dev.to
Opens in a new tab



