This blog is a transcript of the session “What’s new in Azure Functions” presented by Jeff Hollan, Principal PM Manager for Microsoft Azure Functions at Integrate 2020.
Agenda – What’s New?
- Static Web Apps
- Premium and VNet
- Custom Language handler
- Durable Functions
Jeff started the session with Azure Serverless ecosystem. The key offering services like Azure Functions, Logic App, Event Grid and API Management.
Azure Functions
Azure Functions provide the ability to run discrete small units of code, or functions, in an extremely flexible, scalable, and cost-effective manner.
Logic Apps
Azure Logic App, which provides a graphical interface for creating integration workflows.
Event Grid
Event Grid is a fully managed event service that enables us to easily manage events across many different Azure services and applications.
API Management
API Management which provides central management layer for our APIs
Key Scenarios
- Serverless APIs (Web and Mobile backends)
- Event streaming and process
- Automation
- Data and System integration
- Microservices
Standard Web App Architectures Vs Serverless Web App Architectures
Jeff Hollan discusses about how the standard web app architecture works and the various components involved in this architecture.
And later he discusses on how the similar app can be built on top of the serverless web app architecture. The following picture shows the basic components present in this architecture.
The user request is sent to Azure function via API call or the Azure CDN.
The Azure function responds to the request based on the request type. It queries database if it is required.
Azure Static Web Apps
Microsoft recently announced Azure Static Web Apps, this service automatically builds and deploys full stack web apps to Azure from a GitHub repository.
Currently Static Web Apps support to build modern JavaScript applications with frameworks and libraries like Angular, React, Svelte, Vue with an Azure Functions back-end.
The workflow of Azure Static Web Apps is tailored to a developer’s daily workflow. Apps are built and deployed based off GitHub interactions.
When you create an Azure Static Web Apps resource, Azure sets up a GitHub Actions workflow in the app’s source code repository that monitors a branch of your choice.
Every time you push commit or accept pull requests into the watched branch, the GitHub Action automatically builds and deploys your app and its API to Azure.
Static web app – Demo
Go to the Azure Portal
- Go to the Azure Portal here
- Select your Azure subscription
- Create a resource group
- Name your Static Web App
- Choose the region closest to you
- Sign in with GitHub
- Select your GitHub organization
- Select your GitHub repository
- Select your branch (ex: master)
- Click the Next: Build > button
Set your folder locations
- Set your App location to the javascript framework you prefer (Angular, React, Svelte, Vue)
- Set the Api location to api
- Set the App artifact location to one of the following, based on the framework you chose: Angular, React, Svelte, Vue
- Click the Review + create button
- Click the Create button
Go to your web site
Azure is now creating your resources. Static Web App will create a GitHub Action workflow file and commit it to your repository in the ‘.github/workflows’ folder. When you push changes to the branch, they will trigger the GitHub Action workflow to build and deploy your app to Static Web Apps!
- Soon, you’ll be presented with a button to Go to Resource. Click this
- At the top of the page you’ll see several links. Click the GitHub Action Runs link
- You’ll be brought to your GitHub Action. When it is complete, you’ll see green arrows everywhere.
- Once the action has completed the build and deploy, you can go back to the portal and click the URL link to open your web app
Why do Enterprise want Serverless?
- Ease of managing resource
- Scale automatically
- No Patches or Maintenance
- Faster time to market
- Simplified code base
- Low cost
What do Enterprise need from Serverless?
- Reliable Performance
- No cold start
- Scale limits
- Security baselines
- Virtual Network Isolation
- High performance
- Large workloads
- Long running workloads
- Addresses enterprise use cases
- ERP
- Big Data
Premium Plan
- Serverless Scale with bigger, Configurable instance
- Up to 4 cores 12Gb of memory
- Cold start controls
- Min plan size
- Pre-Warmed instances
- VNET connectivity
- Longer run duration
- “Indefinite”
- Predictable billing
- Max Plan Size
A slew of networking features (Premium + VNet)
- PrivateLink Inbound – a private address space for your function inbound (preview)
- PrivateLink Outbound – Securely communicate with other resources that have a PrivateLink endpoint (GA)
- Route all traffic through your private network (WEBSITE_VNET_ROUTE_ALL)
- Isolate the storage account for your function app (deploying…)
Functions Service and Runtime
The Azure Functions service provides a fully managed, hosted environment for running functions. These are scaled, updated, and operated for you (consumption and premium plans)
The Azure Functions runtime is the programming model you write your functions in. It was what executes your functions in the services, but the runtime can be separate from the service, providing a FaaS model anywhere. The runtime is open source for Azure Functions host.
Serverless and Kubernetes
A few reasons to use Kubernetes
- You can run On-Premises
- Leveraging Existing Kubernetes Investments
- Custom compute, security, or network requirements
- No vendor lock-in
Azure Functions Triggers and Bindings Updates
- Azure Service Bus – Session support (in order message delivery)
- Azure Event Huns – Checkpoint control (coming very soon…)
- Azure Cosmos DB – Checkpoint control (coming soon…)
- Kafka (trigger and bindings) – Now works in premium plan
- RabbitMQ (trigger and bindings) – Now works in premium plan
Azure Functions Languages
Azure Function supports multiple languages and it is based on the Runtime versions. The following list shows some of them
- C# (.NET 3.1)
- PowerShell
- JavaScript / TypeScript
- Python
- Java
Custom Handlers
Custom handlers are lightweight web servers that receive events from the Azure Functions host. Any language that supports HTTP primitives can implement a custom handler. This means that custom handlers can be used to create functions in languages that aren’t officially supported.
Conclusion
This article covers various use case covered on topic “What’s New in Azure Functions”. The key parts of discussion focus on the integration use case with Static Web Apps, Premium and VNet, Custom Language Handler, Durable Functions. The discussion extended with Demo of Static Web Apps and detailed discussion about Serverless and Kubernetes.