Databricks Machine Learning Associate Question 651
Single answerYou are building a machine learning system on Databricks for real-time inference. The model will serve predictions via a REST API, and you need to split incoming data between endpoints for inference based on certain conditions (e.g., model versions or feature availability). Which approach ensures scalability and proper routing of data in this scenario?
- A
Use a feature store to directly split the data between endpoints.
- B
Implement endpoint-specific logic within the REST API to route requests.
- C
Use a load balancer to distribute traffic across multiple endpoint models.
- D
Route requests through a data preprocessing pipeline to split and forward data to the appropriate endpoint.
Show answer and explanation
Correct answer: D
Explanation
In real-time inference scenarios where data needs to be split between different endpoints based on conditions (e.g., model version, feature availability), a preprocessing pipeline is the most suitable solution. It provides the flexibility to apply conditional logic and ensures that the correct endpoint processes the request. Other options like feature stores, REST API-specific logic, or load balancers do not provide the necessary control or scalability for such conditional routing.
- A. Incorrect.
Feature stores are primarily used to store and retrieve features for training and inference, not for routing or splitting data between endpoints.
- B. Incorrect.
Endpoint-specific logic within the REST API is not scalable as it tightly couples routing logic with the API, making it harder to maintain and extend.
- C. Incorrect.
Load balancers are used to distribute incoming traffic evenly across servers but do not inherently provide conditional routing based on data attributes.
- D. Correct.
Routing requests through a data preprocessing pipeline allows for conditional logic to split data based on attributes (e.g., model version or features) and forward it to the correct endpoint, ensuring scalability and flexibility.