Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Azure Functions - Serverless für .NET Entwickler

Azure Functions - Serverless für .NET Entwickler

Boris Wilhelms

July 01, 2020
Tweet

More Decks by Boris Wilhelms

Other Decks in Programming

Transcript

  1. 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?
  2. • 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
  3. ▪ 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
  4. ▪ 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)
  5. ▪ 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
  6. ▪ 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
  7. ▪ 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
  8. 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/
  9. ▪ 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
  10. 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
  11. 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
  12. 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
  13. ▪ 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