About This Title

Pages: 250
Published: September 2025
ISBN: 9798888651025
In Beta

Skill Level Meter

Rails Scales!

Practical Techniques for Performance and Growth

by Cristian Planas

Rails doesn’t scale. So say the naysayers. They’re wrong. Ruby on Rails runs some of the biggest sites in the world, impacting the lives of millions of users while efficiently crunching petabytes of data. This book reveals how they do it, and how you can apply the same techniques to your applications. Optimize everything necessary to make an application function at scale: monitoring, product design, Ruby code, software architecture, database access, caching, and more. Even if your app may never have millions of users, you reduce the costs of hosting and maintaining it.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $30.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Sep 2025

Beta Books: What do I get?


Optimize every aspect of your Ruby on Rails applications for world-class performance. Tweak your Rails app for snappy responsiveness. Find bottlenecks that slow your code. Scale an app for massive data sets.

This book introduces techniques, patterns, and tricks to make your Rails application become more performant and scale to billions of requests per day. And it does it in an entertaining and fun way, sharing real-life stories of all kinds: tales from the trenches of working on massive Rails apps, and anecdotes from working on much smaller projects in tiny organizations of a handful of engineers. Through all these experiences you will learn that scaling Rails applications is a multifaceted task, including aspects such as monitoring, query tuning, and memory-aware coding.

This book is for programmers of all levels of experience, from beginners to experienced Rails veterans. You can even show your nontechnical colleagues the features and limitations of Rails at scale.

Reading this book will help you make Rails applications that fly. And it will make you enjoy the process.

What You Need

In the course of this book we will be using Rails 7.0 and Ruby 3.1. The data stores used will be MySQL, Postgres, Redis, and Memcached.

Resources

Releases:

  • B2.0 2024/08/16
  • B1.0 2024/07/15

Contents & Extracts

Note: Contents and extracts of beta books will change as the book is developed.

  • Introduction
    • The Origin Story
    • We Need to Talk about the Rails Learning Curve
    • Techniques for a Rails Renaissance
  • Setting up Your Machine
    • Understanding the Application Database Setup
    • Downloading the Application
    • Setting up Ruby
    • Installing the Database(s) and the Caching Stores
    • Setting up Rails
    • Loading the Example Dataset
    • Summing Up
  • Monitoring Performance to Build Scalable Systems
  • Optimizing Data Access with ActiveRecord excerpt
    • Managing Data the Rails Way
    • Removing n+1s and Preloading Data
    • Discovering Fat Fetching and Lean Fetching
    • Explaining EXPLAIN
    • Indexing
    • Summing Up
  • Understanding All the Faces of Caching
    • Caching and Denormalizing
    • Using counter_cache in Rails
    • Setting up Your Caching
    • Using Fragment Caching
    • Using Russian Doll Caching
    • Writing Your Own Caching
    • Using Write-through Caching excerpt
    • Implementing Fan-out Writing
    • Using Action Caching and Page Caching
    • Adding a Cache Layer to ActiveRecord
    • Choosing a Storage System for Your Cache
    • Using Denormalization
    • Summing Up
  • Designing a Scalable API
    • Paginating Your Endpoints
    • Splitting Your Model Data
    • Summing Up
  • Using Ruby Efficiently
  • Tracking the Lifecycle of a Request
    • Crossing the Internet with One Request
    • Using HTTP Headers to Speed up Your Application
    • Unlocking the Power of 304s
    • Introducing CDNs
  • Thinking Architecture for Performance
    • Designing Scalable Systems
    • Discovering Sharding excerpt
    • Improving your Response Time with Asynchronous Processing excerpt
    • Getting Started with Event-driven Microservice Architectures
    • Summing Up
  • Designing Product for Performance
    • Working on Scalability with a Product Perspective
    • Setting Product Limits
    • Managing the Life of Your Data
    • Doing Things that don’t Scale
    • Increasing Your Usability Time
    • Summing Up

Author

Cristian Planas has worked with Ruby on Rails for more than 10 years. He has used Rails in wildly different situations, ranging from being the CTO of a start-up, to writing an application for small NGOs. He is currently Group Tech Lead at Zendesk, where he focuses his time on improving the performance of one of the biggest Rails monoliths in the world.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $30.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal

This book is in Beta, final version expected Sep 2025

Beta Books: What do I get?

Related Titles:

Skill Level Meter

About This Title

Pages: 250
Published: September 2025
ISBN: 9798888651025
Edition: 1
In Beta