Antti-Jussi Kovalainen
  • About
  • Blog
June 1, 2015 Reading time: 47 seconds

The Recipe for the Worlds Largest Rails Monolith by Akira Matsuda

Akira Matsuda gave a really good talk on some of the problems that CookPad has run into with their quite sizable Rails app:

  • 300 app servers, deploys are slow (~20min) => replaced capistrano with a handmade deploy program (mamiya) which deploys in 1 min

  • 1000+ models, 30 databases, ActiveRecord is choking => read / write splitting, handmade ActiveRecord adapter for this (switch_point)

  • Tests take 5 hours
    => execute rspecs distributedly (rrrspec)
    => use a beefy, spot instance server to run tests. Cheap.
    => database_cleaner is slow with 1000+ tables => database_rewinder

  • ActiveRecord migrations take forever to execute => ridgepole

  • Big rails app with big team results in code conflicts => created a rapid prototyping framework for rails (chanko)

  • Upgrading rails: created a response verification tool (kage)

Conclusion: Monolithic apps can scale, you don’t have to split it into many apps, eventho' microservices are really hot these days. Microservices bring their own problems and are not a silver bullet.

Written by Antti-Jussi Kovalainen
Share article Facebook Twitter WhatsApp
I'm a digital nomad Writing Fast Ruby by Erik Michaels-Ober
  • Twitter twitter.com/darep
  • GitHub github.com/darep
  • Flickr flickr.com/photos/dareppi
  • Email ajk@ajk.fi

© Antti-Jussi Kovalainen

Made with the know-how and the elbow grease