Skip to content

WAL and buffering ​

Every batch Skipprd reads is written to a write-ahead log (WAL) before it reaches your destination. If the process dies, the next run recovers from the WAL and continues. You choose where that log lives and how large a batch sits in memory before Skipprd flushes it.

See How Skipprd works for the pipeline lifecycle. This page is the production switch.

Where the WAL lives ​

Set WAL_STORAGE. There is no skippr.yml field for this — it is an environment variable. An unknown value fails startup.

ValueWhere segments liveUse when
disk (default)DATA_DIR on this machineA long-lived host with a persistent disk
s3SKIPPR_WAL_S3_BUCKET, or SKIPPR_S3_BUCKET if that is unsetContainers, Lambda, or any host you can throw away

Local disk ​

bash
export WAL_STORAGE=disk
export DATA_DIR=/var/lib/skipprd
skipprd sync --pipeline payments --once

Reuse the same DATA_DIR on every run. If you start on a fresh disk, Skipprd has no WAL and no resume position.

Object storage ​

bash
export WAL_STORAGE=s3
export SKIPPR_WAL_S3_BUCKET=acme-skipprd-wal
export DATA_DIR=/var/lib/skipprd
skipprd sync --pipeline payments --once

Give the WAL its own bucket so payload objects are not mixed with lake files. Skippr Store stays on DATA_DIR. Hosts without a durable DATA_DIR are unsupported. See Skippr Store.

How large a batch is ​

Skipprd holds records in memory and flushes when either limit is hit.

VariableDefaultMeaning
BUFFER_THRESHOLD_BYTES10485760 (10 MB)Flush when the in-memory batch reaches this size
BUFFER_THRESHOLD_SECONDS60Flush when the batch is this old, even if it is smaller

Leave the defaults unless you have a reason. A larger byte threshold means fewer, bigger writes to the destination. A smaller second threshold means rows appear sooner.

These limits are per slice — one namespace, partition, and time bucket — not for the whole sync --once. A 20 MiB / 300 s pair does not merge a multi-hour historical copy into one object when keys are sparse. For type: copy of history, keep a modest byte threshold and a large time threshold (for example 86400) so each slice grows until drain.

Once slices are in the WAL, compaction uses the same byte threshold across a group (same sink, namespace, partition, and time). Several small leftover parts become ready together when that group reaches the byte limit, when the time gate fires, or when recover/drain asks to send what is already committed.

These optional overrides rarely need a change:

VariableDefaultMeaning
WAL_BYTES_PER_FILEFollows BUFFER_THRESHOLD_BYTES, clamped to 4–64 MiBTarget size of each WAL file
WAL_MAX_DELAY_SECONDS60Flush a WAL file that has not reached the size target

What to back up ​

ModeBack up
diskDATA_DIR (WAL payloads and Skippr Store) and skippr.yml
s3The WAL bucket, plus DATA_DIR (Skippr Store)

If the WAL is gone, Skipprd re-reads the source. Append-only destinations can then duplicate rows.

Next steps ​