An app sends one JSON request per user action and needs a prediction in under 100 ms. How do you call a Model Serving endpoint?
- Exam domain
- Model Deployment and Monitoring13% of the exam
- Difficulty
- Medium
- In this mock
- 6 questions on this domainPractise this domain
Why the exam asks this
Model Deployment and Monitoring (13% of the exam)
Objective in the exam guide: Deploy and query a model for realtime inference
Deploying and querying for real-time inference is named.
Why D is the answer
POST JSON, such as dataframe_records, to the endpoint's invocations URL with a token
Real-time endpoints accept REST requests at /serving-endpoints/<name>/invocations, with inputs such as dataframe_records or dataframe_split.
Remember: Query endpoints over REST.
How it works
Model Serving endpoints expose a REST invocations API.
In detail
- REST POST to invocations.
- Authenticated with a token.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Email the input to the data science teamWrong
Manual routes are not serving.
B. Submit a batch job per request and poll for completionWrongMost tempting
Jobs take far longer than 100 ms.
Why it tempts: Jobs are familiar but slow.
C. Write the request to a Delta table and wait for the nightly jobWrong
Nightly batch misses the latency.
D. POST JSON, such as dataframe_records, to the endpoint's invocations URL with a tokenRight
Query endpoints over REST.
Use case
An illustrative scenario, not a real incident.
Illustrative: a checkout page calls the fraud endpoint for each payment.
See it in different ways
sequenceDiagram participant P0 as App participant P1 as Endpoint participant P2 as Model P0->>P1: POST dataframe_records P1->>P2: predict P1-->>P0: predictions JSON
How to read this chart
- 1. App sends "POST dataframe_records" to Endpoint.
- 2. Endpoint sends "predict" to Model.
- 3. App gets a reply from Endpoint: "predictions JSON".
flowchart TD
Q{"How fast are predictions needed?"}
Q -->|"Hours, large volumes"| A0["Batch"]
Q -->|"Seconds, continuous data"| A1["Streaming"]
Q -->|"Milliseconds, per request"| A2["Real-time endpoint"]How to read this chart
- At "How fast are predictions needed?": if "Hours, large volumes", go to "Batch"; if "Seconds, continuous data", go to "Streaming"; if "Milliseconds, per request", go to "Real-time endpoint".