Hello Vinod Rajendran,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Problem
I understand that you would like to migrate Azure Durable Functions to Azure Kubernetes using KEDA and putting in mind the cost-effective solution.
Solution
Migrating Azure Durable Functions to Azure Kubernetes (using KEDA) involves several steps and considerations. Unlike non-durable functions, Durable Functions have unique requirements due to their stateful nature, such as managing state and handling orchestrations. To migrate Azure Durable Functions to Kubernetes using KEDA, I provide you here the best practices general steps and some references to help you for more detail steps:
- First, convert your Durable Functions into a Docker container. This involves creating a Dockerfile for your function app, building the container image, and pushing it to a container registry like Azure Container Registry.
- Deploy an Azure Kubernetes Service (AKS) cluster and install KEDA, which will handle event-driven scaling for your functions. You can install KEDA using Helm or by applying the necessary Kubernetes manifests.
- Define
ScaledObject
custom resources to link your containerized Durable Functions to event sources. This setup allows KEDA to scale your functions based on custom metrics or external events like queue lengths, HTTP requests, or other event sources. - Deploy your function app container to the AKS cluster. You'll also need to set up the necessary Kubernetes resources, such as ConfigMaps, Secrets, and Service Accounts, to manage configurations and credentials.
- After deployment, monitor the performance and scaling behavior of your functions. Adjust KEDA's scaling policies and configurations as needed to optimize resource usage and cost.
References
The following resources provides detailed instructions on deploying Azure Functions to Kubernetes using KEDA, including setting up the infrastructure, configuring Kubernetes resources, and using KEDA for scaling:
Deploy Azure Functions as Docker containers to Kubernetes using KEDA
A guide to mastering autoscaling in Kubernetes with KEDA.
Durable Functions on AKS with KEDA.
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam