Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.93k stars 441 forks source link

Expose liveness and readiness endpoints #5259

Open jeffhollan opened 4 years ago

jeffhollan commented 4 years ago

When running functions in Kubernetes alongside KEDA, Kubernetes can assess the health of a function app by checking the liveness and readiness probes. In our service we are able to stop scaling out if the host is only executing and failing. Goal here would be to expose liveness probe endpoints so even if the host is running but things like a trigger i constantly misfiring and no successful executions are happening the liveness probe can return that info so Kubernetes and KEDA stop scaling out

https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/

hansmbakker commented 3 years ago

ASP.Net Core has https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-3.1

Unfortunately that does not work with Azure Functions out of the box.

@keithsmith21 wrote a library to use the ASP.Net Core health checks functionality in Azure Functions and wrote an article about it.

It would be great if Microsoft could pick this up and support it or integrate it / collaborate on it somehow.

tomkerkhove commented 3 years ago

Bumping this as it's becoming more and more important to have this.

hansmbakker commented 3 years ago

Does anybody know whether this works with the new out-of-process .net worker?

esimkowitz commented 2 years ago

+1 having access to the readiness info is very important for teams who want to build Kubernetes services using Azure Functions

SantoshPisini commented 2 months ago

Any update on this issue? Tx.