Hi! I'm trying the new serverless feature for Azur...
# ask-community
a
Hi! I'm trying the new serverless feature for Azure Container Instance as it seems to work nicely. Only downside is ~1min30s for deploying the container group, is there any way to speed up this? I'm using the official prefect image + a few extra python packages.
j
hey! happy to hear push pools are working for you! I just want to confirm that the 1min 30s you're seeing is the time it takes the ACI deployment to finishing spinning up? As opposed to the time it takes before the deployment is initiated at all
I have heard that hosting the image yourself in azure container registry can sometimes help with deployment speed
a
Yes you understood it correctly. I am already using azure container registry with a custom image. I found a list of optimizations to try here: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting#container-takes-a-long-time-to-start
I have tried to optimize the registry (moved to same region as ACI, and increased SKU for my registry) and have not been able to reduce deployment time. The main time spent deploying does not seem to relate to pulling the image from the registry From the perspective of how this was implemented on the prefect side: • What is the reasoning for deploying a new resource (container group) for each flow run? • Would it be possible to instead start new containers for each new flow run within the same container group?