Skip to main content

Read replicas

Beta

Lakebase Postgres (Autoscaling Beta) is the next version of Lakebase, available for evaluation only. For production workloads, use Lakebase Public Preview. See choosing between versions to understand which version is right for you.

Read replicas are independent read-only computes that perform read operations on the same data as your primary read-write compute. Lakebase read replicas don't replicate or duplicate data. Instead, read requests are served from the same storage layer. While your read-write queries are directed through your primary compute, read queries can be offloaded to one or more read replicas.

Read replica project

You can create read replicas for any branch in your database project and configure the size of the compute allocated to each. Read replicas support Lakebase's autoscaling and scale-to-zero features, providing you with the same control over compute resources that you have with your primary compute.

Read replica architecture

Your primary compute and read replicas send read requests to the same storage layer, ensuring that all computes read from a consistent data source. Read replicas are asynchronous, which means they are eventually consistent. As updates are made by your primary compute, the storage layer durably stores data changes and keeps read replica computes up to date with the most recent changes to maintain data consistency.

Read replica architecture

Use cases

Lakebase read replicas have several key applications:

  • Horizontal scaling: Distribute read requests across replicas to improve performance and increase throughput.
  • Analytics and reporting queries: Offload resource-intensive analytics and reporting workloads to reduce load on your primary compute.
  • Read-only access: Grant read-only access to users or applications that don't require write permissions.

Benefits of Lakebase read replicas

  • No additional storage required: Read replicas read from the same storage as your primary compute with no data duplication or replication.
  • Create them almost instantly: With no data replication required, read replicas can be created in seconds.
  • Cost-efficient: No additional storage costs, plus benefit from autoscaling and scale-to-zero features.
  • Instantly available: Read replicas scale to zero without lag and are immediately up to date when they start.

Create and manage read replicas

You can create read replicas using the Lakebase App. From the Computes tab on a branch, click Add Read Replica to instantly provision a new read replica compute.

note

You can add read replicas to a branch as needed to accommodate your workload.

For detailed instructions on creating and managing read replicas, see Manage read replicas.