Skip to content

Architecture

Bizon is designed as a modular ELT framework that prioritizes reliability and observability.

┌─────────────┐ ┌─────────────┐ ┌─────────────────┐
│ Source │────▶│ Queue │────▶│ Destination │
│ (Extract) │ │ (Buffer) │ │ (Load) │
└─────────────┘ └─────────────┘ └─────────────────┘
│ │ │
└───────────────────┴─────────────────────┘
│
┌──────┴──────┐
│ Backend │
│ (State) │
└─────────────┘

Sources are responsible for extracting data from external systems. Bizon provides a clean interface for implementing custom sources, with built-in support for pagination, rate limiting, and error handling.

The queue acts as a buffer between extraction and loading, enabling:

  • Decoupling: Sources and destinations operate independently
  • Backpressure handling: The producer pauses when the queue is full, by message count or by memory (max_bytes)

The queue is python_queue, an in-memory queue. Fault tolerance comes from checkpointing, not from the queue. The RabbitMQ and Kafka queue adapters are unmaintained; see Queues.

Destinations handle loading data into target systems. Bizon uses efficient batch loading with:

  • Memory-efficient buffering via Polars
  • Parquet support via PyArrow
  • Configurable batch sizes

The backend stores pipeline state, including checkpoints for recovery. Supported backends:

  • SQLite (sqlite file-based, or sqlite_in_memory for tests)
  • PostgreSQL (production, frequent updates)
  • BigQuery (production, lightweight setup)

Bizon supports multiple execution modes:

ModeDescriptionUse Case
ThreadProducer and consumer in two threadsGeneral purpose
ProcessProducer and consumer in two worker processesCPU-bound work
StreamSynchronous streamingLow latency, real-time pipelines

The Stream runner is designed for real-time, low-latency pipelines. Unlike Thread and Process modes, Stream mode:

  • Bypasses the queue buffer — Data flows directly from source to destination without intermediate buffering, reducing latency and memory overhead
  • Offset committing — Offsets are committed only after a successful write, giving at-least-once delivery for sources like Kafka
  • Synchronous execution — Processes records in a tight loop for predictable performance
┌─────────────┐ ┌─────────────────┐
│ Source │─────────────────────▶│ Destination │
│ (Extract) │ (direct flow) │ (Load) │
└─────────────┘ └─────────────────┘
│ │
└──────────── Offset Commit ──────────┘
│
┌──────┴──────┐
│ Backend │
│ (State) │
└─────────────┘

Use Stream mode when:

  • You need sub-second latency (e.g., Kafka → BigQuery streaming)
  • Your source supports offset-based checkpointing
  • You want to minimize memory usage by avoiding buffering

Select it with bizon run config.yml --runner stream.