Forum Discussion
VirajV
Mar 05, 2023Copper Contributor
Advice on how to deploy API (Scaleable real time inference using GPU, no time out)
Hi, I am hoping to run my python code that uses large AI models over large videos. Please can someone best advise me on the best Azure technology to use. Currently I hosted my FastAPI python ...
ergolpe
Microsoft
Mar 07, 2023I believe you may be misunderstanding the capabilities of Durable functions. Activity, orchestrator, and entity functions are subject to the same function timeouts as all Azure Functions. https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout shows these timeouts and as you can see there a Premium or Dedicated plan allows for an unlimited execution period. The trigger starts function execution, the function needs to return/respond within the timeout duration. However, a single request, regardless of the function app timeout setting, has 230 seconds (the maximum amount of time that an HTTP triggered function can take) to respond to a request. Beyond that, you need to consider using the Durable Functions async pattern. You should be able to leverage that with long processing times without an issue, but your client needs to leverage async status calls. https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-overview?tabs=csharp-inproc#async-http
Obviously AKS has intrinsic GPU support, but you will need to investigate the VMSS SKU's available for use there in comparison to your existing Triton workloads. Your mileage may vary with the new isolated worker process support for Functions as well. See https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-dotnet-isolated-overview
Obviously AKS has intrinsic GPU support, but you will need to investigate the VMSS SKU's available for use there in comparison to your existing Triton workloads. Your mileage may vary with the new isolated worker process support for Functions as well. See https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-dotnet-isolated-overview