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. Azure Functions: Serverless für .NET-Entwickler
    Boris Wilhelms
    @boriswilhelms
    Consultant

    View full-size slide

  2. 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?

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

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

    View full-size slide

  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)

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

  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/

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

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

    View full-size slide

  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

    View full-size slide

  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

    View full-size slide

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

    View full-size slide