Big data is data too large or complex for traditional data-processing tools to handle within a tolerable time. A machine learning platform rarely runs on one database. The split we would start from maps each workload to the store built for its access pattern: a warehouse or lakehouse for batch analytics and training-set assembly, an online feature store for low-latency reads at inference, and a vector store for embedding similarity search, with ingestion pipelines and data observability running across all of them. Batch training benefits from optimised lake storage with efficient querying, while real-time inference needs low-latency access to feature stores and streaming pipelines, which is how AWS frames it in its Well-Architected Machine Learning Lens.
This page sits under our wider AI in cloud overview, which covers how models meet cloud platforms and production pipelines more broadly.
What is big data, and where does a relational warehouse stop being enough?
Big data was first described through three properties (volume, variety and velocity), and a fourth, veracity, was added for the reliability of the data. Volume is usually measured in terabytes and petabytes. Variety covers the move from structured to semi-structured and unstructured data, which challenged tools such as relational databases that were built for structured data. Velocity is how fast data is generated and processed, often in real time, and veracity is about data quality, because large data that is unreliable has little analytical value.
Size alone is a weak reason to leave the relational world, since relational databases can store and manage petabytes of data. For ML, the stronger reasons are variety, velocity and the way training code reads data. The CIDR 2021 lakehouse paper (written by Databricks and academic authors, so read it as an argument with a stake) states that none of the leading ML systems, such as TensorFlow, PyTorch and XGBoost, work well on top of warehouses, because unlike BI queries they process large datasets with complex non-SQL code. The same paper points to staleness: new data frequently takes days to reach the warehouse from the lake.
The practical boundary is this. A warehouse is a good home for structured, curated tables queried with SQL, and it remains useful for training-set assembly. Once a team needs raw images, text or event streams in training, or reads features on the request path of a live model, the warehouse is being asked to do jobs it was not designed for.
How do you choose between warehouses, vector stores and big data databases for ML?
Choose by access pattern first and by product second. Each workload below has a different read shape, freshness need and latency budget, and those properties decide the store.
| ML workload | Access pattern | Store type that fits | Evidence |
|---|---|---|---|
| BI, analytics, curated training tables | Large SQL scans, batch | Cloud data warehouse (e.g. Snowflake, BigQuery, Redshift) | A reference offline feature store sits on these warehouses for training and analytics |
| Raw and mixed-format training data read by ML frameworks | Bulk reads of open files by non-SQL engines | Lakehouse on object storage (Delta Lake, Apache Iceberg, Apache Hudi) | Open formats such as Parquet are readable by pandas, TensorFlow and PyTorch |
| Offline features for training and batch scoring | Point-in-time joins, millions of rows, 1-24 h freshness | Offline feature store on warehouse or lakehouse | |
| Online features at inference | Key lookups, high QPS, under 50 ms | Online store on Redis, DynamoDB or Cassandra | |
| Embedding retrieval and similarity search | Top-k nearest-neighbour queries, often with attribute filters | Vector store (native or an extension of an existing database) | |
| Data quality, drift and skew tracking | Statistics over batches and over time | Validation and drift checks on training and serving data |
Warehouse, lakehouse or big-data store for ML workloads
We treat the warehouse-versus-big-data-store question as having three answers, because the lakehouse sits between them. A lakehouse, as the CIDR 2021 paper defines it, is a data management system on low-cost, directly accessible storage that also provides analytical DBMS features such as ACID transactions, data versioning, auditing, indexing, caching and query optimisation. It works by placing a transactional metadata layer over files in an object store such as Amazon S3, so the bulk of the data stays in an open format that clients can read directly.
The problem the lakehouse targets is the two-tier lake-plus-warehouse architecture. Data is ETL’d from operational databases into a lake, then a subset is ETL’d again into the warehouse, and the multiple ETL steps need regular maintenance and often produce stale data, as Databricks describes it. The CIDR 2023 lakehouse benchmark paper notes that warehouses and lakehouses are converging on low-cost object storage, but warehouses still do not expose their storage through an open data format. For ML that difference matters, because an open format lets a GPU training job read the same table that the SQL engine queries.
Redis, DynamoDB and Cassandra appear as online feature backends for AI inference workloads, serving low-latency lookups at high QPS. Use the warehouse or lakehouse when the workload scans; use the operational store when it looks things up by key on a latency budget. The key-value vs document database choice inside that serving tier is covered separately, as are the NoSQL database types for big data search such as Elasticsearch and Solr.
Do I really need three separate databases for ML?
The question is not how many products, but whether one system can serve each access pattern well enough. The CIDR 2021 authors argue that feature store functionality could be built on a lakehouse instead of reimplementing DBMS functions in separate systems. That is a fair route when training and batch scoring are the only consumers.
A dedicated feature store is warranted under specific conditions. Archman’s feature store guide lists them as multiple models sharing feature definitions, expensive feature engineering, training-serving skew causing production issues, real-time inference needing sub-100 ms latency, strict versioning and lineage requirements, and many data scientists collaborating on features. Databricks gives a similar list, including production issues traced to feature computation or staleness.
Our judgement: a small team with one batch model can live on a warehouse or lakehouse and nothing else. A team with an online model on the request path needs low-latency access to a feature store. Lakehouse write queries must update metadata in object storage, often at over 50 ms latency, which limits QPS. A team doing retrieval over embeddings needs an index built for similarity search, whether that is a dedicated vector store or a vector extension in a database it already runs.
What is the difference between an online and offline feature store?
The offline store holds batch-computed features for training, batch serving and analytics; the online store holds the subset of features needed at inference and serves them fast. In Archman’s reference architecture, the offline store typically runs on a warehouse, holds feature matrices of millions of rows on a daily or hourly cadence, and accepts 1-24 hours of staleness. The online store runs on low-latency backends, serves under 50 ms at high QPS, and its freshness ranges from under a minute for streaming to daily for batch sync.
Freshness should be set per use case, not uniformly. The same guide suggests user features tolerate 1-24 hours of staleness, catalogue features minutes, and real-time features under a second.
The two halves share one centralised definition of each feature. Google Cloud’s MLOps guidance says a feature store needs an API for both high-throughput batch serving and low-latency real-time serving, and recommends using it as the data source for experimentation, continuous training and online serving so the features used in training match those used in serving.
Point-in-time correctness prevents training-serving divergence as features evolve. Training should use feature values as they existed at label time, joined from historical snapshots at exact timestamps, while serving uses the latest values. Skip it and a model trains on information it will never have at prediction time, which is the data leakage feature stores are meant to prevent.
Keeping the offline and online copies consistent across regions raises its own trade-offs, which our page on sync vs async replication for AI data serving works through.
How do ETL and ingestion pipelines differ across batch training and online serving paths?
Batch training pipelines compute features on a daily or hourly cadence, while online serving pipelines keep features fresh to under a minute through streaming. On the batch side of a two-tier architecture, data flows from operational databases into a lake and then a subset into the warehouse. Lakehouse table formats add streaming I/O, time travel, schema enforcement and data validation on top of open files, and time travel plus audit history help reproducibility in ML.
On the serving side, AWS recommends streaming pipelines (its examples are Amazon Kinesis and AWS Lambda) that process data as it arrives and update feature stores in near real time. Lakehouse ingestion also carries a write-versus-read trade-off: copy-on-write rewrites files eagerly and keeps reads fast, while merge-on-read writes change records separately and pays at query time.
Breck et al. (MLSys 2019, from Google’s TFX team) identify different code paths for generating training and serving data as the most common cause of training-serving skew, and those paths exist because offline and online generation have very different latency and throughput characteristics. That is why we would define features once and materialise them into both stores, rather than writing a SQL version for training and a service version for serving.
Building the dual path in order
Archman’s feature store guide gives this order:
- Implement the offline store: batch-compute features and store them in the warehouse.
- Build the online store: deploy a low-latency lookup such as Redis or DynamoDB.
- Synchronise the layers: automate offline-to-online sync.
- Add point-in-time joins: retrain on historical feature snapshots.
- Establish monitoring: track freshness, distribution drift and latency SLAs.
How the training job then reads its data off storage at GPU speed is a separate problem, covered in machine learning storage for training I/O.
What role do vector stores play in an ML data stack, and when are they required?
A vector store manages vector data such as embeddings and answers similarity queries over them. ML models routinely turn unstructured data such as images, text and video into feature vectors for tasks like product recommendation, as the Milvus paper (SIGMOD 2021) describes. Embeddings are therefore features like any other, and the vector store is the serving layer for the subset that is queried by similarity instead of by key.
The survey by Pan, Wang and Li names five obstacles: vague semantic similarity, large vector size, expensive similarity comparison, no natural partitioning for indexing, and hybrid queries that combine attributes and vectors. Milvus, for example, supports quantisation-based and graph-based indexes such as IVF_PQ and HNSW. The Milvus authors report their system running 6.4× to 27.0× faster than Vearch and 153.7× faster than another system at similar recall; that is a measurement by the system’s own developers, so treat it as evidence that purpose-built design can matter, not as a verdict on today’s products.
When embeddings should move out of the warehouse
Storing embeddings as columns in a warehouse is fine while they are only used in batch, for example offline clustering or training a downstream model. They should move to a vector index when similarity search sits on the request path, when the collection grows to where brute-force comparison no longer meets the latency budget, or when queries combine vector similarity with attribute filters such as price or category. That last case, attribute filtering, is a hybrid query type the Milvus paper calls crucial to many applications.
Before choosing among the systems in our vector database comparison, settle what recall the application needs, how often the corpus changes and who will operate the cluster.
Keeping source documents and embeddings in separate stores
No. A vector store returns the entities most similar to a query; a document database returns the record asked for. Their write guarantees differ too. Milvus, for example, acknowledges heavy writes before applying them and builds indexes asynchronously, so newly inserted data may not be visible immediately unless the caller forces a flush. That behaviour suits a read-heavy retrieval index and does not suit a system of record.
The layout we would use keeps source documents and their metadata in an operational store and keeps embeddings plus the attributes needed for filtering in the vector store, linked by an ID. The vector index can then be rebuilt from the source of truth when an embedding model changes.
How do these store choices affect feature-serving latency and query cost at scale?
Cost follows the pricing model of the store doing the work, and latency follows whether the read is a scan or a lookup. Putting hot-path lookups on a scan-priced warehouse pays the wrong price for the wrong access pattern.
Query cost in a scan-priced warehouse
BigQuery illustrates the two pricing models. Google documents on-demand pricing charged per TiB of data processed by each query, with the first 1 TiB per month free, and capacity pricing charged per slot-hour of compute. Capacity pricing is aimed at customers who want predictable costs, with autoscaling and optional one- or three-year commitments at discounted rates. Under on-demand pricing, each query is billed for bytes processed, not rows returned, so frequent per-request scans add cost as well as latency.
Lakehouse performance is not uniform
The table format you pick changes performance. In the CIDR 2023 LHBench study by Jain et al., read-only TPC-DS performance varied by 1.7× on average between Delta Lake, Hudi and Iceberg and by up to 10× for individual queries, while load and merge workloads differed by more than 5×. On 3 TB of TPC-DS data, TPC-DS ran 1.4× faster on Delta Lake than on Hudi and 1.7× faster than on Iceberg, and Hudi loaded almost ten times slower than the other two. Merges in Hudi merge-on-read were 1.3× faster than copy-on-write, at the cost of 3.2× slower queries after the merge.
Metadata access is a latency source. Query engines need the list of files in a table before they can plan, and S3’s LIST returns only 1,000 keys per call, so listing millions of files can take minutes. These are results for one benchmark on one configuration; we would rerun the shape of the test on our own table sizes and update frequency before choosing a format.
Online serving latency is an engineering result
The Feast project reports bringing single-row p99 latency below 5 ms through worker configuration, batched async reads and serialisation changes, then below 2 ms with pre-computed feature vectors that replace N feature-view reads with one key lookup. One change in that exercise, replacing a reflection-based protobuf serialiser, cut tail latency under load from 132 ms to 37 ms p99.
What does ML data observability cover, and why is it distinct from application monitoring?
ML data observability monitors and validates the data flowing through training and serving; application monitoring tracks request latency, frequency and server load. Klaise et al. describe traditional application monitoring as logging request latency, frequency and server load, and identify four further areas ML needs: model performance, metrics on incoming data, outlier and drift detection, and explanations of predictions.
The difference comes from how ML fails. Shankar and Parameswaran (2021) note that traditional software typically breaks on infrastructure issues, while ML pipelines also fail unpredictably because of data. Labels often arrive late or only for a few predictions, so accuracy cannot be monitored in real time, and in their absence input and prediction statistics have to act as the proxy. Silent bugs such as corrupted or stale feature subsets are characteristic of production ML. One case in that paper had a user-features pipeline that had not run successfully for weeks; the model kept reading old features and performed poorly for new users, and the issue surfaced through a drop in accuracy before rising null rates in the feature columns pointed to the cause.
Breck et al. describe three checks in Google’s TFX: single-batch validation for anomalies in one batch, inter-batch validation for changes between training and serving data or between successive training batches, and model testing for assumptions in training code that the data does not meet. Google reports hundreds of product teams using that system to validate several petabytes of training and serving data per day. Slower distribution shift needs separate tracking, for example KL divergence or KS tests between sliding windows of live data and the training set.
We treat this as reliability engineering in its own right, separate from model accuracy and from conventional service reliability: the deliverable is the set of checks that catch silent data failures before users do (drift detection, skew checks, regression suites), not a dashboard.
Data-layer checklist before an ML store goes to production
Adapted from Archman’s feature store design review:
- Feature definitions are the same in training and serving.
- Point-in-time joins are implemented for training data.
- The online store meets its latency SLA (the guide suggests p99 under 100 ms for serving).
- Offline-to-online sync is tested and monitored.
- Each feature has a defined and tracked freshness SLA.
- Alerts fire on divergence between training and serving distributions.
- Feature computation is orchestrated (for example with Airflow or Kubeflow), not run by hand.
The first live model is where the layout gets decided
We would test a warehouse-only design against the first production retrieval or feature-serving workload: a recommendation that needs current session features, or a retrieval step that needs nearest neighbours. What stays open for each team is where they draw the line between “lakehouse with feature tables” and “dedicated feature store”, and that depends on how many models share features and how much training-serving skew they can tolerate, more than on data volume.
FAQ
Is Databricks a data warehouse?
Databricks describes its platform as a lakehouse, which combines a data lake’s open, low-cost storage with warehouse features such as ACID transactions and governance. Its storage stays in open formats such as Parquet, with Delta Lake adding warehouse features like ACID transactions.
What are the two main types of data ingestion?
ML data pipelines support both batch ingestion, which computes features on a daily or hourly cadence, and streaming ingestion, which processes data as it arrives and updates feature stores in near real time.