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

Question about Flex Consumption Function App Service Bus Trigger #10706

Open
dsdilpreet opened this issue Dec 19, 2024 · 0 comments
Open

Question about Flex Consumption Function App Service Bus Trigger #10706

dsdilpreet opened this issue Dec 19, 2024 · 0 comments
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)

Comments

@dsdilpreet
Copy link

Is your question related to a specific version? If so, please specify:

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

C#

Question

Hi there, I asked this question over here, but this might be more appropriate place to ask, if not my apologies. The question is about service bus messages stay in queue for longer on flex consumption compared to consumption. The explanation is:

I have multiple functions which subscribe to service bus topics using the ServiceBusTrigger. All function apps are running .NET 8 isolated model. The service bus is using standard tier. Each function app is being pinged from application insights every 10 minutes.

I have recently migrated from windows consumption plan to flex consumption plan.

On the consumption plan, when the app scaled down to 0, service bus requests would also drop whereas on flex consumption, it doesn't drop when function apps scale down to 0. It only drops when I turn them off.

I understand that service bus functions are now scaled independently of other trigger types on flex consumption plan. What I am noticing now on flex is that there is some delay even before a message is picked up from the subscription by the trigger in the function, I have seen almost up to 2 minutes. I have never observed delays of this kind on consumption plan.

Image

Is this expected? Is there any configuration or setting I can change in the function app, so it checks for messages more frequently? Even when I have always on instance enabled, the delay still seems to be there although it does seem a bit reduced but then again I haven't done too much with this.

Appreciate any insight into how this works internally.

Thank you!

My host.json file

{
    "version": "2.0",
    "logging": {
        "applicationInsights": {
            "samplingSettings": {
                "isEnabled": true,
                "excludedTypes": "Request"
            },
            "enableLiveMetricsFilters": true
        }
    }
}

and appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Function.GetHealthFunction": "Error",
      "Azure.Messaging.ServiceBus": "Warning",
      "Azure.Core": "Warning"
    }
  }
}

These files have not been changed when migrating to flex consumption.

For context, I have randomly picked a event from app insights before the changeover to flex.

Image

@satvu satvu added the area: flex-consumption Items related to Flex Consumption support label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: flex-consumption Items related to Flex Consumption support Needs: Triage (Functions)
Projects
None yet
Development

No branches or pull requests

2 participants