The Recipe for the Worlds Largest Rails Monolith
summary
Cookpad runs a single Rails monolith with 1,700 ActiveRecord models, ~400,000 LOC, 276 gems, 50M monthly users and peaks at 15,000 req/s served by up to 300 app servers and 30 DB servers. They build their own autoscaler and immutable images, a fast deployer called mamia deployer (uses goip, 300 servers in ~1 minute), a Master/Slave switcher switch_point, distributed test runner on c3.8xlarge spot instances that shrinks 5‑hour specs to ~10 minutes, a patched DB cleaner, a prototyping framework chano, and a shadow proxy for safe Rails upgrades.
AI-written summary · about
chapters (10)
- 0:00Start
- 10:31The application must run fast
- 12:16300 servers (maximum, before the dinner time) We do not always need 300 servers
- 12:54Similar to Amazon AutoScaling We don't want to see different versions running on different servers Locks auto-scaling when deploying Locks deployment when auto- scaling
- 15:22mamiya Uses Serf for orchestration Gossip protocol instead of SSH Collaborates with the repo, the Cl server, and the auto- scaler
- 23:09Distributed Optimization of the test execution order Highly fault-tolerant
- 27:10We made our own prototyping framework
- 30:11We run the actual user requests on shadow servers We compare response body HTMLs created in the tests
- 30:32HTTP shadow proxy server Duplex requests to the master (production) server and shadow servers
- 35:18Think before start splitting your service
related talks
43mThe history of a Rails monolith
32m2000 engineers, 2 millions lines of code: the history of a Rails monolith
21mTaming Monoliths Without Microservices
39mTaming Monoliths Without Microservices
32mBuilding HUGE Web Apps: Rails at 1,000,000 Lines of Code
28mBringing Your Rails Monolith Along As The Business Grows
26mMonolith-ifying perfectly good microservices
31mMega Rails
