techdiagrams.net
← All templates

Clickstream personalization

Behavioral events flow through session windows into a feature store and top-K sketches — recommendations served in milliseconds from state computed in-stream.

Open in editor — free, no login Download JSON
eventsappendby userby itemsession featurestrending nowuser features · p99 5mshot keyspersonalized feedApps + WebSDK · batched eventsCollectorvalidate · enrich · geoClickstreamkeyed by userSessionizersession windows · 30min gapTrending (top-K)count-min sketch · per categoryFeature Storeonline + offlineRecs APIassemble, don't computeFeature Cachehot users · 60s TTLrequest-time rule: the recs API reads precomputedstate — it never aggregates. every millisecond ofcompute was spent BEFORE the user asked.

What this design does

Event-carried state transfer in action: click events carry everything consumers need, a sessionizer closes sessions on inactivity gaps, features land in a dual-path store (stream-fresh online, batch-corrected offline), and heavy-hitter sketches keep trending-now bounded in memory. The recs API never computes anything at request time — it just reads.

The patterns it composes

Import it, attach your own numbers, and verify the design against failures — or read the engineering notes.