A company runs a multi-tenant SaaS platform on AWS. Each tenant has their own database schema within a shared PostgreSQL database on Amazon RDS. The platform has grown to thousands of tenants, and the single RDS instance is experiencing performance degradation due to resource contention. Queries from one tenant can impact others. The company needs a solution that isolates tenants, provides predictable performance, and allows easy scaling. They also want to minimize application changes. The application uses an ORM that dynamically constructs SQL queries based on the tenant ID. Which solution is BEST?
This provides full isolation and predictable performance. RDS Proxy reduces connection overhead. Application changes are limited to connection routing logic.
Why this answer
The best solution because it provides full tenant isolation by assigning each tenant a separate RDS instance, eliminating resource contention and ensuring predictable performance. RDS Proxy efficiently manages connection pooling for each instance, reducing overhead. The application change is minimal: the ORM can be configured to dynamically select the correct database instance based on the tenant ID, preserving the existing SQL-based logic.
In contrast, Option A (Aurora Auto Scaling) still shares a single database, offering no isolation. Option C (RDS Proxy on the existing instance) also fails to isolate tenants. Option D (DynamoDB) would require a complete rewrite of the data layer, violating the requirement to minimize application changes.