Learn how to transform your snail-paced Rails app into a sub-100 millisecond powerhouse.
The Complete Guide to Rails Performance is a full-stack course that gives you the tools to make your Ruby on Rails applications faster and more delightful for users, scale better and for less money, and take less effort to maintain.
3rd Edition: Updated for Rails 5 through Rails 7.1
The secret is that Rails apps aren't slow or hard to scale by default - they die a slow death by a thousand papercuts. This course is about each one of those thousand papercuts.
But you don't have a team of 30 or more experienced programmers, like Shopify, Github and Basecamp do. And let's be real - you're not DHH. Maybe you're a startup CTO with a business to run - you can't spend hundreds of hours tracking down performance bugs.
My name is Nate Berkopec. I'm a Rails developer and a speed freak. I also maintain Puma - my code is probably already running on your servers, today.
Over the past 10 years, I've seen dozens of different Rails codebases. Many were for well-funded startups, from Ivy-League incubators like YCombinator or 500Startups. Others were the passion projects of developers looking to start a side business.
I've consulted for dozens of clients on making their Rails apps faster, and taught hundreds at workshops.
But I've never met a Rails application I couldn't make faster.
Did you know that an extra second of load time reduces revenue by 5 to 10%? This result has been experimentally verified at dozens of companies large and small.
If your business is doing $1 million per year, reducing browser load times by 1 second will increase revenue by $50,000 to $100,000 per year. I can show you how to make your site faster and grow your business by at least that much and more.
Did you know that most Rails applications I've seen in my consulting gigs have been spending more than 2x per month what they needed to?
Most Rails applications should be spending thousands of dollars per month less than they are now. I'll show you how to audit and fix your server spending.
Performance isn't easy. Delivering an HTML response to the browser actually involves hundreds of technologies and levels of the stack. Constructing a fast website is a bit like constructing a house of cards - a problem anywhere in the stack can cause it all to collapse.
Any of these levels or stacks can go wrong, causing a slowdown in your application:
Performance optimization on a full-stack web application is like looking for a black cat in a coal cellar - any one of a thousand things could be the bottleneck for your application. Where do you even start?
Worse, no full-stack developer who writes code for a living can keep on top of all of these developments at once. My guide for optimizing Rails applications covers the entire stack.
Wouldn't it be amazing if you could look over the shoulder of an experienced, full-stack Rails developer and watch as they diagnose and solve the performance problems of one of the most popular Rails applications in the world?
Here's your chance.
I’ve created an exhaustive checklist for speeding up Rails applications:
These strategies have been tested and proven on my clients' sites and others.
While preparing this course, I’ve implemented each of my performance strategies on production websites like rubygems.org, sidekiq.org, the official Ruby website, and more.
Production websites will serve as your example and guide to each and every one of the strategies in this guide.
This is an opportunity to virtually pair program with an experienced Rails developer (me!) and work on a high-scale application.
You’ll see the before and after, comparing the impact of each strategy through actual production metrics. It’s broken down into simple, step-by-step processes that cover every layer of a Rails application’s stack.
At the end of each lesson is a simple checklist so you can implement what you’ve learned. There’s no guesswork. Just follow the plan, and your performance analytics will start sloping down and to the right.
The entire Complete Guide to Rails Performance — all strategies, checklists — are broken into four modules to ensure that you don’t get overwhelmed. You'll easily and methodically chip away at your Rails application’s performance. The course applies to Rails 4.2 through Rails 6.0.
Learn how to identify what areas are causing bottlenecks. Don’t waste time “spraying and praying”, optimizing every thing on your site. Learn how to identify what areas account for 80% of the slowdown.
I cover all the performance problems you can encounter in JavaScript, HTML, and CSS. In addition, I’ll deep dive on HTTP and how the browser works, so that you will reduce your frontend load times by more than 80%.
We'll discuss everything in the Ruby and Rails world that can make your application slow. What gems to use, which to avoid, and how to write Ruby that's zippy quick. You'll learn about how Rails works while avoiding the common pitfalls that make Rails apps slow.
This is truly a full-stack book - I'll discuss asset delivery, CDNs, DNS, server hardware and more.
Will JRuby (or Opal or Rubinius) make my application faster?
Which application server (Unicorn, Puma, Passenger, etc.) is best for my application?
How can I make sure I'm not over-scaled and running on too many servers?
How can I debug a slow ActiveRecord query?
What special areas do I need to look for as my application scales?
What cache backend should I choose?
How can I track down and fix a memory leak?
How can I use Turbolinks without breaking Google Analytics or any of my other JavaScript?
How do I make my Rails application as fast as a Sinatra app?
What's the optimal order of elements in the head tag?
The Complete Guide to Rails Performance course is available online.
Here is what your course will include:
A private Slack channel where you can discuss Rails performance with me and all of the other course participants.
If you do what I show you and don't get results, I will give you 100% of your money back. If you're not completely satisfied, I don't want your money.
Yes. All course participants receive access to a private Slack channel where you can discuss problems and solutions. I'll be sitting in that channel all day. Making your site faster is my job.
Yes. The software world changes quickly. Any changes to the course are free to you forever - you will never be asked to upgrade or buy "version two" or buy again when Rails 8 comes out.
About 25% of the material in the course is broadly covered by my blog. However, even for material that I've covered on the blog already, this course goes much further in depth and expands on those posts. Think of my blog as the introduction. This course is the college class.
No. This course assumes about 12 months of Rails experience, no more. I hate technical writing that assumes the reader is some kind of genius and doesn't explain (or even just link to an explanation) everything that's going on. In addition, even if you're not *completely* sure you've understood a topic, you can ask me and your fellow participants on our private Slack channel. Finally, if you buy the course and decide its over your head, I'll refund your money. No questions asked.
Think about it this way - can your business (or the business you work for) afford to be slow? Can you afford users quitting when they get frustrated with your site's speed? In 5 years, will you wish your site was slower? No. You'll wish it was faster.
Customers demand speed - they won't wait around for you to figure out. If you (or your customers) are not satisfied with the speed of your Rails application, this course will work for you.
This course focuses on the typical Rails stack. In my opinion, that includes a SQL relational database. I include a specific section on Postgres, because it has several unique features and it's so widely used. JS frameworks are not covered (I won't tell you how to optimize React, for example), but I will cover the specific needs of an API-only application.
I've worked on a lot of "legacy" applications. They tend to be slow, so this course *focuses* on legacy applications. However, I'm not going to talk about optimizing previous major versions of anything - Rails 3, Ruby 1.9, etc. As of time of writing (October 2019), this course covers Rails 4, Rails 5 and Rails 6.
If you do what I show you and don't get results, I will give you 100% of your money back. If you're not completely satisfied, I don't want your money.