Slide 1

Slide 1 text

Advanced Azure Functions Boris Wilhelms @boriswilhelms Consultant / Architect

Slide 2

Slide 2 text

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: [email protected] • Twitter: @boriswilhelms

Slide 3

Slide 3 text

• Hosting options • Securing HTTP functions / Easy Auth • Custom Bindings • Custom Trigger Advanced Azure Functions Topics

Slide 4

Slide 4 text

Hosting options Advanced Azure Functions

Slide 5

Slide 5 text

• Consumption Plan • Azure App Service plan • Premium Plan (currently in preview) • Docker Advanced Azure Functions Hosting options

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

Securing HTTP functions Advanced Azure Functions

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Custom Bindings Custom Trigger Advanced Azure Functions

Slide 14

Slide 14 text

• 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

Slide 15

Slide 15 text

• 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

Slide 16

Slide 16 text

Advanced Azure Functions Boris Wilhelms [email protected] @boriswilhelms Thank you! https://github.com/thinktecture/gab-ffm-2019