Databricks Machine Learning Associate Question 625
Single answerYou are deploying a machine learning model built in Databricks for real-time inference. The model predicts user behavior from clickstream data. To ensure low latency and scalability, which of the following approaches should you use?
- A
Deploy the model as a REST API using Databricks Model Serving.
- B
Export the model and deploy it on a local server for inference.
- C
Use Databricks Jobs to schedule the model for batch predictions.
- D
Deploy the model using an Apache Spark Streaming job.
Show answer and explanation
Correct answer: A
Explanation
For real-time inference, Databricks Model Serving is the most appropriate solution. It allows you to deploy machine learning models as REST APIs, ensuring low latency and scalability, which are critical for real-time applications like predicting user behavior from clickstream data.
- A. Correct.
This is the correct option. Deploying the model as a REST API with Databricks Model Serving ensures low latency and high scalability for real-time inference.
- B. Incorrect.
Exporting the model to a local server is not ideal for real-time predictions as it may not scale well and can introduce high latency.
- C. Incorrect.
Databricks Jobs are used for batch processing, which is not suitable for low-latency real-time inference.
- D. Incorrect.
Using an Apache Spark Streaming job is better suited for streaming data processing, but it is not optimized for real-time REST API-style inference.