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

52c76fb01bb5d1908f91b0231a44a7b5?s=128

Boris Wilhelms

July 01, 2020
Tweet

Transcript

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

  2. Boris Wilhelms ▪ Consultant and Architect at Thinktecture AG ▪

    Focus on ▪ Cloud-native & serverless architectures ▪ Mobile & web-based application architectures ▪ .NET Core ▪ Email: boris.wilhelms@thinktecture.com ▪ Twitter: @boriswilhelms Advanced Azure Functions Who am I?
  3. • 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
  4. ▪ 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
  5. Azure Functions: Serverless für .NET-Entwickler Typical Serverless attributes

  6. ▪ 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)
  7. ▪ 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
  8. ▪ 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
  9. ▪ 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
  10. 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/
  11. ▪ 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
  12. 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
  13. 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
  14. Demo Azure Functions: Serverless für .NET-Entwickler

  15. 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
  16. ▪ 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
  17. Azure Functions: Serverless für .NET-Entwickler Boris Wilhelms boris.wilhelms@thinktecture.com @boriswilhelms Thank

    you! https://github.com/thinktecture/webinar-azure-functions