0
  1. 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?
  2. 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?
  3. 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.

  • What’s the problem exactly? What do you mean by “If I'm on consumption plan will cold start effect my function?” What do you mean by “effect”? Bottom line, yea, hitting the function regularly will help avoid a cold start because it will stay warm. More than 5 minutes though may be required. – Skin Jun 06 '23 at 20:39
  • effect i mean - would there be a delay in processing requests because of cold starts? – Arya Andrews Jun 08 '23 at 12:39
  • Yes, cold starts means a delay. – Skin Jun 08 '23 at 12:51
  • In addition to the document you shared for running Azure Functions on Kubernetes with KEDA. You can refer this Youtube video 1-https://www.youtube.com/watch?v=wSv67WeNqdQ&t=62s and 2- https://www.youtube.com/watch?v=PMDdD60DbCA for more detailed tutorial – SiddheshDesai Jul 03 '23 at 11:40

1 Answers1

0

I agree with @Skin

Cold start causes Delay in starting your function.

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.

SiddheshDesai
  • 3,668
  • 1
  • 2
  • 11