Prompt
I'm building a streaming architecture for ML feature generation, what tools should I consider?
Latest observation
For a streaming ML feature generation architecture, you’ll usually want a stack that covers these pieces:
- Event ingestion
- Stream processing / transformations
- Feature storage / serving
- Orchestration / monitoring
- Consistency between training and serving
Here are the main tools to consider, grouped by role.
1) Event ingestion
Use this to collect online data/events in real time.
- Apache Kafka: Most common choice; strong ecosystem, scalable, durable.
- Apache Pulsar: Good alternative if you want multi-tenancy and topic isolation.
- Kinesis: Managed option in AWS.
- Google Pub/Sub: Managed option in GCP.
- Azure Event Hubs: Managed option in Azure.
2) Stream processing
This is where you compute rolling aggregates, session features, windowed stats, joins, deduping, etc.
- Apache Flink: Excellent for low-latency stateful streaming; often the top choice for feature pipelines.
- Spark Structured Streaming: Good if your org already uses Spark / Databricks; simpler batch-stream unification.
- Kafka Streams: Lightweight if your processing is mostly Kafka-native and not too complex.
- Beam: Good abstraction layer if you want portability across runners.
- Materialize / RisingWave: SQL-first streaming databases, useful for feature views and incremental materialization.
3) Feature store / online serving
This is critical if you need fast inference-time lookups.
- Feast: Popular open-source feature store; integrates with Kafka, Spark, Flink, Redis, BigQuery, Snowflake, etc.
- Tecton: Managed enterprise feature platform; strong for production ML feature pipelines.
- Hopsworks: Feature store + platform, good if you want an integrated approach.
- Online data stores commonly used underneath:
- Redis
- Cassandra
- DynamoDB
- Bigtable
- Postgres (for smaller scale)
4) Offline storage / training data
For point-in-time correct training sets and historical backfills.
- S3 / GCS / ADLS + Parquet/Delta/Iceberg/Hudi
- Snowflake
- BigQuery
- Databricks Delta Lake
5) Orchestration and scheduling
For backfills, batch recomputation, deployments, and maintenance jobs.
- Airflow
- Dagster
- Prefect
- Argo Workflows
- Kubernetes-native scheduling if needed
6) Monitoring / observability
You’ll want to track latency, freshness, data quality, and drift.
- Prometheus + Grafana
- OpenTelemetry
- Great Expectations / Soda for data quality checks
- Evidently AI / custom drift tooling for feature drift and model monitoring
7) Schema / data contracts
Important for avoiding breaking changes in streaming features.
- Schema Registry with Kafka
- Avro / Protobuf / JSON Schema
- Data contract tooling via dbt / custom validation / CI checks
Common architecture patterns
Pattern A: Kafka + Flink + Feast + Redis
Good for:
- Low-latency real-time features
- Complex stateful computations
- Production-grade online inference
Pattern B: Kafka + Spark Structured Streaming + Feast
Good for:
- Teams already using Spark/Databricks
- Easier integration with batch ML pipelines
- Medium latency requirements
Pattern C: Managed cloud stack
Examples:
- AWS: Kinesis + Lambda/Flink on KDA + DynamoDB/Redis + S3
- GCP: Pub/Sub + Dataflow + BigQuery/Bigtable
- Azure: Event Hubs + Stream Analytics/Flink + Cosmos DB/Redis + ADLS
What to optimize for when choosing
Consider these requirements:
- Latency: sub-second vs seconds vs minutes
- Statefulness: windowed stats, joins, sessionization
- Throughput: events/sec and feature cardinality
- Correctness: exactly-once / at-least-once, dedupe, replayability
- Online/offline consistency: point-in-time correctness
- Operational complexity: managed vs self-hosted
- Team skillset: SQL-heavy, Python-heavy, JVM-heavy, cloud-native
- Cost: compute, storage, and operational overhead
Practical recommendation
If you’re starting fresh and want a strong default:
- Kafka for ingestion
- Flink for stream processing
- Feast for feature store abstraction
- Redis for online serving
- S3 + Iceberg/Delta for offline training storage
- Airflow/Dagster for orchestration
- Prometheus/Grafana for monitoring
If you want, I can also suggest:
- a reference architecture diagram,
- a tool choice by cloud provider, or
- a minimal MVP stack vs enterprise stack.
Brands