Feature Stores
Intermediate 14 min read Feature Stores

Freshness and Consistency

Same truth, right time, provably

Every feature has a freshness SLA — how current its value must be. Consistency is the guarantee that training and live values mean the same thing. Both are measured, not assumed.

feature freshnessSLAconsistencysync lagpoint-in-time
Before we start

What you will learn

  • Define per-feature freshness SLAs
  • Measure online/offline consistency
  • Design alerts that catch staleness before it reaches users
Introduction

What is this?

Feature freshness is the SLA on how recently a feature value must reflect reality — a user's balance may tolerate an hour, a fraud velocity count seconds. Consistency is the degree to which online values equal offline/historical values for the same moment. Both are governed by measurement, not faith.

Motivation

Why do you need it?

  • Wrong-freshness values silently degrade model decisions (a stale balance breaks a credit decision).
  • Inconsistent live vs training values is training-serving skew hiding in the feature path.
  • Explicit SLAs make the platform's staleness a monitored, owned property.
  • Consistency checks catch silent bugs in materialization and sync early.
Think about it

Mental model

Imagine

Grocery store 'sell by' dates

Think of

Feature freshness SLAs

Milk has a sell-by and a cold-chain guarantee from farm to shelf. Every feature has its own sell-by (freshness) and its own cold chain (sync); both broken are detected, and both get pulled from sale (alerted) when violated.

Mechanics

How it works

  • Each feature declaration records a freshness SLA and a consistency expectation.
  • Materialization timestamps values; the online store retains them.
  • Freshness checks compare stored-value age to the SLA, alerting on breach.
  • Consistency jobs recompute a sample offline and diff against online at the same timestamp.
  • Breaches route to the feature owner's alert channel.

Freshness and consistency checks on the feature path.

Feature declared
Materialize + timestamp
Freshness check
Consistency job
Alert owner
Real world

In production

  • A balance feature has a 15-minute SLA; a sync failure alerts within 10 minutes of breach.
  • A nightly consistency job recomputes 1% of online values offline and diffs them.
  • A retrain selects feature windows according to the declared SLAs so training matches live freshness.
Guidelines

Best practices

  • Declare freshness per feature at definition time — it becomes the contract.
  • Centralize staleness checks in a platform job, not per model.
  • Diff online vs offline on a rotating sample to prove consistency.
  • Record consistency scores per feature and per day; chase regressions.
Watch out

Common mistakes

  • Freshness documented in prose but never checked by automation.
  • One global SLA applied to all features regardless of meaning.
  • Consistency tests only on green screenshots — no running job, no numbers.
  • Ignoring point-in-time in the offline store while building the online server — the two must match for consistent training and serving.
When things break

Debugging tips

  • Staleness alert but 'the pipeline ran' — check the materializer's written-value timestamp, not the job's start time.
  • Consistency diff large — compare value semantics, units, and timestamp alignment before suspecting sync.
  • Fresh as of corrected by retrain — the SLA and windowing must use the same clock source.
Interviews

Interview checkpoint

Practice

Hands-on lab

Enforce Feature Freshness SLAs
25 min · intermediate
In progress
Objectives
  • Declare per-feature freshness SLAs
  • Check stored values against their SLA
  • Alert on breach and log a consistency diff

Enforce Feature Freshness SLAs

25 min · intermediate

0/3 steps
0%
sandbox · Linux sandbox
$
Try these commands
Test yourself

Quick quiz

0/2
1

A fraud velocity feature is best served with what freshness SLA?

2

Checking consistency only during onboarding is enough.

Go deeper

Official documentation