• 4 min read

Advancing the developer experience for serverless apps with Azure Functions

Azure Functions constantly innovates so that you can achieve more with serverless applications, enabling developers to overcome common serverless challenges through a productive, event-driven programming model.

Azure Functions constantly innovates so that you can achieve more with serverless applications, enabling developers to overcome common serverless challenges through a productive, event-driven programming model. Some releases we made in the last few weeks are good examples of this, including:

The new releases and improvements do not stop there, and today we are pleased to present several advancements intended to provide a better end-to-end experience when building serverless applications. Keep reading below to learn more about the following:

  • A new way to host Azure Functions in Kubernetes environments
  • Stateful entities with Durable Functions (in preview)
  • Less cluttered .NET applications with dependency injection
  • Streamlined deployment with Azure DevOps
  • Improved integration with Azure API Management (in preview)

Bring Azure Functions to Kubernetes with KEDA

There’s no better way to leverage the serverless advantages than using a fully managed service in the cloud like Azure Functions. But some applications might need to run on disconnected environments, or they require custom hardware and dependencies. Customers usually take a containerized approach for these scenarios, in which Kubernetes is the de facto industry standard. Managing application-aware, event-driven scale in these environments is non-trivial and usually insufficient, as it’s based only on resource usage, such as CPU or memory.

Microsoft and Red Hat partnered to build Kubernetes-based event-driven auto scaling (KEDA). KEDA is an open source component for Kubernetes that provides event-driven scale for any container workload enabling containers to scale from zero to thousands of instances based on event metrics, such as the length of an Azure Queue or Kafka stream, and back to zero again when done processing.

Since Azure Functions can be containerized, you can now deploy a Function App to any Kubernetes cluster, keeping the same scaling behavior you would have on the Azure Functions service.

Kubernetes cluster diagram showing journey from CLI to external trigger source

This is a significant milestone for the open source ecosystem around Kubernetes, so we’re sharing much more detail in a separate blog post titled, “Announcing KEDA: bringing event-driven containers and functions to Kubernetes.” If you want to learn more about it, register today for the Azure webinar series scheduled for later in May. In this webinar we will go more in depth on this exciting topic.

Durable Functions stateful patterns

We have been thrilled with the excitement and energy from the community around Durable Functions, and our extension to the Functions runtime that unlocks new stateful and workflow patterns for serverless workflows. Today we are releasing some new capabilities in a preview package of Durable Functions.

For stateful functions that map to an entity like an IoT device or a gaming session, you can use the new stateful entity trigger for actor-like capabilities in Azure Functions. We are also making the state management of your stateful functions more flexible with preview support for Redis cache as the state provider for Durable Functions, enabling scenarios where applications may run in a disconnected or edge environment.

You can learn more about the new durable features in our documentation, “Durable Functions 2.0 preview (Azure Functions).”

Dependency injection for .NET applications

We are constantly striving to add new patterns and capabilities that make functions easier to code, test, and manage. .NET developers have been taking advantage of dependency injection (DI) to better architect their applications, and today we’re excited to support DI in Azure Functions written in .NET. This enables simplified management of connections plus dependent services, and unlocks easier testability for functions that you author.

Learn more about dependency injection in our documentation, “Use dependency injection in .NET Azure Functions.”

Streamlined Azure DevOps experience

With new build templates in Azure Pipelines, you will have the ability to quickly configure your Azure Pipeline with function-optimized tasks to build your .NET, Node.js, and Python applications. We are also announcing the general availability of the Azure Functions deployment task, which is optimized to work with the best deployment option for your function app.

Configuring Azure Pipelines with function-optimized tasksDeploying a function app to Azure Functions

Additionally, with the latest Azure CLI release we introduced a new command that can automatically create and configure an Azure DevOps pipeline for your function app. The DevOps definition now lives with your code, which allows to fine tune build and deployment tasks.

For more detailed information please check our documentation, “Continuous delivery using Azure DevOps.”

Defining and managing your Functions APIs with serverless API Management

We have also simplified how you can expose and manage APIs built with Azure Functions through API Management. With this improved integration, the Function Apps blade in the Azure portal presents an option to expose your HTTP-triggered functions through a new or an existing API in API Management.

Linking API Management dashboard to Function Apps

Once the Function App is linked with API Management, you can manage API operations, apply policies, edit and download OpenAPI specification files, or navigate to your API Management instance for a full-featured experience.

Learn more about how to expose your Function Apps with API Management in our documentation.

Sharing is caring

We have also included a set of improvements to the Azure Serverless Community Library, including an updated look, a streamlined sample submission process, and more detailed information about each sample. Check out the Serverless Community Library to gain inspiration for your next serverless project, and share something cool once you’ve built it.

Get started today

With Functions options expanding and quickly improving, 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. For the latest updates, please subscribe to our monthly live webcast.

Tell us what you love about Azure Functions, and start learning more about all the new capabilities we are presenting today: