- I have a azure function(HTTP trigger) which is triggered when a webhook event is received. The azure function is only responsible for returning a value from dictionary based on a header value of the request and pushing it to a topic. I receive webhooks every 40-45 mins. If I'm on consumption plan will cold start effect my function?
- If yes, and I write a basic warmup function which is hit every ~5 mins and returns 200Ok response will it help avoid cold starts?
- I have to deploy this to AKS, should I be on lookout for something?
I understand that the warm trigger is not available for use in consumption plan so I thought of initializing the connection for the topic in my warm-up function but if i call it every 5 mins it will create new connections unnecessarily.
I could not find any article on how to deploy this to AKS except from this : https://learn.microsoft.com/en-us/azure/azure-functions/functions-kubernetes-keda Any article on how to actually deploy the azure function on AKS would be really helpful.
I agree with @Skin
As you receive your webhook requests every 40-45 minutes. The function will undergo cold start and delay in order for the host to start and trigger your function in consumption based plan. And If you add one warm up function that hits the function app every 5 minutes. It will keep your host active and you can avoid Cold start.
One alternative is to use Premium Function app plan that avoids cold start. Refer here
Speaking of running Azure Function on Kubernetes KEDA along with the MS Document you shared in the question. You can refer this blog in addition.