Sub topic 17
Moving Feast to Production: Store Choices, Scheduling, and the Feature Server
Assume you know Python, pandas DataFrames, basic model training and inference, and the difference between batch and real-time data. This chapter focuses on deployment decisions rather than defining individual feature views.
A local Feast repository is useful for development, but production needs separate components for storing definitions, computing historical features, serving current values, and updating those values. Treat these components as one delivery pipeline:
Choose stores by workload
The offline store supports large historical queries and training-set generation. It is commonly a data warehouse, lakehouse, or batch file system. The online store contains recent values keyed by entity and is optimized for small, low-latency reads.
| Component | Main workload | Typical production choices |
|---|---|---|
| Registry | Versioned feature definitions and metadata | Object storage or a managed database |
| Offline store | Historical joins and batch computation | Data warehouse, lakehouse, or files |
| Online store | Latest values for inference | Redis, DynamoDB, or another key-value store |
| Feature server | Synchronous feature retrieval | Kubernetes, containers, or a managed service |
SQLite and local files are convenient for experiments. They are usually unsuitable for multiple production workers because they provide limited concurrency, availability, and operational monitoring. Select stores that match your cloud, access controls, backup policy, and expected read volume.
Schedule materialization
Materialization copies feature values from the offline source into the online store. It does not train a model. A scheduler should run incremental materialization often enough to meet the feature view's freshness requirement.
# Run from the deployed Feast repository.
feast apply
feast materialize-incremental "$(date -u +"%Y-%m-%dT%H:%M:%S")"
# Start the HTTP feature server on the deployment host.
feast serve --host 0.0.0.0 --port 6566Run feast apply as a controlled deployment step when definitions change. Run materialization as a recurring job, such as a workflow-orchestration task or Kubernetes CronJob. Give the job permissions to read the offline store and write the online store. Record its start time, end time, row counts, and failures.
A production job should also define a recovery policy. Retry transient storage errors, alert when a run misses its deadline, and avoid silently serving values older than the model expects.
Deploy and operate the feature server
The feature server exposes online retrieval to model-serving applications. Keep it close to the online store to reduce network latency. Place it behind authentication and network controls, and scale it independently from model workers when request volume differs.
The model service should request a named FeatureService or an explicit, versioned feature list. This prevents an accidental feature-view change from changing the model's input contract. Record request latency, lookup errors, missing entities, and online-store availability.
Production decision checklist
- Use an offline store that can reproduce historical training data.
- Use an online store with the required latency, throughput, durability, and region support.
- Run materialization on a schedule tied to feature freshness requirements.
- Pin repository and feature definitions in a deployment artifact.
- Monitor freshness, materialization failures, lookup errors, and training-serving differences.
- Test a rollback path for both repository definitions and serving code.
Exercise
A feature must be available to an API with low latency, while the same feature is needed for monthly training over two years of history. Which stores should serve these two workloads?
Show answer
Use an online store for the API's latest value and an offline store for the historical training query. Materialize the required recent values from the offline source into the online store.