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

Advanced Azure Functions @ Global Azure Bootcamp 2019 - Frankfurt

Advanced Azure Functions @ Global Azure Bootcamp 2019 - Frankfurt

52c76fb01bb5d1908f91b0231a44a7b5?s=128

Boris Wilhelms

April 27, 2019
Tweet

Transcript

  1. Advanced Azure Functions Boris Wilhelms @boriswilhelms Consultant / Architect

  2. Boris Wilhelms Who am I? Advanced Azure Functions • Consultant

    and Architect at Thinktecture AG • Focus on • Cloud-native & serverless architectures • Security & Identity • .NET Core • Email: boris.wilhelms@thinktecture.com • Twitter: @boriswilhelms
  3. • Hosting options • Securing HTTP functions / Easy Auth

    • Custom Bindings • Custom Trigger Advanced Azure Functions Topics
  4. Hosting options Advanced Azure Functions

  5. • Consumption Plan • Azure App Service plan • Premium

    Plan (currently in preview) • Docker Advanced Azure Functions Hosting options
  6. Consumption plan • Pay per use • Free quota •

    Auto Scaling • Limitations • Maximum function execution duration limited to 10 min (5 min by default) • Function App may scale down to 0 instances and need a cold start • Limited to 1,5 GB RAM and 1 CPU Core per Function App Advanced Azure Functions Hosting options
  7. Azure App Service plan • No function execution duration limited

    (configurable, defaults to 30 min) • No cold starts / always warm • App Service plan limits the RAM and CPU Core • Fixed price / paying for idle time • Manual scaling Advanced Azure Functions Hosting options
  8. Premium Plan (currently in preview) • No function execution duration

    limited (configurable, defaults to 30 min) • No cold starts / always prewarmed instances available • VNet integration • Three sizes with different limits for RAM and CPU Core • Rapid Scaling • Minimum fixed pay + pay per use Advanced Azure Functions Hosting options
  9. Docker • Supports only Linux • Works only with Functions

    V2 • No limits • On Premise hosting possible • Most flexible hosting option • But also most serverless-less hosting • Dockerfile can be created with Azure Function Core Tools Advanced Azure Functions Hosting options
  10. Securing HTTP functions Advanced Azure Functions

  11. Function Keys • Must be passed to function by •

    Query string (code) • or HTTP Header (x-functions-key) • Can be generated on function level • within the Azure Portal • Or the Key Management API (HTTP) • Master key to access all functions • Static keys without information about the caller • Not meant for humans, but machine to machine interaction Advanced Azure Functions Securing HTTP functions
  12. Easy Auth • Configurable in the portal • Uses federated

    identity • Azure Active Directory, Microsoft Login, Facebook, Google or Twitter • Token must be passed to function by HTTP Authorization Header (Bearer) • Machine to Machine interaction • Human interaction • Contains information about the caller. Advanced Azure Functions Securing HTTP functions
  13. Custom Bindings Custom Trigger Advanced Azure Functions

  14. • Custom Input and Output bindings can be created •

    Available with Functions V2 • Must be implemented in C# / .NET • Can be used in other languages • Consists of three parts • Attribute • One or more converters • Configuration Advanced Azure Functions Custom Bindings
  15. • Gray Area: Not supported, but possible • May not

    work in consumption plan • May not scale in consumption plan • May not work in any Azure Function plan • They work in Docker! Advanced Azure Functions Custom Trigger
  16. Advanced Azure Functions Boris Wilhelms boris.wilhelms@thinktecture.com @boriswilhelms Thank you! https://github.com/thinktecture/gab-ffm-2019