Hi @Krthk,
Thanks for your question. Have you thought about using Model serving endpoint for your use-case: https://docs.databricks.com/aws/en/machine-learning/model-serving/
Launching a Databricks job via the REST API and dbutils is a different paradigm compared to deploying on a traditional virtual machine (like EC2). The overhead you're observing likely comes from the following factors inherent to Databricks Jobs execution:
- Cluster Scheduling Latency: Even though you are using a "pre-attached cluster," there might still be overhead from scheduling the job on the desired cluster. This is less than the overhead of creating a cluster but still exists in comparison to a persistently running VM.
- Job Initialization: Databricks initializes and sets up the environment for the job task, which involves loading configurations, dependencies, and versions of Spark. This process is streamlined in Databricks but still adds time compared to executing directly on a running service like Flask on a VM.
• 3. Communication Overhead: The use of the REST API to trigger the notebook introduces a small latency for the API call to be processed, validated, and queued within Databricks
Launching a Databricks job via the REST API and dbutils is a different paradigm compared to deploying on a traditional virtual machine (like EC2). The overhead you're observing likely comes from the following factors inherent to Databricks Jobs execution:
- Cluster Scheduling Latency: Even though you are using a "pre-attached cluster," there might still be overhead from scheduling the job on the desired cluster. This is less than the overhead of creating a cluster but still exists in comparison to a persistently running VM.
- Job Initialization: Databricks initializes and sets up the environment for the job task, which involves loading configurations, dependencies, and versions of Spark. This process is streamlined in Databricks but still adds time compared to executing directly on a running service like Flask on a VM.
• 3. Communication Overhead: The use of the REST API to trigger the notebook introduces a small latency for the API call to be processed, validated, and queued within Databricks