How to customize Scale Rules in Functions Apps hosted in ACA

Selmison Campelo de Miranda 5 Reputation points
2024-06-26T14:59:12.35+00:00

We have a Azure Function Apps hosted in Azure Container Apps (ACA) using Dedicated plan in Workload profiles.

The ACA allows setting horizontal scaling through scaling rules.

But when we deploy a func using az functionapp create the Container App bound to the func and automaticly created by this command doesn't allow me to customize the scaling rules.

The options to customize scaling rules in Azure Func hosted in ACA won't be available to customers?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,645 questions
Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
338 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Claudia Dos Santos Haz (CONCENTRIX CORPORATION) 1,010 Reputation points Microsoft Vendor
    2024-06-27T09:48:44.0833333+00:00

    Hi @Selmison Campelo de Miranda,

    Thank you for reaching out to Microsoft Q&A forum!

    When deploying an Azure Function App using az functionapp create, the automatically created Azure Container App (ACA) bound to the function doesn’t expose customization options for scaling rules. However, you can still achieve custom scaling by manually configuring the scaling rules in the Azure Container App. Here’s how:

    Create a Custom Scaling Rule:

    • Go to the Scale blade in your Container App.
      • Click on “Edit and deploy.”
        • Navigate to the Scale tab. Supported KEDA Scalers:
          - For event-driven Container Apps jobs, you can create custom scaling rules based on any ScaledObject-based KEDA scalers.
          
             - [If you’re using Azure Functions, consider using ScaledJob-based KEDA scalers](https://learn.microsoft.com/en-us/azure/container-apps/scale-app)[2](https://learn.microsoft.com/en-us/azure/container-apps/scale-app).
          

    Remember that while az functionapp create doesn’t directly expose these options, you can still configure custom scaling rules manually in the Azure Container App to meet your specific needs.