RecomNext

Architecture

System map, data stores, online vs offline.

01 - Overview & architecture

Audience: Analysts & PMs
Related: Glossary · Pipeline

What Recomnext recommendations are

Recomnext is a Recommendations-as-a-Service layer. For a given tenant, it:

  1. Stores a catalog of items (and optional users).
  2. Ingests behavioral events (impressions + interactions).
  3. Serves ranked item lists for placements (home “For You”, PDP similar, cart cross-sell, etc.) using a chosen logic and algorithm, shaped by a scenario.

You configure what a placement should do in Admin (scenarios). The site integrates via browser SDK / widgets (HMAC) or server SDKs.


Architecture (recommendations path)

What lives where

StoreRecommendation-relevant contents
MongoDBItems (externalId, category, attributes, available), scenarios, shared rules, segmentations, tenant settings, ML user/item factors (model_factors)
ClickHouseinteractions (view/cart/purchase/rating), impressions (items shown in a placement)
QdrantDense vectors for similar-products / hybrid vector legs (and beeFormer vectors when trained)
KafkaBuffer between ingestion API and ClickHouse writers
RedisShort-TTL caches (e.g. recommendation responses, some hybrid helpers)

Online vs offline

ModeWhat happensWho cares
Online (serving)Request → resolve scenario → generate candidates → filter/boost/constrain → return itemsEvery placement request
Online (events)SDK posts impressions/interactions → Kafka → ClickHouseFunnel metrics + behavioral algos
Offline (indexing)Catalog text → embeddings service → Qdrant upsertvector-similarity quality
Offline (training)Export CH + catalog → train ELSA/ReALM/beeFormer → write factors/vectorsML algorithm scenarios

Behavioral algorithms (weighted-history, co-occurrence, …) read ClickHouse directly at request time (typically last 30 days). ML algorithms read precomputed factors from Mongo/Qdrant.


Request high-level sequence

Details: 04 - Request pipeline.


Event high-level sequence

Details: 03 - Events.


Tenants & environments

  • Each request is scoped by tenant (X-Tenant-Id / HMAC token tenant).
  • Catalog, scenarios, and events do not mix across tenants.
  • Dev examples in this pack use driffle-dev.

What this architecture implies for analysts

  1. Changing a scenario (Admin) changes online ranking immediately for that slug - no redeploy.
  2. Changing event instrumentation on the site changes ClickHouse tomorrow’s metrics and behavioral model inputs.
  3. Training / reindex lag affects ELSA / ReALM / beeFormer / vector quality even if scenarios are perfect.
  4. Analytics ≠ ranking input 1:1. CTR uses impressions + type=view with slug; weighted-history uses all interaction types for a user (with type multipliers), usually ignoring empty slug.