‹ Back to Blog

Rails

5 hard-earned lessons from a decade of Rails performance work

The last 3,650 days of my professional life have been focused on making Rails apps faster. Below are five lessons I've learned the hard way. 1. Facts alone won't convince the business folk to care about performance The typical pitch to prioritize making an app faster & more reliable goes ...

A Complete Guide to Rails Caching

If you are using Ruby on Rails, caching might be one of the best tools on your belt to build a better application. The idea behind caching in Rails is to serve thousands of concurrent users on a single server with a single database attached. Let’s take a look at some of the benefits caching can provide.

What’s new in Rails 6?

With the official release of Rails 6 just around the corner, we round up all the major new features coming your way. It is an exciting release due to some big features coming upstream from the Basecamp and GitHub projects. Amongst the many minor updates, useful tweaks and bug fixes, Rails 6 will ship with two completely new frameworks: ActionText and ActionMailbox, and two big scalable-by-default features: parallel testing and multiple database support. So set your Gemfile to get Rails 6.0.0.rc1 and let’s get started!

ActiveRecord: biting the hand that feeds you

Richard Schneeman (better known as Schneems) recently wrote about how he reduced his database server load by 80% ...with one simple trick . In the Hacker News discussion that followed, much of the debate was on the merits of using an ORM like ActiveRecord...or not: In every case I can ...

The danger of Rails.env.production?

When I do a code review, one of the scariest things I see is logic like this: if Rails.env.production? do_additional_work end Why? Your beautiful tests and tightly integrated CI system won't execute that code. You won't see that code execute as you refresh your browser in development. From syntax errors ...

Deploying to AWS Part III: Log aggregation

Looking for a fresh, 2018 approach to deploying a Rails app to AWS? We've partnered with DailyDrip on a series of videos to guide you through the process. We'll be covering how to Dockerize a Rails app, AWS Fargate, logging, monitoring, and CDN support. In our last video , we ...

DevTrace and the Art of Staying the F*** Out of the Way

DevTrace is a performance widget for your Rails applications in development. It sits unobtrusively in the corner of your page, just waiting to drop insight on your application: See stack traces, SQL timings, and more with just a click! This kind of insight is powerful. You can see how your ...

Monitoring Sidekiq Jobs

Teaser for a soon-to-be released capability: Overview metrics for all your background jobs Chart throughput, latency, error rate, and more. Detailed drill-down on slow jobs See what's making the job slow, identify N+1 queries, and more. Tech preview - want in? Background job monitoring currently supports sidekiq, and is tech ...

5 Pillars of Rails Cluster Monitoring

Photo by mollypop My how you’ve grown! A couple of years ago your little Rails app was on a single server. Now you’re on a whole cluster – you’ve got web servers, database servers, HAProxy servers, and more. I’m so proud of you! Monitoring your Rails cluster has gotten more ...