Problem
Affirm makes a credit decision at every checkout, and the shopper waits for it. Underwriting signals about a returning customer (total repaid, outstanding balance, charged-off loans, overdue accounts) each need the customer's entire loan history. They were computed at decision time by the system of record while the decision waited. Cost grows with history length, so the same history was re-aggregated on every decision and the aggregate's tail became checkout's tail.
Example from the article: "number of accounts currently overdue" is a one-line definition, yet it required the customer's whole history on every decision.
Solution in brief
Do the aggregation when the data changes, not when a decision asks for it. The system of record keeps a per-customer counter that only grows and publishes an aggregate event, and the feature platform stores the derived values. At read time the stored counter is checked against the system of record: unchanged means serve the stored value, moved means recompute, a failed check means serve the held value or return "unavailable".
Questions this case answers
- How to serve aggregates of a growing per-entity history within a tight request deadline while guaranteeing the stored value is current
- How to define fallback and missing-value behavior for precomputed features so that consumers with different freshness needs are served safely
- How to keep customer-level aggregates out of the latency-critical path of a real-time decision?
- How to know that a precomputed feature is still correct without relying on a TTL?
Tools and methods
- Version counter per customer — decides freshness instead of a TTL; owned by the system of record.
- Event-driven feature pipeline — aggregate events, a consumer that derives features, an online store.
- Per-request serving contract — latency budget, freshness bound, missing-value behavior.
- Shadow mode — new pipeline runs at production volume beside the old path to prove parity.
Google or a one-time email code. No password.