NodeJs0Improved Durable Functions coming to Microsoft’s Azure Functions service – but what about cold start? • DEVCLASS

[ad_1]

Microsoft’s Anirudh Garg, who leads the engineering team for Azure Functions, has posted abut planned improvements to the service for 2023, including a focus on Durable Functions, an extension that supports function orchestration without the need for queue management.

AWS Lambda, first previewed in November 2014, proved to be a ground-breaking approach to cloud computing, enabling developers to run event-driven code without provisioning servers. Serverless functions are cost-effective as they run on demand and otherwise do not consume compute resources.

In March 2016 Microsoft came up with Azure Functions which uses similar concepts, but the company has struggled to match the performance of Lambda particularly in the area of cold start, the time it takes to initialize a function on first invocation after a period of inactivity. The problem is particularly severe for languages that require a large runtime such as Java or .NET (which is one reason for interest in native compilation for .NET). Microsoft’s solutions such as Azure Functions premium plan or running Azure Functions as an App Service are not satisfactory since they involve keeping servers always running, defeating part of the object, or making repeated “warm-up” calls to keep a function alive.

AWS has made strides with Lambda cold starts, introducing its SnapStart technology at the re:Invent conference late last year. What is Microsoft doing? Garg promises “better cold start and better integration with extensions among others,” at least for .NET isolated workers, and says that there were “significant improvements” in cold start last year but without giving details.

Coding Durable Functions in C# using a DurableOrchestrationContext

There is better news in the area of Durable Functions, one of the more compelling features in Azure Functions. Serverless functions are event-driven, but what if you need to connect a series of functions in a potentially long-running workflow? This kind of orchestration can be complex and involve other services such as queues, or for AWS Lambda, Step Functions in combination with a queue, but Durable Functions makes this kind of orchestration easy to code. Developers can write code that treats an Azure Function like any other asynchronous function call, even if it might take hours or days to return. The code can also wait for a human interaction, such as an approval.

Durable Functions came out of Microsoft Research as described in this 2021 paper. “Azure’s Durable Functions (DF) programming model enhances FaaS [Functions as a service] with actors, workflows, and critical sections,” it explains.

Microsoft considers Durable Functions a differentiator versus AWS Lambda and now has “support for Durable in all the major languages that Functions support,” Garg said, including .NET, Python, Java, PowerShell and NodeJS. Plans for this coming year include performance enhancements, an ability to run on different storage backends, and for .NET 7.0 support to come out of preview.

[ad_2]

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *