Slide 1

Slide 1 text

Azure Functions: Serverless für .NET-Entwickler Boris Wilhelms @boriswilhelms Consultant

Slide 2

Slide 2 text

Boris Wilhelms ▪ Consultant and Architect at Thinktecture AG ▪ Focus on ▪ Cloud-native & serverless architectures ▪ Mobile & web-based application architectures ▪ .NET Core ▪ Email: [email protected] ▪ Twitter: @boriswilhelms Advanced Azure Functions Who am I?

Slide 3

Slide 3 text

• What is Serverless? • What are Azure Functions? • What can I use Azure Functions for? • Pros and cons of Azure Functions • Ausblick Azure Functions: Serverless für .NET-Entwickler Agenda

Slide 4

Slide 4 text

▪ We can choose from a continuum ▪ VM ➔ ▪ Containers ➔ ▪ Orchestrators ➔ ▪ PaaS ➔ ▪ Serverless Azure Functions: Serverless für .NET-Entwickler Evolution to Cloud Compute Continuum PaaS IaaS On-Premises Serverless

Slide 5

Slide 5 text

Azure Functions: Serverless für .NET-Entwickler Typical Serverless attributes

Slide 6

Slide 6 text

▪ Serverless Compute → Azure Functions ▪ Serverless SQL Database → Azure SQL Database Serverless ▪ Serverless No SQL Database → Azure Cosmos DB ▪ Serverless Events → Azure Event Grid ▪ Serverless Workflows → Azure Durable Functions & Azure Logic Apps ▪ Serverless IoT → Azure IoT Hub ▪ Serverless Analytics → Application Insights ... and more ... https://azure.microsoft.com/en-us/solutions/serverless/ Azure Functions: Serverless für .NET-Entwickler Serverless in Azure (Serverless != FaaS-only)

Slide 7

Slide 7 text

▪ Azure Functions is code being triggered by an event ▪ Focused code + events ▪ Basic principles enable powerful use cases ▪ Triggers ▪ Bindings ▪ Build once, deploy anywhere ▪ In cloud (Consumption, Premium, App Service, Docker) ▪ On-premises (Docker, Azure Stack, IoT Hub) ▪ Built on .NET Core Azure Functions: Serverless für .NET-Entwickler Azure Functions: Functions-as-a-Service

Slide 8

Slide 8 text

▪ Incoming event triggers function ▪ Input bindings enable easy access to data from various data sources ▪ Output bindings offer easy access to outbound data sinks ▪ Custom bindings can be implemented Azure Functions & Co. Serverless-Architekturen für Java, .NET und node.js Triggers & Bindings Your code logic Runtime Azure Function HTTP Trigger Storage Input Binding Push Notification Output Binding Database Output Binding Email Output Binding Example

Slide 9

Slide 9 text

▪ In portal, Visual Studio, Visual Studio Code and CLI ▪ Local tooling & runtime available ▪ Debugging locally or remote ▪ Multiple languages supported ▪ C# & C# Script (CSX) ▪ F# ▪ JavaScript, TypeScript (node.js) ▪ Python ▪ Java ▪ PowerShell Azure Functions: Serverless für .NET-Entwickler Developing Functions

Slide 10

Slide 10 text

10 ▪ Azure Functions host instances are automatically managed ▪ Spawning new instances → cold start ▪ Reusing existing instances → warm start Azure Functions & Co. Serverless-Architekturen für Java, .NET und node.js Activation & Scaling in Consumption & Premium Plan https://blogs.msdn.microsoft.com/appserviceteam/2018/02/07/understanding-serverless-cold-start/

Slide 11

Slide 11 text

▪ Consumption Plan ▪ Pay per use (Pay per execution and per GB/s usage) with free quota ▪ Auto Scaling ▪ Azure App Service plan ▪ Fixed price / paying for idle time ▪ No cold starts / always warm / No auto scaling ▪ Premium Plan ▪ Fixed price / paying for idle time ▪ No cold starts / always prewarmed instances available / Auto Scaling Azure Functions: Serverless für .NET-Entwickler Hosting options

Slide 12

Slide 12 text

Docker ▪ Supports only Linux ▪ On-Premises hosting possible ▪ Most flexible hosting option ▪ But also most serverless-less hosting ▪ Do your own auto scaling ▪ E.g. Kubernetes with KEDA Azure Functions: Serverless für .NET-Entwickler Hosting options

Slide 13

Slide 13 text

Azure Functions: Serverless für .NET-Entwickler What can I use Azure Functions for? Business Logic Event Grid Subscription Azure Function Gateway Storage Queue Azure Function HTTP API Cosmos Db Azure Function Reverse Proxy Azure Function Integration Azure Function Event Grid Topic Storage Account

Slide 14

Slide 14 text

Demo Azure Functions: Serverless für .NET-Entwickler

Slide 15

Slide 15 text

Pros ▪ Focus on business logic implementation ▪ Cost efficient hosting ▪ Simple integration of other Azure Services. Cons ▪ Limited extensibility (Custom Bindings possible, custom trigger not really…) ▪ Limited authorization possibilities for HTTP triggered functions Azure Functions: Serverless für .NET-Entwickler Pros and Cons of Azure Functions

Slide 16

Slide 16 text

▪ Custom Handler ▪ Integrate other languages ▪ Integrate whatever speaks HTTP ▪ ASP.NET Core in consumption plan? ▪ Official support for custom bindings ▪ OpenID Connect integration with App Service Authentication (EasyAuth) ▪ Dapr Extensions Azure Functions: Serverless für .NET-Entwickler The future

Slide 17

Slide 17 text

Azure Functions: Serverless für .NET-Entwickler Boris Wilhelms [email protected] @boriswilhelms Thank you! https://github.com/thinktecture/webinar-azure-functions