Architecture Review: ML Feature Serving Platform
A low-latency feature serving platform for ML model inference, providing both batch (offline) and real-time (online) feature access with strict training-serving consistency. Redis serves the hot feature cache with p99 latency targets below 5ms for online inference requests; PostgreSQL provides point-in-time feature lookups for offline training jobs with temporal consistency guarantees; Cassandra stores high-cardinality feature entities at write scale beyond PostgreSQL's single-primary ceiling; Kafka streams feature computation events from online feature pipelines to update the cache; Qdrant stores vector features for embedding-based model inputs and similarity lookups; ClickHouse serves feature analytics and drift monitoring across training dataset populations. Feature versioning is first-class: every feature value is tagged with a pipeline_version and computed_at timestamp to support model reproducibility and training-serving skew diagnosis.
Evidence Confidence
Moderate
strong
Executive Summary
ML Feature Serving Platform: moderate operational readiness (82% evidence confidence). 0 architectural strengths identified, 6 operational risks to manage. Primary concern: Cache Stampede (Dog-Pile). Requires Advanced operational maturity.
Readiness Rationale
Overall moderate readiness across 8 dimensions. Limited: team maturity. Strong: migration, observability, failure recovery.
Key Concerns
- !Cache Stampede (Dog-Pile)
- !Embedding Drift
Key Strengths
- +Architecture is well-defined for the ai rag application problem profile
8
Assessments
3
Tradeoffs
6
Sections
11
Recommendations
Readiness Assessments
8Architectural Tradeoffs
3Recommendations
11Monitor: Embedding Drift
risk_monitoringVector embeddings become semantically stale when source document content changes but the stored embedding is not regenerated: causing semantic search and RAG retrieval to return outdated, incorrect, or misleading results without any error signal, silently degrading the quality of AI-backed features.
Affects 3 nodes. (AI Embedding Lookup, Qdrant, Vector Similarity Search)
Monitor: Cache Stampede (Dog-Pile)
risk_monitoringWhen a widely-shared cached value expires or is invalidated, all concurrent requests that miss simultaneously trigger identical expensive database queries, overwhelming the origin store before any single result can be computed and cached: a positive feedback loop that can collapse the database within seconds.
Affects 1 node. (Read-Heavy API Backend)
Implement: Monitor generic risk probe signals
observabilitySeed 'Embedding Drift Risk Probe' identifies 2 metrics relevant to embedding_drift.
Metrics to instrument: error_rate, p95_latency_ms
Features computed inline in the inference service with no shared feature store → Centralized feature store with Redis cache and Cassandra backing store
migration_planningTrigger: Feature computation logic duplicated across 3+ model serving services with no coordination; training-serving skew discovered after model deployment causing unexplained model performance regression; feature computation latency dominating inference latency for complex features; inability to enforce feature versioning across model versions. Migrate from 'Features computed inline in the inference service with no shared feature store' to 'Centralized feature store with Redis cache and Cassandra backing store'. Identify the 10 most reused features across models and migrate those first. Validate that feature values from the central store match inline-computed values before migrating any model serving path to use the store.
Initial feature store population requires backfilling historical feature values for all entity IDs: backfill jobs must be idempotent and resumable to handle interruptions; Migrating from inline computation to feature store lookups requires model serving code changes across all inference services simultaneously or a dual-lookup period
Latest-value-only feature store with no temporal history → Point-in-time feature store with training-time lookup support
migration_planningTrigger: Regulatory or reproducibility requirement to re-run model predictions at a historical point in time; training data contamination investigation requiring knowledge of what features were available at training label creation time; model backtesting requiring consistent feature snapshots across historical time ranges. Migrate from 'Latest-value-only feature store with no temporal history' to 'Point-in-time feature store with training-time lookup support'. Add computed_at and valid_until columns to the feature store schema first. Start writing temporal feature records in parallel with the existing latest-value records. Migrate training jobs one at a time to use point-in-time lookups, validating that model performance does not change from the temporal semantics change.
Point-in-time storage requires retaining every feature update with its timestamp rather than overwriting the latest value: storage volume increases by the number of feature updates per entity per time window; Existing training pipelines that read "current" feature values must be updated to read "feature value as-of label timestamp": this changes training job semantics and requires validation
Prepare runbook for: Burst Traffic Cold Cache Stampede
simulation_preparednessSimulation demonstrates critical degradation of redis, postgresql
Without a runbook, recovery from this failure mode will be ad-hoc
Prepare runbook for: Connection Pool Exhaustion with Horizontal User Scale
simulation_preparednessSimulation demonstrates critical degradation of postgresql
Without a runbook, recovery from this failure mode will be ad-hoc
Plan evolution: OLTP Analytics Queries → OLTP + OLAP Separation
evolution_planningEvolution from Unified OLTP + Analytics on PostgreSQL → Separated OLTP (PostgreSQL) + OLAP (ClickHouse/Snowflake)
Migration complexity: medium. Rollback: always.
Plan evolution: Single Cache Layer → Distributed Cache
evolution_planningEvolution from Single Redis Node / Sentinel Cluster → Distributed Redis Cluster (Consistent Hash Ring)
Migration complexity: medium. Rollback: complex.
Monitor threshold: Tier 1: Cache Cold Start Latency Spike
scaling_monitoringSignal: Feature store p99 rising from < 5ms to > 50ms immediately following a model deployment or pod scaling event; Cassandra or PostgreSQL feature store read QPS spiking 10–100x simultaneously with serving fleet restart; feature store connection pool exhaustion visible in application logs during the cold start window; Redis cache hit rate dropping to < 10% for the first 60 seconds after deployment
Bottleneck: Simultaneous cache cold start across all serving pods after deployment, converting sequential feature requests into a thundering herd against the backing feature store. Evolution: Implement pre-warming: before a new model version receives traffic, a warm-up job runs inference requests for a representative sample of entity IDs, populating the Redis cache before the pod enters the serving fleet. Use probabilistic early cache refresh (fetch from backing store before TTL expiry when remaining TTL < 20% under high request rate) to prevent simultaneous TTL expiry on hot features. Stagger deployment rollout: deploy 10% of pods, wait for cache warm, then proceed to the next 10%.
Monitor threshold: Tier 2: Training-Serving Skew Detection
scaling_monitoringSignal: Model performance metrics (precision, recall, AUC) degrading without a corresponding input distribution shift; ClickHouse drift dashboard showing feature value distributions served online diverging from training population distributions; explicit skew audit (comparing offline training feature values against replayed online feature values for the same entity at the same timestamp) showing systematic differences in specific features
Bottleneck: Feature computation logic divergence between the offline training pipeline and the online serving pipeline: a feature transformation applied in training is not applied identically in serving. Evolution: Enforce a single feature computation function registered per feature in a shared feature registry, executed by both the online pipeline and the offline training pipeline. The two paths must use the same code, not independently maintained implementations. Implement a skew monitoring job that computes a random sample of features using both paths and alerts on distribution divergence above a threshold.
Scaling Pressure Signals
8Feature store p99 rising from < 5ms to > 50ms immediately following a model deployment or pod scaling event; Cassandra or PostgreSQL feature store read QPS spiking 10–100x simultaneously with serving fleet restart; feature store connection pool exhaustion visible in application logs during the cold start window; Redis cache hit rate dropping to < 10% for the first 60 seconds after deployment
Threshold
Tier 1: Cache Cold Start Latency Spike
Likely Bottleneck
Simultaneous cache cold start across all serving pods after deployment, converting sequential feature requests into a thundering herd against the backing feature store
Recommended Evolution
Implement pre-warming: before a new model version receives traffic, a warm-up job runs inference requests for a representative sample of entity IDs, populating the Redis cache before the pod enters the serving fleet. Use probabilistic early cache refresh (fetch from backing store before TTL expiry when remaining TTL < 20% under high request rate) to prevent simultaneous TTL expiry on hot features. Stagger deployment rollout: deploy 10% of pods, wait for cache warm, then proceed to the next 10%.
Model performance metrics (precision, recall, AUC) degrading without a corresponding input distribution shift; ClickHouse drift dashboard showing feature value distributions served online diverging from training population distributions; explicit skew audit (comparing offline training feature values against replayed online feature values for the same entity at the same timestamp) showing systematic differences in specific features
Threshold
Tier 2: Training-Serving Skew Detection
Likely Bottleneck
Feature computation logic divergence between the offline training pipeline and the online serving pipeline: a feature transformation applied in training is not applied identically in serving
Recommended Evolution
Enforce a single feature computation function registered per feature in a shared feature registry, executed by both the online pipeline and the offline training pipeline. The two paths must use the same code, not independently maintained implementations. Implement a skew monitoring job that computes a random sample of features using both paths and alerts on distribution divergence above a threshold.
Embedding model upgrade planned or in progress; Qdrant query recall metrics below threshold for new-model query vectors; similarity search results visibly degraded for new-model queries against old-model index; full re-indexing job running for hours against Qdrant collection
Threshold
Tier 3: Qdrant Vector Index Rebuild Under Embedding Model Upgrade
Likely Bottleneck
Qdrant collection populated with old-model embeddings is incompatible with new-model query vectors: all indexed vectors must be recomputed and re-inserted
Recommended Evolution
Maintain two Qdrant collections per embedding model version (v1 and v2) simultaneously during embedding model transitions. Serve queries from the new-model collection as soon as re-indexing is complete, then deprecate the old collection. This requires that embedding model version is a first-class routing parameter in the feature serving path, not an implicit global. Re-indexing must be triggered and validated before the model serving path is pointed at the new collection.
Cassandra feature store write p99 > 20ms under online pipeline update rate; Kafka online feature computation consumer consistently lagging behind the event stream; feature freshness SLA violations (features served are older than the required freshness window); Cassandra compaction backlog growing under sustained high-frequency feature updates
Threshold
Tier 4: Feature Store Write Throughput Ceiling for Online Pipeline
Likely Bottleneck
Online feature pipeline writing updates for millions of entities at high frequency saturating Cassandra write throughput through compaction pressure and partition hot spots
Recommended Evolution
Tune Cassandra compaction strategy to TWCS (TimeWindowCompactionStrategy) for time-ordered feature updates: this reduces compaction amplification for append-heavy feature pipelines. Introduce write batching at the feature pipeline layer: group feature updates by partition key and batch-write using logged batches to reduce coordinator round-trips. For the highest-throughput feature types, evaluate ScyllaDB as a drop-in Cassandra replacement with significantly higher write throughput at equivalent hardware.
Feature store p99 rising from < 5ms to > 50ms immediately following a model deployment or pod scaling event; Cassandra or PostgreSQL feature store read QPS spiking 10–100x simultaneously with serving fleet restart; feature store connection pool exhaustion visible in application logs during the cold start window; Redis cache hit rate dropping to < 10% for the first 60 seconds after deployment
Threshold
Escalation trigger: Simultaneous cache cold start across all serving pods after deployment, converting sequential feature requests into a thundering herd against the backing feature store
Likely Bottleneck
Tier 1: Cache Cold Start Latency Spike
Recommended Evolution
Monitor: error_rate, p95_latency_ms
Model performance metrics (precision, recall, AUC) degrading without a corresponding input distribution shift; ClickHouse drift dashboard showing feature value distributions served online diverging from training population distributions; explicit skew audit (comparing offline training feature values against replayed online feature values for the same entity at the same timestamp) showing systematic differences in specific features
Threshold
Escalation trigger: Feature computation logic divergence between the offline training pipeline and the online serving pipeline: a feature transformation applied in training is not applied identically in serving
Likely Bottleneck
Tier 2: Training-Serving Skew Detection
Recommended Evolution
Monitor: error_rate, p95_latency_ms
Embedding model upgrade planned or in progress; Qdrant query recall metrics below threshold for new-model query vectors; similarity search results visibly degraded for new-model queries against old-model index; full re-indexing job running for hours against Qdrant collection
Threshold
Escalation trigger: Qdrant collection populated with old-model embeddings is incompatible with new-model query vectors: all indexed vectors must be recomputed and re-inserted
Likely Bottleneck
Tier 3: Qdrant Vector Index Rebuild Under Embedding Model Upgrade
Recommended Evolution
Monitor: error_rate, p95_latency_ms
Cassandra feature store write p99 > 20ms under online pipeline update rate; Kafka online feature computation consumer consistently lagging behind the event stream; feature freshness SLA violations (features served are older than the required freshness window); Cassandra compaction backlog growing under sustained high-frequency feature updates
Threshold
Escalation trigger: Online feature pipeline writing updates for millions of entities at high frequency saturating Cassandra write throughput through compaction pressure and partition hot spots
Likely Bottleneck
Tier 4: Feature Store Write Throughput Ceiling for Online Pipeline
Recommended Evolution
Monitor: error_rate, p95_latency_ms
Migration Readiness
12Migration Stages
3Features computed inline in the inference service with no shared feature store → Centralized feature store with Redis cache and Cassandra backing store
infoMigration trigger: Feature computation logic duplicated across 3+ model serving services with no coordination; training-serving skew discovered after model deployment causing unexplained model performance regression; feature computation latency dominating inference latency for complex features; inability to enforce feature versioning across model versions
Latest-value-only feature store with no temporal history → Point-in-time feature store with training-time lookup support
infoMigration trigger: Regulatory or reproducibility requirement to re-run model predictions at a historical point in time; training data contamination investigation requiring knowledge of what features were available at training label creation time; model backtesting requiring consistent feature snapshots across historical time ranges
Text similarity search via PostgreSQL full-text tsvector → Qdrant vector similarity search with pre-computed embeddings
infoMigration trigger: Semantic similarity search recall insufficient from BM25 full-text scoring; user query matching requiring understanding of synonyms, paraphrases, or cross-language similarity; feature retrieval for embedding-based ranking models requiring approximate nearest-neighbor search with p99 < 10ms
Risks
9Initial feature store population requires backfilling histor
warningInitial feature store population requires backfilling historical feature values for all entity IDs: backfill jobs must be idempotent and resumable to handle interruptions
Migrating from inline computation to feature store lookups r
warningMigrating from inline computation to feature store lookups requires model serving code changes across all inference services simultaneously or a dual-lookup period
Point-in-time storage requires retaining every feature updat
warningPoint-in-time storage requires retaining every feature update with its timestamp rather than overwriting the latest value: storage volume increases by the number of feature updates per entity per time window
Existing training pipelines that read "current" feature valu
warningExisting training pipelines that read "current" feature values must be updated to read "feature value as-of label timestamp": this changes training job semantics and requires validation
Qdrant approximate nearest-neighbor recall depends on index
warningQdrant approximate nearest-neighbor recall depends on index parameters (ef_construction, m) tuned during index build: incorrect parameters produce fast but low-recall results with no error signal
Embedding model must be fixed at index build time; changing
warningEmbedding model must be fixed at index build time; changing the model requires full re-indexing; this must be planned as a first-class operational procedure
Projection lag creates a read-after-write window where users
criticalProjection lag creates a read-after-write window where users see stale data after their own writes. Mitigation: Route immediate post-write reads to the write store (session-scoped write token); accept eventual consistency only for non-user-initiated reads
↗ direct-db-to-cqrs
Projection rebuild after schema change can take hours or day
criticalProjection rebuild after schema change can take hours or days on large datasets. Mitigation: Design blue/green projection deployment: build new projection in parallel before switching traffic; test rebuild time in staging
↗ direct-db-to-cqrs
Cross-service workflows that previously used database transa
criticalCross-service workflows that previously used database transactions now require Saga orchestration. Mitigation: Design idempotent event handlers; implement compensating transactions for every multi-step workflow; test failure injection in staging
↗ modular-monolith-to-event-driven
Review Sections
6Referenced Intelligence