Capacity Planning for Multi-Tenant SQLite Applications
18-Oct-2025 452
Capacity planning is hard when you have multiple users with SQLite databases, users are pinned to specific machines, and there are hard memory limits. As the number of users grows and regions are consolidated, I need to reconsider my capacity planning strategy.
Here's the topology of my showcase application:
Each user is a dance studio, and each dance studio has multiple events (past, current, and future).
Each event is a separate tenant with its own database and its own instance of the same Rails application.
All tenants for a given user are on the same machine.
Multiple users (and their tenants) are assigned to the same machine.
Currently, I have 70+ users distributed across 8 machines. At the moment, sjc and iad are the most concentrated regions.
Puma is configured to three threads per tenant. Individual tenants (Rails applications) are shut down after five minutes of idle. Machines suspend at thirty minutes of idle.
All machines are provisioned with 2GB of RAM and bad things happen (OOM kills, performance degradation) when that limit is reached. The concern is that with multiple tenants on a single machine, memory will run out.
Capacity Planning for Multi-Tenant SQLite Applications #ruby #rubydeveloper #rubyonrails #Capacity #Planning #Multi-Tenant #SQLite #Applications #applications #sqlite https://www.rubyonrails.ba/link/capacity-planning-for-multi-tenant-sqlite-applications