Late arriving events break my daily aggregates and backfills take six hours Architecture
Events can arrive up to four days after the event timestamp. My daily rollups are built once at 2am for the previous day, so anything late is simply missing until somebody notices and asks for a backfill, which reprocesses 90 days and takes about six hours. There must be a middle ground between rebuilding everything and being wrong.
@coldstorage_cy · 8mo ago · 3 replies
The middle ground is a rolling reprocess window. You know your late arrival horizon is about four days, so rebuild the last five or seven days every night instead of only yesterday. That costs roughly seven times one day, which is nothing next to a 90 day backfill, and your numbers become correct within the window automatically.
Two details that matter:
If you have a genuine long tail beyond four days, add a weekend job that reprocesses the last 45 days. Nobody notices a correction that lands on a Sunday.
Reply
Report
@coldstorage_cy · 8mo ago
Because the tutorial always shows yesterday. Almost every real pipeline has a window.
Reply
Report
@dbt_and_dust · 8mo ago
Rolling seven days nightly plus a weekend sweep is nearly free for us. I do not know why I was thinking in terms of one day or all of it.
Reply
Report