
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 Ruby on Rails applications faster, more scalable, and simpler to maintain.
The secret is that Rails apps aren't slow 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.
Over the past 4 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.
But I've never met a Rails application I couldn't make faster.
Here are the numbers.
| App server average response time | Status |
|---|---|
| < 50ms | Fast! |
| < 300ms | Average |
| >= 300ms | Slow! |
Those numbers are the standard for Rails applications that serve up HTML - your typical "Basecamp-style" application. For simple API servers that serve JSON only, I divide by 2.
And for the frontend, here's what I'd expect to see:
| Browser load time | Status |
|---|---|
| < 500ms | Fast! |
| < 2 seconds | Average |
| > 2 seconds | Slow! |
These are the numbers I'd expect to see in Google Analytics Site Speed Tool or New Relic's Browser analytics. These are not the load times I'd expect from checking your site load in your local browser - most people's machines and internet connections are slower than your average developer's!
If you're in the "FAST" region of these numbers, well, congrats - this course won't help you. But if you're in the "AVERAGE" to "BAD" group, well, then I can help.
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.
You’ll get to watch, through screencasts and video lessons, exactly how (and more importantly, why) I optimized these real-world production websites.
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 pair program with an experienced Rails developer 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 and screencasts — 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.
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 can 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.
Live Q&A Sessions with me, and a multi-part interview series with accomplished Rubyists. Interviews include DHH himself, Mike Perham (Sidekiq), Sean Griffin (ActiveRecord maintainer), Richard Schneeman (Heroku), Sam Saffron (Discourse), Eileen Uchitelle (Basecamp), and Evan Phoenix (Puma).
A corporate license for the complete and unabridged Complete Guide to Rails Performance, providing access for your entire team.
Everything that's included in the Web-Scale Package.
Private Q&A session with me and your team.
1-Day Performance Workshop where I pair with your team on your application.
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. All videos, checklists and screencasts are all-new material.
No. This course assumes about 3 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 (March 2016), this course covers both Rails 4 and Rails 5.
Yes.
A corporate license for the complete and unabridged Complete Guide to Rails Performance, providing access for your entire team.
Everything that's included in the Web-Scale Package.
Private Q&A session with me and your team.
1-Day Performance Workshop where I pair with your team on your application.
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.