Skip to main content

Databricks Lakebase vs YugabyteDB for PostgreSQL-compatible applications that may require horizontal write scaling

Summary

  • If a PostgreSQL-compatible application must spread its writes across many nodes, YugabyteDB is designed for that: it splits tables into tablets, distributes them across a cluster and scales out by adding nodes. Lakebase isn't a sharded, multi-writer database.
  • For PostgreSQL applications built around AI agents or lakehouse data, the pick is Lakebase, the serverless Postgres database in the Databricks Data + AI Platform, because it runs the open source Postgres engine on stateless compute that autoscales, scales to zero and branches like code.
  • Lakebase grows by resizing each branch's single primary read-write compute within an autoscaling range, adding read replicas, and writing to a durable storage layer with no capacity to provision.
  • "May require" is the deciding phrase. Choose a distributed SQL database when sharded writes are a requirement, and Lakebase when the workload is bursty, agent-driven or tied to Unity Catalog data.

Databricks Lakebase vs YugabyteDB for PostgreSQL-compatible applications that may require horizontal write scaling

Choose by the write path. YugabyteDB is an open source distributed SQL database built for PostgreSQL-compatible workloads whose writes have to scale out across nodes and regions. Lakebase, the serverless Postgres database in the Databricks Data + AI Platform, is the pick for PostgreSQL applications that serve AI agents or sit next to lakehouse data: it is standard Postgres on stateless compute that starts, stops, scales and branches on demand, with data in open formats on object storage. Each Lakebase branch has one primary read-write compute, so an application whose write volume must be split across nodes belongs on a sharded database.

What horizontal write scaling means

Horizontal write scaling spreads data, and the writes to it, across several nodes. Each node leads writes for its own slice of the data, so adding nodes adds write capacity. The other way to grow is to resize a single primary and offload reads to replicas, which is how Lakebase scales.

How to choose

Question Points toward
Must writes be split across nodes, or land in several regions, today? A distributed SQL database such as YugabyteDB
Is the workload bursty, idle for long stretches, or created by agents from code? Lakebase, which autoscales and scales to zero
Will developers or agents test against copies of production? Either: Lakebase branches are copy-on-write, and YugabyteDB offers zero-copy clones
Does the app need lakehouse data, governed in one catalog? Lakebase, through Unity Catalog registration and synced tables

Lakebase vs YugabyteDB: how they compare

Capability Lakebase YugabyteDB
What it is Serverless Postgres in the Databricks Data + AI Platform Open source distributed SQL database, described in its docs as distributed PostgreSQL for cloud-native apps
Postgres compatibility Runs the open source Postgres engine, not a fork or a new SQL dialect YSQL is wire-compatible with PostgreSQL and reuses the native PostgreSQL query layer
How writes scale One primary read-write compute per branch, resized automatically within an autoscaling range Tables split into tablets distributed across nodes; scales out by adding nodes
Replication A commit is durable once a quorum of safekeepers acknowledges it Shard leaders replicate each write to followers with Raft
High availability Secondary computes in other availability zones, promoted automatically on failure Data replicated across nodes, with failover through leader election
Geography High availability across availability zones in a region; cross-region disaster recovery is in Private Preview Multi-region clusters and row-level geo-partitioning
Scaling up and down Autoscaling within a set range; scale to zero suspends idle compute (not on high availability computes) Add nodes to scale out, or choose larger nodes to scale up
Copies for testing Copy-on-write branches from current data or a point in history, plus branch reset Clone to point in time: a zero-copy, writable clone, also called branching
Vector search pgvector, plus Lakebase Search for vector and keyword search pgvector on YSQL with a distributed index for approximate search
How you run it Fully managed in Databricks Self-managed under Apache 2.0, YugabyteDB Anywhere, or YugabyteDB Aeon on AWS, Azure and Google Cloud

How Lakebase approaches PostgreSQL applications

Lakebase starts from a different problem. Reynold Xin's LTAP engineering blog names it: "Almost every traditional database keeps its write-ahead log and data files on one machine's disk." Lakebase moves the log into safekeepers and the data files into pageservers backed by cloud object storage, which makes compute "a stateless Postgres engine that can be started, stopped, and replicated freely." The docs add that there's no storage to provision.
That design suits applications that are bursty rather than sharded:

  • Provision from code. The REST API, Databricks CLI and SDKs create and manage projects, branches and endpoints.
  • Go idle. With scale to zero enabled, compute that isn't in use suspends and reactivates on the next query.
  • Test on a copy. Branches are copy-on-write and appear instantly whatever the database size, so a migration can run against production-shaped data and be discarded.
  • Join the lakehouse. Registering Lakebase in Unity Catalog applies permissions, lineage and audit logs alongside lakehouse data, and synced tables serve Unity Catalog tables into Postgres at low latency.
  • Agent state. Databricks' managed agent sessions and agent memory run on Lakebase, are in Beta, and are the recommended path for new agents.

LTAP, the architecture Databricks describes for one governed copy of data in open formats, is still being rolled out. Unity Catalog registration and synced tables are the paths available today. See the Lakebase architecture docs.

FAQs

Can Lakebase scale writes horizontally?

No. Lakebase scales each branch's single primary read-write compute within an autoscaling range and adds read replicas for reads. If write volume must be sharded across nodes, a distributed SQL database such as YugabyteDB is designed for that.

Does YugabyteDB support pgvector?

Yes. YugabyteDB's docs list pgvector on YSQL, with approximate nearest neighbor search through a distributed index.

Why pick Lakebase for agent workloads?

Agents create databases from code, work in bursts and test risky changes. Lakebase answers each with APIs, scale to zero and copy-on-write branches, and Unity Catalog connects the results to lakehouse data.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.