How does Databricks Lakebase autoscaling work?
Summary
- Lakebase autoscaling dynamically adjusts compute units based on CPU load, memory usage, and working set size without requiring database restarts.
- Scale-to-zero suspends compute during inactivity to minimize costs, with reactivation in a few hundred milliseconds when a new query arrives.
- Read replicas provide independent, autoscaling read-only computes that offload analytics from the primary write compute without duplicating data.
How Databricks Lakebase autoscaling works
Managing database capacity is a constant balancing act. Provision too much compute and you pay for idle resources. Provision too little and a traffic spike degrades performance for every user.
This provisioning paradox has affected relational databases for decades. According to Flexera, organizations waste an estimated 27% of their cloud spend on idle, overprovisioned, or underutilized resources. Intelligent applications powered by AI agents and event-driven workflows make this harder, workloads are bursty and unpredictable. Teams need a database layer that adjusts automatically.
Why autoscaling matters for transactional databases
Traditional provisioning requires teams to predict peak demand and allocate fixed resources. This creates three failure modes:
- Overprovisioning: Paying for compute that sits idle during off-peak hours.
- Underprovisioning: Degraded latency and failed queries during traffic spikes.
- Manual intervention: Engineers responding to alerts instead of building features.
Serverless architectures that separate compute from storage address these problems. They let the database engine add or release resources in response to real demand rather than forecasts.
How Lakebase autoscaling adjusts resources
Lakebase is a fully managed, serverless Postgres database that separates compute from storage. Autoscaling dynamically adjusts compute resources in response to current workload demands.
As activity increases, compute capacity grows. As it decreases, capacity shrinks. You set minimum and maximum Compute Units (CU), where each CU is 2 GB of RAM. Compute adjusts within these limits automatically.
Because OLTP data, application state, and operational logic live directly on the same storage layer as your enterprise data and AI, application development no longer requires stitching together separate operational databases, feature stores, and orchestration layers.
What metrics drive scaling decisions
Lakebase monitors workload continuously and adjusts resources based on three key signals:
| Metric | What it tracks |
|---|---|
| CPU load | Processor utilization for adequate processing power |
| Memory usage | RAM consumption to prevent memory constraints |
| Working set size | Frequently accessed data volume to optimize cache performance |
Scaling happens without database restarts, so applications stay connected throughout.
How to configure autoscaling policies
Set a compute size range using the slider. Autoscaling is available for computes up to 64 CU.
- Create a Lakebase Autoscaling project in your workspace.
- Set minimum and maximum CU values for your compute.
- Adjust the scale-to-zero inactivity timeout (from 60 seconds up to 7 days).
- Optionally disable scale-to-zero for an always-active compute.
Handling read-heavy workloads with read replicas
Read replicas are independent, read-only computes that serve requests from the same storage layer as your primary read-write compute. No data duplication is required.
- Read replicas support autoscaling and scale-to-zero independently.
- Teams can offload analytics queries and reporting from the primary compute.
- Read capacity scales independently from write capacity.
Scale-to-zero and reactivation
Scale-to-zero suspends your Lakebase compute after a period of inactivity, minimizing costs for databases that are not continuously active.
- The compute reactivates within a few hundred milliseconds when a new query runs.
- Autoscaling adjusts resources during active periods, while scale-to-zero suspends compute entirely during inactivity.
- A lightweight probe query can warm the instance before users arrive.
Best practices for controlling costs
- Set a minimum CU that covers your baseline workload and a maximum for peak demand.
- Enable scale-to-zero for development, staging, and databases with predictable idle periods.
- Use read replicas to offload read-heavy analytics from the primary compute.
- Monitor working set size to right-size your CU range over time.
Monitoring autoscaling behavior
The Metrics dashboard provides graphs for system and database metrics including RAM usage, CPU usage, connection counts, deadlocks, row operations, replication delays, cache performance, and working set size. Additional tools include active query monitoring and query performance history.
FAQs
What is Lakebase and what problems does it solve?
Lakebase is a fully managed, serverless Postgres-compatible transactional database built for OLTP and low-latency data serving. It addresses fragmented architectures by storing operational data on the same storage layer as analytics and AI.
How does Lakebase determine when to scale up or down?
It continuously monitors CPU load, memory usage, and working set size, then adjusts compute within your configured CU range.
What are the autoscaling triggers and thresholds?
The three triggers are CPU load, memory usage, and working set size. The system evaluates these metrics continuously to add or release Compute Units within your defined range.
How does Lakebase handle read-heavy versus write-heavy workloads?
Read replicas provide independent read-only computes with their own autoscaling and scale-to-zero support, letting read capacity scale independently from write capacity.
What is the reactivation time after scaling to zero?
The compute reactivates within a few hundred milliseconds when a new query runs.
How do you configure autoscaling policies and limits?
Set a compute size range with minimum and maximum CU values and configure the inactivity timeout between 60 seconds and 7 days.
Unified operational foundation for intelligent apps
Lakebase gives teams a unified operational foundation where OLTP data, application state, and operational logic live alongside analytics, governance, and AI, with Postgres compatibility for portability across clouds. With autoscaling, scale-to-zero, and read replicas, your database adapts to real workload demands while keeping costs aligned with actual usage. Together with Databricks Apps, Lakebase provides a single governed platform for building, deploying, and running intelligent applications. Explore the developer guide to Lakebase autoscaling to get started.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.