
When platform providers talk about autoscaling, they usually mean one thing: application autoscaling, adding or removing web instances based on traffic. The pattern is well understood. Define a metric, set a threshold, and let the platform act on it.
Most platforms still leave database capacity as a separate, mostly manual problem. Teams either pre-provision for the worst hour of the worst day, upgrade plans on a calendar, or wire together their own scaling logic on Kubernetes or RDS. The result is the same in each case: capacity that doesn't match demand, and operational overhead that doesn't earn its keep.
The phrase gets used loosely. Here's how we use it on Upsun:
Full-stack autoscaling: every layer of your stack scales itself with demand, natively, on one platform: applications, workers, and managed databases.
Concretely, three things scale horizontally on the same Upsun primitive:
All three respond to the same signals: average CPU and memory utilization across running instances. All three follow the same logic: add capacity when utilization stays above a threshold, remove it when utilization stays below one. All three live in the same project, on the same bill, with one mental model.
Autoscaling on Upsun is horizontal: it adds or removes whole instances of a service. For databases, that means scaling the read replica pool of your primary PostgreSQL or MariaDB service. You configure a baseline replica once; autoscaling adjusts the pool size from there in response to load.
The platform watches the average CPU and memory utilization of your running replica pool. When utilization stays above your scale-up threshold for the evaluation period, an additional replica joins the cluster. When it stays below your scale-down threshold for the evaluation period, an additional replica is removed. A cooldown window between actions prevents the pool from oscillating up and down on short bursts.
Defaults give you a sense of the shape:
You can use CPU, memory, or both as triggers, and you can tune every threshold per environment, including development and staging, not just production.
Two technical details matter for honest expectations:
Your application code is responsible for directing read queries to the replica. The connection string is exposed through PLATFORM_RELATIONSHIPS under the replica relationship name (for example, database-readonly). Most ORMs and database libraries support this pattern with a separate read connection. It's a code change, not an infrastructure one.
There are three other ways to get database autoscaling today. Each is real, and each comes with trade-offs Upsun is explicitly trying to avoid.
Upsun's read replica autoscaling runs directly on the managed PostgreSQL and MariaDB services that already power your project. No third engine, additional layer, or assembly required.
This feature is purposely scoped. It's designed for workloads where adding read capacity actually relieves database pressure.
Consider an e-commerce application on a managed PostgreSQL database. On a normal weekday, one or two replicas handle the read load, with CPU sitting around 30-40%.
Friday evening, a campaign goes live. What happens next:
The next invoice reflects actual capacity used during the spike, not capacity sized for it ahead of time. The calendar reminder, the manual bump, the follow-up reminder to scale back down, all of it goes away.
Setting up read replica autoscaling takes two layers of configuration:
In your .upsun/config.yaml:
The PostgreSQL and MariaDB docs walk through the configuration in full.
Turn on autoscaling for the replica service from either:
The settings match those for application and worker autoscaling:
Apps, workers, and managed databases on one platform, on one primitive, on one bill. That's what full-stack autoscaling actually means.
If you don't already have a read replica configured, these resources provide a walk-through of the service definition. More on configuration, tuning, and related concepts:
If you don't already have a read replica configured, these resources provide a walk-through of the service definition. More on configuration, tuning, and related concepts: