Scaling Rails at Aura Frames: Splitting to 8 Primary DBs and Reaching #1 in the App Store | Software Engineer, Author, High Performance PostgreSQL for Rails
Building With Ruby on Rails<br>Technical Metrics<br>Getting Started With Multiple Databases<br>From SQL Joins to Multiple SELECTs<br>New Database Configuration<br>Post-split: Subquery Expressions<br>Post-split: EXISTS Clauses<br>Post-split: Aggregating And Grouping Multiple Tables<br>Post-split: Merging Scopes<br>Post-split: References Method<br>Other Associations: has_and_belongs_to_many<br>Scaling Inserts and Updates<br>Scaling Reads With Batching<br>Scaling Reads With Paginated Queries<br>Counter Cache Maintenance for Frequently Updated Counters<br>Random Values and Sampling<br>Using Memory Key Value Cache Stores<br>Managing Schema Changes with Multiple Databases<br>Wrap UpUpdates
📌 Overview<br>Ruby on Rails has helped make it possible to scale out the database layer, meeting the demands of millions of Aura Frames customers enjoying their digital photo frames.
In late 2025, the team added additional primary databases to expand capacity for peak write and read load ahead of Christmas Day, the busiest day of the year for the company. Rails manages queries and schema changes for each primary database within the same codebase, and now with the additional capacity of many primary databases.
With 8 primary databases in total, each server instance can be vertically scaled ahead of peak load. When load returns to normal levels, instances are scaled down for cost savings.
The team leveraged native support for Multiple Databases and the disable_joins: true feature in Active Record, the ORM for Ruby on Rails. The disable_joins feature replaces SQL joins, issuing multiple SELECT statements to combine data in the application from different databases.
This post looks back at the technical details of that plan, as well as a variety of additional data layer scaling tactics, that culminated in a successful Christmas 2025 season, with peak U.S. and Canadian Apple App Store and Google Play Store rankings of #1.
Building With Ruby on Rails
The Aura Frames platform has been built with Ruby on Rails since the beginning (more than 10 years ago!). Christmas 2025 was the busiest day of the year for the company and technical platform, serving a peak of 41 million API requests per hour (~11.4K requests per second), and processing a peak of 11.8 million background jobs per hour (~3300 jobs/second). On the database side, the sum of DB peak transactions per second (TPS) was 226K.
For an introduction to the Aura Frames company and products, and a deeper dive on the Postgres side of things, please check out Part 1 of this series.
Brief Recap from Part 1 : Besides Ruby on Rails, Aura Frames uses PostgreSQL and AWS as key technologies.
Due to not being easily scalable horizontally for write operations, the database layer of PostgreSQL and Active Record often became a bottleneck. The team relied on vertically scaling the single primary server instance through Christmas of 2024.
The largest instance available for RDS at the time was the 48x family (192 vCPU, 1.5 TB RAM). Even with that jumbo-sized instance, the platform had reliability issues at peak load on Christmas 2024, driving a need to re-design for reliability improvements before Christmas 2025.
To handle greater levels of peak traffic reliably, the team decided to introduce application-level sharding using multiple primary databases. Several alternative approaches were considered. One goal was to leverage the existing code as much as possible, with minimal changes, and control the sharding distribution from the application level.
Another choice was whether to do traditional sharding at the row level, which distributes rows across multiple instances with databases having the same schema.
Fortunately Ruby on Rails was enhanced through more than 15 years of development, to support the needs of mature, scaled-up platforms with billions of rows and terabytes of data.
Before getting into the solution details, let’s look at some technical metrics from Christmas Day 2025 to help set context.
Technical Metrics
On Christmas Day, the Aura Frames platform sees a 4-5x increase in load. Below are some HTTP and background jobs oriented metrics that Rails developers might find interesting.
Metric<br>Peak Value
HTTP Requests (1pm CT) at Load Balancer<br>41 million requests/hour
Average Response Time (10am to 9pm CT)<br>650 milliseconds
Cloudfront Global Requests<br>33,675,000 requests/hour
Image Processing EC2 Instances Count<br>2990
API EC2 Instances Count<br>1849
Background Job Processing Rate<br>11.8 million jobs/hour (~3300 jobs/second)
An exciting development for the team was seeing the free iOS and Android Aura Frames app rise in ranking throughout the day.
Late on Christmas Day, the app reached a peak rank of #1 among all free apps in the U.S. and Canadian App Stores, beating apps from big companies like OpenAI (ChatGPT) and Meta (Meta AI)!
Screenshot showing the Aura Frames app at...