question

DeyanPetrov avatar image
0 Votes"
DeyanPetrov asked ·

AKS cold start?

I have about 30 pods (F#/.NET Core + Azure Functions Runtime) running in a 3-node AKS cluster, each of which I am calling every 5 minutes externally (using Application Insights Availability/Web tests).
I am observing that if the pod is not called often (e.g. only 1x/every 5 minutes) then it takes 5000ms+ to call it (usually the call checks dependencies like if db is reachable, if storage blob container is reachable, or event hub). If I call the pod 10-20 times one after the other, I get very fast reponse times below 100ms.

First I thought the shared storage account (AzureWebJobsStorage env var) could be the issue, but then took 1 pod and reassigned it to a dedicated storage account, and after couple of minutes of inactivity again 5000ms+ response time.

Is there any kind of cold start, or automatic shut down of the pods in case they are inactive for a couple of minutes??

azure-functionsazure-kubernetes-service
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DeyanPetrov avatar image
0 Votes"
DeyanPetrov answered ·

I have increased the number of calls to 1 pod and it seems that I do not experience such "cold-starts" with this pod now ... Somehow it seems there is some "idle timeout" and calling the pod 1x/every 5 minutes is too less to keep it alive - can this be??

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DeyanPetrov avatar image
0 Votes"
DeyanPetrov answered ·

Trying now with "functionTimeout": "-1" in host.json ....

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

functionTimeout did not help ... :(

0 Votes 0 · ·
DeyanPetrov avatar image
0 Votes"
DeyanPetrov answered ·
· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DeyanPetrov avatar image
0 Votes"
DeyanPetrov answered ·

10147-dnsfix.png




Applied an old workaround I found googling (under spec/template/spec, same level as containers), seems to help ... Wondering why 1,5 year-old-problem is hitting on innocent AKS/K8s newbies like me in 2020 :(

   dnsConfig:
     options:
     - name: single-request-reopen

dnsfix.png (27.1 KiB)
· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.