Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keda Scaler Support for Azure Functions Is Really Non-Existent even Though Func Tooling/Docs Gives the Impression that Scaling Is Supported #2465

Open
SOFSPEEL opened this issue Mar 29, 2024 · 1 comment
Assignees

Comments

@SOFSPEEL
Copy link

Please describe the documentation request or issue. Be as specific as possible.

So have a function app and deploy it to aks via .yaml file using the func tooling as follows:

func kubernetes deploy --name processtransaction --registry blah --dry-run >deploy-processtransaction.yaml
Below is an excerpt of the .yaml produced, here are the myriad of problems:

  • There is no timertrigger scaler support in keda
  • There is no durable function/orchestration support, and here I'm making some assumptions, if I was designing scaler support for Function apps, it would have to know whether a long-running orchestration has completed or not. i.e. before you can scale down you have to know whether the orchestration has completed or not.
  • The documentation gives you the impression that Azure function apps are supported: https://learn.microsoft.com/en-us/azure/azure-functions/functions-kubernetes-keda
  • The tooling gives you the impression that scaling is supported, i.e. why would the tooling create a timertrigger if it wasn't supported by keda (either by built-in or external scaler)
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: procreqs
  labels: {}
spec:
  scaleTargetRef:
    name: procreqs
  triggers:
  - type: cosmosdbtrigger
    metadata:
      connection: CosmosConnection
      leaseContainerName: leases
      leaseContainerPrefix: '%AZURE_FUNCTIONS_ENVIRONMENT%'
      containerName: ProcessingRequest
      databaseName: FundraisingGateway
      leaseDatabaseName: FundraisingGateway
  - type: timertrigger
    metadata:
      schedule: 0 0 0/1 * * *
  - type: timertrigger
    metadata:
      schedule: 0 10/20 * * * *
---

Expected Behavior

  • that scaling is supported under aks, and that orchestrations are part of that support. i.e. I would guess that 90% of fn apps use orchestration.

  • that the documentation is improved and mentions orchestrations and the support (or lack thereof) for orchestrations. Orchestrations to me are a show stopper as basically in my mind scaling doesn't work unless it supports orchestrations.

  • If you really do not support scaling to not have the tooling generate stuff like timertrigger as I'm sure this has sent many a deVeloper like myself down a black hole either thinking that scaling is supported (when its not) or trying to fix (the unfixable). Note that I may not have made the decision to convert my fn app to run under aks without proper scaler support.

  • Provide a timeline for when scaling will be supported.

Actual Behavior

Scaling doesn't work, like for example the timertrigger mentioned above and orchestrations, meaning that pods don't scale up or down.

Steps to Reproduce the Problem

Run func on a function app with timertrigger kicking off an orchestration. Deploy it to aks.
Watch no scaling will occur, what should happen is that replicas should go to zero, when timer not running, then scale up, then scale down when orchestration completes.

@raorugan
Copy link

Timer Trigger with KEDA scaling is supported in Azure Functions for Azure container apps . Check out this blog post - https://techcommunity.microsoft.com/t5/apps-on-azure-blog/announcing-the-release-of-workload-profile-and-managed-scaling/ba-p/4086313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants