events table into compressed Parquet files in object storage, then optionally deletes the database rows. It keeps query performance stable for high-volume accounts without losing historical data.
What gets archived
A separate historical archiver cron handles other entities (
transactions, customers_by_journeys, and legacy events by updated_at) in the archived-data bucket with different retention windows.
How archiving runs
Cron endpoint:POST /api/cron/maintenance/archive_custom_events
Protected by the checksum header with the CRON_AUTH_SECRET value.
Per run defaults:
- Up to 20,000 records globally (
SCA_RECORD_LIMIT_PER_RUN) - Concurrency across accounts, event types, and days
- Per-account lock (~11 minutes TTL) to prevent overlapping runs
Deferral rules
Archiving skips a day when:- A pending first-run audience still depends on that custom event type
- An active audience rehydration job overlaps the same event type and date range
events so audiences can be rebuilt from archived data. Smart Archiver defers while rehydration is in progress.
Progress tracking
Progress is stored in Redis/KV per account and event type:force_reset_smart_archive_progress: true in the cron body to reset all accounts to the default start date.
Configuration flags
Monitoring
The cron response includes operational counters such astotal_records_archived, deferred_accounts, and locked_accounts. Use these to confirm steady progress and detect backlog.
Related documentation
- Data architecture — how events flow through Masivo
- Analytics exports — exporting reports that may reference archived periods