-
Notifications
You must be signed in to change notification settings - Fork 441
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
Functions Host Updates for Drain Mode #7772
Comments
How long is the long term migration for older Windows Consumption apps? |
It is a long term platform update with no specific end date. If you have an existing Windows Consumption app created before May 2021 and notice it is not allowing for a graceful shut down you would have to move your function app code to a new function app. |
Could you explain why this is necessary? As an app developer, my first reaction is that it seems like a fix to the Azure Functions runtime could address this "behind the scenes" without the need to delete and recreate the app. Especially so when other types of apps did not require the same action in order to be fixed. |
@andrewb-iq Agreed, and it is absolutely a fix being addressed behind the scenes, so over time all Windows Consumption apps will have drain mode enabled even if they were created pre-May 2021. But the upgrade process for those (pre May 2021) is long term, so that was just a workaround in case you want to be 100% sure. If you notice your app is being scaled in and your function executions are not being allowed to run for their full length, please raise a support ticket so we can help investigate. |
is there a way to verify if a particular function app has the new drain mode enabled? in case of any issues, i would like to be able to verify the drain mode status before i resort to deleting the app. |
@swettstein we do have a drain status API you can hit:
|
@liliankasem I have an Azure Function create last month (Feb-2022) and drain mode is disabled (I just confirmed using the status API. What can I do? this is the response I got by querying the drain status API And how long until the app is migrated? I already noticed lost messages from Service Bus because the host was being scaled. The messages went to DLQ without ever hitting my ServiceBusTrigger function. I had to manually remove it from DQL and re-queue the messages. I found an issue #5240 with a problem similar to mine and I also filed a new issue (#8223) since the previous was closed. |
Drain mode "disabled" in the context of the drain/status API isn't about if it is enabled or disabled for your application, but rather if has been "invoked" or not. So here if it's disabled, it means drain mode is not currently "active". The terminology is confusing. We might want to start using different terms for drain mode being enabled (enabled from platform) vs drain mode activated (function being put in drain mode by calling /drain mode API). I don't think there is a public way of checking if you application has drain mode enabled for the platform. But if your application was created in Feb 2022 then it should have drain mode. @nzthiago @soninaren for their input |
Apologies for not replying earlier. If your Windows Consumption apps were created before May 2021, you can raise a support call to check or I'd be happy to follow up with you as well to help double check your apps. |
I'm interest in this as well. Please let me know how we could check our apps. I'm starting to put them in production now and I already noticed this happening 3 times this month. It isn't much, but since we are using .NET6 in isolated mode, I don't have full control over the Service Bus message, so it goes to DLQ and could cause impact on our billing services. |
Drain mode gets involved in scale in operations to ensure your currently executing Functions are allowed to finish executing before the workers are removed. Although your apps would be benefitting from drain mode, given they have been recently created, from what you are describing where messages don't even get processed I'd recommend raising a support ticket as it might not be related to Drain Mode per se. |
As per above, Drain Mode is implemented through the platform. Limited documentation on Scale In behavior has been added to this documentation page. |
Drain Mode is an internal feature of the Azure Functions platform (Functions Consumption and Premium plans) to enable graceful scale-in of workers with minimal impact on executing function invocations. Drain mode is already implemented and allowing instances to gracefully shutdown up to Functions timeout periods. The platform has been updated and this feature is available for Windows and Linux on Consumption and Premium plans. Some notes:
Some optimization that doesn't affect the exiting Drain Mode feature remains during scale-out operations, and this issue will keep track of this work. It will be used for communicating progress towards completion to finalize the work started via #5672.
The text was updated successfully, but these errors were encountered: