My Profile Photo

Miroslav Janeski


Miroslav Janeski - EngD | Technical Director | Process Mining Expert | Microsoft MVP (Azure - Application as a Service & .NET)


Azure Functions Flex Consumption: Solving the Cold Start Problem Without Losing Pay-Per-Use

I’ve been using Azure Functions since version 1.x. I love the serverless model. It represents the core of being cloud-native. It enables the engineers to focus on the business logic while spending less time on the infrastructure and some of the cross-cutting concerns.

The Core Principles of Cloud-Native Applications

The serverless model is a natural fit for cloud-native application development due to its inherent benefits and alignment with the core principles of cloud-native architecture. To name a few:

  • Scalability and Flexibility — auto-scale and event-driven architecture
  • Microservices — independent deployment and decoupling
  • Cost Efficiency — pay-per-use
  • Reduced Operational Overhead — managed infrastructure
  • Improved Developer Productivity — or reduced time to market
  • Enhanced Security and Compliance

The Long-Standing Challenge

Since version 1.x., the main advantages of Azure Functions are the pay-per-use pricing model and the auto-scale support. One can build a proof of concept in almost no time and test it in a real scenario. If the proof of concept gets the right market friction, technically, there is a production-ready hit. The time to market with cloud-native applications is unbeatable with any other approach.

However, one of the disadvantages of this approach is the cold start effect on HTTP-triggered Azure Functions. While there were many alternatives to resolve or minimize the cold start effect, none solved the issue while keeping the pay-per-use and auto-scale advantages in place.

Azure Functions Flex Consumption

One of the many announcements at the #MicrosoftBuild2024 conference is the Public Preview of Azure Functions Flex Consumption.

The new Azure Functions hosting plan offers improved scale flexibility, with always-ready instances per function group or individual functions while maintaining serverless billing (pay-per-use). With the new hosting plan, one can define various auto-scale strategies per individual function or group of functions, which makes the whole serverless model in Azure even more attractive and suitable for building future cloud-native applications.

We often have to step back, rethink, and redesign to solve certain challenges. That’s what Microsoft did to solve this challenge. They built a new internal scaling service, Legion. The new Azure Functions Flex Consumption runs on top of Legion, also announced at Microsoft Build 2024.

Azure Functions Flex Consumption represents a significant leap forward in serverless computing. It addresses long-standing challenges while maintaining cost efficiency and scalability benefits. As cloud-native applications evolve, innovations like these will pave the way for even greater advancements.