How to migrate durable function to KEDA

Vinod Rajendran 21 Reputation points
2024-07-26T13:09:06.7833333+00:00

Hi

I have migrated all my azure non durable function to Azure Kubernetes(KEDA), but I do not find any documentation on how we can move the Durable Function to Azure Kubernetes using KEDA. The goal of this ask is to fully utilize the Azure Kubernetes and also reduce the cost.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,101 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,145 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 12,011 Reputation points
    2024-07-26T14:19:23.86+00:00

    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:

    1. 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.
    2. 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.
    3. 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.
    4. 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.
    5. 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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.