---
title: "Putting it all together"
description: "Review the complete architecture and final takeaways from the model serving tutorial."
---

# Putting it all together

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

## Full pipeline architecture

Across three tutorials, you set up a complete ML pipeline:

| Stage | Part | Client | Purpose |
| --- | --- | --- | --- |
| **Ingest** | Part 1 | Spark connector | Bulk-write feature metadata and entity values |
| **Train** | Part 2 | Spark connector + MLlib | Materialize datasets, train and save models |
| **Serve** | Part 3 | Python client | Retrieve features in real time and run inference |

The Spark connector and Python client are complementary. Batch pipelines need distributed throughput, and serving needs direct low-latency key lookups.

## What you completed in Part 3

-   Used the Aerospike Python client for sub-millisecond feature retrieval
-   Used `Entity.get_feature_vector()` to drive low-latency feature retrieval in the serving path
-   Built `predict_decline_risk()` for end-to-end online inference
-   Verified that retrieval latency stays sub-millisecond at larger scale

If your project has `feature_store_tutorial.ipynb`, `models/trip_decline_risk_lr`, and `datasets/trip-decline-risk-v1/`, you have the core artifacts from the full tutorial series.

## Production considerations

The tutorial pipeline demonstrates the core pattern. In production, you’d also consider:

| Concern | Approach |
| --- | --- |
| **Connection pooling** | Reuse the Aerospike client connection across requests. The client is thread-safe. |
| **Model versioning** | Save models with version suffixes (`trip_decline_risk_lr_v2`). Load the active version from a config or registry. |
| **Feature freshness** | Batch pipelines update features periodically. Monitor staleness because features that have not been updated may indicate a pipeline failure. |
| **Graceful degradation** | If `get_feature_vector()` returns `None`, fall back to a default prediction or distance-only ranking. |
| **Monitoring** | Track prediction latency, feature retrieval latency, and prediction distribution over time. A shift in distribution may indicate data drift. |

## Where to go next

-   [Aerospike Python client](https://aerospike.com/docs/develop/client/python/) for connection management and serving best practices
-   [Aerospike Spark connector](https://aerospike.com/docs/connectors/spark/) for batch ingestion and training workflows
-   [Spark MLlib Guide](https://spark.apache.org/docs/latest/ml-guide.html) for model selection and advanced evaluation

::: undefined
-   I understand how Parts 1, 2, and 3 connect in one pipeline.
-   I know practical next steps for productionizing this pattern.
:::

Share

Congratulations on completing this tutorial! Share your achievement with the world and let everyone know about your newly acquired skills.

[](https://www.linkedin.com/feed/?shareActive&mini=true&text=Served%20real-time%20ML%20predictions%20with%20Aerospike.%20Measured%20sub-millisecond%20feature%20retrieval%20from%20tutorial%20to%20production-scale%20data.%0A%0A%23MachineLearning%20%23FeatureStore%20%23Aerospike%20%23MLOps%20%23RealTimeML%0A%0Ahttps%3A%2F%2Faerospike.com%2Fdocs%2Fdevelop%2Fmodel-serving%2F "Post to LinkedIn")[](https://bsky.app/intent/compose?text=Served%20real-time%20ML%20predictions%20with%20Aerospike.%20Measured%20sub-millisecond%20feature%20retrieval%20from%20tutorial%20to%20production-scale%20data.%0A%0A%23MachineLearning%20%23FeatureStore%20%23Aerospike%20%23MLOps%20%23RealTimeML%0A%0Ahttps%3A%2F%2Faerospike.com%2Fdocs%2Fdevelop%2Fmodel-serving%2F "Post to BlueSky")[](https://twitter.com/intent/tweet?text=Served%20real-time%20ML%20predictions%20with%20Aerospike.%20Measured%20sub-millisecond%20feature%20retrieval%20from%20tutorial%20to%20production-scale%20data.%0A%0A%23MachineLearning%20%23FeatureStore%20%23Aerospike%20%23MLOps%20%23RealTimeML%0A%0Ahttps%3A%2F%2Faerospike.com%2Fdocs%2Fdevelop%2Fmodel-serving%2F "Post to Twitter")

::: undefined
-   Explore the [Aerospike Python client documentation](https://aerospike.com/docs/develop/client/python/) for advanced features.
    
-   Review [Aerospike Spark connector documentation](https://aerospike.com/docs/connectors/spark/) for batch pipeline optimization.
:::

[Previous  
Latency at scale](https://aerospike.com/docs/develop/model-serving/step/3/part/1/latency-at-scale)