Ingesting the Milky Way: Petabyte-Scale with Zerobus Ingest
Databricks' new Zerobus Ingest service sustains 12 GB/s throughput to a single table, eliminating the need for Kafka-based streaming infrastructure.
Deep dive
- Dynamic Partitioning: Scales compute resources automatically based on stream connections rather than static broker partitions.
- Zero-copy parsing: Uses custom Rust-based protobuf decoding to avoid memory allocations and buffer copying.
- Performance: Achieved 12 GB/s per table throughput in benchmarks.
- Ordering Guarantees: Moves ordering guarantees from individual partitions to the stream connection level.
- Managed Service: Fully integrated with Unity Catalog and serverless compute.
Decoder
- Zero-copy: A technique where data is processed without being copied between different memory areas, significantly improving performance.
- Delta Table: A storage layer that brings reliability and ACID transactions to data lakes.
- Protobuf: A language-neutral, platform-neutral extensible mechanism for serializing structured data.
Original article
- Databricks Zerobus Ingest is a serverless streaming API that enables teams to instantly deploy petabyte-scale data pipelines without manual infrastructure management.
- Zerobus’ architecture relies on dynamic partitioning to automatically scale compute resources, efficiently handling unpredictable data volumes without complex tuning.
- This zero-setup framework easily processes massive workloads, demonstrating the ability to sustain over 12 GB/s throughput to a single table during 24-hour benchmarks.
Telemetry data is everywhere. IoT sensors on factory floors. Satellite arrays scanning the atmosphere. Autonomous vehicles are logging thousands of events per second. Every one of these systems has the same underlying problem: a continuous, high-volume stream of time-series observations that needs to land somewhere queryable. It needs to be fast, reliable, and without an engineering team spending weeks tuning and maintaining infrastructure that is typical of Kafka based workloads.
That's the problem Zerobus Ingest is built to solve. Zerobus is Databricks' fully managed, serverless streaming ingest service. It's a push-based API that accepts data from any producer and writes it directly into Delta tables, governed by Unity Catalog.
- No infrastructure to provision.
- No connector pipeline to maintain.
- No partitions or broker decision-making.
Instead, you create a table and push data. It lands in your lakehouse, ready to query in seconds. You no longer need to run Kafka as a pipe when your destination is the lakehouse.
We used NASA’s NEOWISE dataset, representing 200 billion data points over 11 years, to benchmark Zerobus Ingest, ingesting 1 petabyte in under 24 hours, with zero pre-configuration and stable latency.
By ingesting 1PB within 24 hours, we demonstrate Zerobus’s ability to maintain continuous throughput of 12 GB/s to a single table!
This post walks through three of our design decisions that made this possible.
- Designing a system that autoscales via dynamic partitioning.
- Building our own zero-copy protobuf decoder.
- Implementing a latency-optimized write-ahead log before data is published to the lakehouse.
Our key design decisions
Our aspiration was to build a streaming system that could support petabyte-scale and auto-scale to handle fluctuating ingestion patterns.
Traditional streaming architectures require you to decide how many brokers and partitions a given workload needs. This requires knowledge of peak load and consumer ingestion constraints, as well as forecasting and an understanding of the end-to-end pipeline.
By going back to first principles, we designed and built a system that scales to handle petabyte-sized workloads for data producers “magically.”
Autoscaling achieved through dynamic partitioning
The problem we were trying to solve was how to have efficient autoscaling to achieve elastic “limitness” scaling.
Our thesis was that by moving away from static partitioning and toward the logical unit of a stream/connection, we could unlock true autoscaling and rebalancing while maintaining ordering guarantees, which are important for consumption workloads.
The static partition problem
In message bus architectures, partitions are the unit of both parallelism and ordering. This coupling creates a constraint that can be painful once you have consumers who depend on it.
Ordering is typically a per-partition guarantee, not per-producer. The number of partitions and the distribution of data across them affect a consumer's ability to keep up with ingestion.
We moved the ordering guarantee to the stream connection
In traditional systems, ordering is a partition-level guarantee. In Zerobus Ingest, ordering is a stream connection-level guarantee.
When a producer opens a stream with Zerobus (a connection to our server), they're registering a logical identity with the service. For the lifetime of that connection, their data arrives in order, regardless of which “partition” pod processes it.
Hot routing and true autoscaling
Internally, Zerobus Ingest distributes streams across a pool of pods. Routing is heuristic-based: if a pod is running hot, new incoming streams are routed to a different pod. The producer is unaware. Their ordering guarantee is unaffected.
Ordering lives at the stream level, which means pods can be added when demand spikes and removed when demand drops. Existing streams then drain gracefully, and new streams stop routing there. The pool then shrinks, keeping compute utilization efficient.
Zero-copy high-performance data handling
Zerobus's main goal is to allow an efficient, row-by-row transfer of data streams of any volume. To achieve this, we needed to completely avoid any needless copying and memory allocations - from the input formats that clients send to Zerobus, to the internal formats that guarantee durability and open Delta formats.
The result was that we built zeroparser: Bridging this gap by using single-pass parsing with zero memory allocations, enabling it to sustain throughputs of ~1 GB/s protobuf parsing per CPU core even with dynamic descriptors and complex schemas.
Write Ahead Log
Streaming is not just about being able to handle high-throughput workloads. To be a true streaming service, you also need to support message handoff as quickly as possible. This low latency of handing off data is what truly distinguishes streaming workloads from batch.
To support this low-latency handoff with a durability guarantee, Zerobus implements a latency-optimized write-ahead log (WAL). Once messages are durable, Zerobus sends an acknowledgement back to the client.
Proof: Ingesting the Milky Way
The key to benchmarking a system comes with the understanding of how it would be used in a production setting, and then emulating that behavior and usage.
Why Locust? The Fan-In Problem
Zerobus Ingest is built to aggregate streams from many independent producers into a single destination table. Its throughput scales with the number of concurrent open streams.
The results
Our test results showed Zerobus Ingest’s ability to sustain 12 GB/s to a single table over a 24-hour period from 2,048 concurrent workers to a single table. Over this period, Zerobus ingested over a trillion records.
What's next
Zerobus Ingest is now Generally Available on Databricks and ready for all your production workloads.
On the roadmap:
- Kafka Producer API support
- MQTT API support
- Rescue column
- System metadata column
- Avro support
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi