Checkpointing
Checkpointing is at the heart of Bizon’s reliability. It enables pipelines to recover from failures without reprocessing all data from the beginning.
How It Works
Section titled “How It Works”Bizon tracks progress per iteration (one page or batch returned by the source):
- During extraction: The producer records the source’s position (pagination cursor) in the backend
- After loading: Once a buffer flush lands in the destination, a destination cursor is saved for the iterations it contained
- On failure: The next run resumes from the last destination cursor, so only data that never landed is fetched again
┌─────────────┐│ Source ││ │──────▶ Cursor position saved└─────────────┘ │ ▼┌─────────────┐│ Backend │◀────── Checkpoint persisted│ │└─────────────┘ │ ▼ On restart: Resume from last checkpointDelivery is at-least-once: an iteration that was written but not yet checkpointed is written again after a crash.
Benefits
Section titled “Benefits”No Full Restarts
Section titled “No Full Restarts”When an incremental pipeline fails (network issues, destination downtime, etc.), Bizon doesn’t need to re-extract everything. It picks up where it left off.
Predictable Long-Running Loads
Section titled “Predictable Long-Running Loads”For pipelines processing billions of records, checkpointing ensures:
- Consistent progress tracking
- Reduced manual intervention
- Faster recovery times
Less Debugging Guesswork
Section titled “Less Debugging Guesswork”With checkpoints, you always know:
- What data has been successfully loaded
- Where the pipeline stopped
- What needs to be reprocessed (if anything)
What Resumes
Section titled “What Resumes”| Sync mode | After a crash |
|---|---|
incremental | The job left running is resumed from its last destination cursor |
full_refresh | The stale job is cancelled and a new one starts from scratch. Its staging table is cleared, so a partial run is never published |
stream | The source’s own offsets (e.g. Kafka consumer offsets) are committed after each successful write |
A full refresh restarts rather than resumes because it replaces the whole table on publish. To rebuild an incremental stream from scratch, use a stream reset instead of deleting backend rows: see Sync Modes.
Large Iterations
Section titled “Large Iterations”An iteration larger than the destination’s buffer_size is written in buffer-sized chunks. It still gets a single destination cursor, written once every chunk has landed. A crash midway resumes from the previous iteration and rewrites all its chunks.
Configuration
Section titled “Configuration”Checkpointing is automatic. syncCursorInDBEvery sets how often, in iterations, the producer writes its source cursor to the backend:
engine: backend: type: postgres config: host: db.example.com port: 5432 database: bizon schema: public username: bizon password: ${env://DB_PASSWORD} syncCursorInDBEvery: 10| Field | Default | Description |
|---|---|---|
syncCursorInDBEvery | 10 | Iterations between source cursor writes. Goes inside config |
Backend Options
Section titled “Backend Options”| Backend | type | Best For | Persistence |
|---|---|---|---|
| SQLite | sqlite | Local development | File on disk |
| SQLite (in-memory) | sqlite_in_memory | Tests | None, lost when the process exits |
| PostgreSQL | postgres | Production, frequent updates | Database |
| BigQuery | bigquery | Production, lightweight setup | Dataset |
Next Steps
Section titled “Next Steps”- Configure Queues for your pipeline
- See the Engine Reference for backend options
- See Sync Modes for incremental state and stream resets