Introducing Azure Functions 2.0
Today, we’re very pleased to announce the general availability of Azure Functions 2.0! This is a huge milestone packed with several capabilities, all focused around making it easier than ever for you to build highly scalable serverless applications.
Azure Functions 2.0 is production ready and capable of handling your most demanding workloads, backed by our 99.95 percent SLA. We strongly encourage to start any new development on 2.0 and recommend that customers upgrade their existing 1.0 apps to the 2.0 version, to experience all the benefits of this new release. For specific instructions, please see our upgrading to 2.0 guidance.
What’s in this release?
Functions 2.0 advances the product in terms of user experience, developer capabilities, and platform robustness. The most significant changes are to the host runtime, which is now portable, cross-platform, and more efficient. This enables a wide range of options for how you build and run your apps.
More platforms, more options
Azure Functions can now run in more environments, including locally on your Mac or Linux machine. Combine this with our fantastic integration with VS Code, and you have a best-in-class serverless development experience on any platform. The runtime also works great hosted outside of the Azure Functions service and is available to run anywhere. Check out our support for Azure Functions on Kubernetes and Azure Functions on IoT Edge. There are even more hosting options on the way; be sure to check out the “What’s next?” section below to find out more!
Optimized for your code
Functions 2.0 is more performant than ever, thanks in part to general host improvements, support for more modern language runtimes, and the ability to run code from a package file.
.NET developers can now author functions using .NET Core 2.1. Not only does this provide a significant performance gain, but also means you can develop and run your .NET functions in more places. We’ve also made major changes to how assembly resolution works, giving functions their own load contexts. This means you shouldn’t run into as many conflicts, but if you do, it’s easier than ever to mitigate.
Non-.NET languages now work from a language worker model, and the first stack to reap the benefits is JavaScript. Functions 2.0 now supports both Node 8 and Node 10, and users should expect to see improved performance in general. The worker approach allows for better version support and iteration, and it’s how we’re going to enable new languages going forward (I wouldn’t miss the “What’s Next?” section in this post for more details on the next one in line)
Powerful programming model
If you are moving from the 1.0 runtime, one of the biggest changes you’ll see is that we’ve changed how bindings and integrations work. Now, except for the core HTTP and timer support, all bindings are brought in as extensions. These are just simple packages that can be installed with Functions tooling, and they still provide the same great programming model you’re used to. The change to decoupled extension packages allows bindings (and their dependencies) to be versioned independently of the core runtime. That means you have more control over your application and how it runs, especially as the services on which your app depends continue to evolve.
Azure is constantly adding new services, and the package model also allows us to more rapidly integrate with them. One recent addition is Azure SignalR Service, a fully managed service that enables you to focus on building real-time web experiences without worrying about setting up, hosting, scaling, or load balancing your SignalR server. Azure Functions now has an extension for this service, an open source binding hosted by Microsoft Azure in this GitHub repo, and you can start building real-time serverless applications today by checking out the SignalR Service binding reference in our documentation.
Easier development
Azure Functions has powerful native tooling inside of Visual Studio, VS Code, VS for Mac, and a CLI that can be run alongside any code editing experience. If you haven’t explored these options before, we highly encourage giving them a look, as they will have an immediate impact on your productivity.
Serverless applications can involve several different components and quickly become difficult to observe and monitor. In Functions 2.0, we expand our integration with Azure Application Insights to give more visibility into distributed tracing. Dependencies are automatically tracked, and cross-resource connections are automatically correlated across a variety of services, with more coming soon. All of these are visualized in the Application map, allowing you to understand how components interact and drill into individual executions to diagnose issues.
With Azure Functions 2.0 we are also investing in refining the DevOps experience. Our new Deployment Center is a step in this direction, aggregating build and deployment options in a unified experience. You can access the Deployment Center under the “Platform features” for your Function App and easily setup your preferred source to get your code deployed in Functions right away.
This increased focus on DevOps experiences starts with your first function creation. Our getting-started experience in the Azure portal now highlights your development and deployment options and helps you get everything configured. Just create a new function app in the portal and you’ll be walked through all the steps needed to get your first 2.0 function deployed.
What’s next?
We’re also excited to give some visibility into our short-term roadmap. Azure Functions 2.0 lays the groundwork for several important innovations, and below is a quick glance at what is coming up soon for hosting options and language support.
Serverless Linux
As part of our commitment to expand development stacks and hosting options for Azure Functions, we are investing in serverless Linux hosting (powered by Service Fabric Mesh), starting with a preview of the Consumption plan for Functions built on top of Linux OS. This gives Linux – and Mac – focused developers a seamless and natural path to hosting on the platform with the highest affinity to their development stack, while taking full advantage of the serverless benefits. To get access to the early bits and share your feedback, sign up for the Linux preview.
Python support
We’re actively building support for Python 3.6 based on the Functions 2.0 runtime, the new language worker model, and the Linux hosting platform. Python functions are a natural fit for data manipulation, machine learning, automation, and scripting scenarios. Building these scenarios serverlessly can take away the burden of managing the underlying infrastructure, so you can move faster and focus on solving your business problems. Currently, this capability is in private preview. We invite you to give it a try and share your feedback with us.
Stay in touch!
With so much being released now and coming soon, we’d sincerely love to hear your feedback. You can reach the team on Twitter and on GitHub, and we also actively monitor StackOverflow and UserVoice. Be sure to reach out and tell us your favorite feature in Functions 2.0 and, if you’re attending Microsoft Ignite this week, please swing by our booth to say hello in person!
Source: Azure Blog Feed