A model trained with Spark ML must answer single requests in under 50 ms on Model Serving. What is the usual choice?
- Exam domain
- Model Development44% of the exam
- Difficulty
- Hard
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Model Development (44% of the exam)
Objective in the exam guide: Select SparkML model or single node model for an inference based on type: batch, real-time, streaming.
Choosing Spark ML or single node by inference type is named.
Why C is the answer
A single-node model for real time; Spark ML for batch
Spark ML shines for distributed batch and streaming. Low-latency, per-request serving suits single-node models without Spark overhead.
Remember: Single-node models for real time.
How it works
Inference latency drives the model framework choice.
In detail
- Real time: single node.
- Batch and streaming: Spark ML.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Run a batch job per requestWrong
Batch jobs are far too slow.
B. Score with Spark on the driver of a shared clusterWrong
Shared drivers are not serving.
C. A single-node model for real time; Spark ML for batchRight
Single-node models for real time.
D. Serve the Spark ML pipeline on an endpoint that starts a Spark cluster per requestWrongMost tempting
Spark start-up per request misses the latency.
Why it tempts: Serving the same pipeline seems consistent.
Use case
An illustrative scenario, not a real incident.
Illustrative: the team trains a scikit-learn equivalent for the real-time endpoint and keeps Spark ML for nightly scoring.
See it in different ways
flowchart TD
Q{"Inference type?"}
Q -->|"Batch or streaming at scale"| A0["Spark ML"]
Q -->|"Real-time single requests"| A1["Single-node model"]How to read this chart
- At "Inference type?": if "Batch or streaming at scale", go to "Spark ML"; if "Real-time single requests", go to "Single-node model".
mindmap
root(("Inference"))
n1["Batch"]
n2["Spark ML"]
n3["Streaming"]
n4["Spark ML"]
n5["Real time"]
n6["Single node"]How to read this chart
- The centre is "Inference".
- "Batch" covers "Spark ML".
- "Streaming" covers "Spark ML".
- "Real time" covers "Single node".