Welcome to the WeWork 200 Portland St, Boston MA
Sponsor
Azure Functions with VS Code Credits: Some pictures from Build Azure.com
Who am I? Naval Research labs, TASC Amazon.com Microsoft AI, Image Understanding and Geometric Reasoning, Expert Systems Amazon.com Helped build Catalogs for book, music, and video Microsoft Consulting services: Azure, SOA, BizTalk, SharePoint, Workflow, Solution Architecture East Region Community lead for Federated Identity Management Mission Hill Technology SOA, Solution Architecture, SharePoint, Azure, OpenID Connect and Oauth, SaaS, IaaS
Contact Me Email Phone Twitter Linked In Jim.Lennox@acm.org Phone 617 947 1906 Twitter @jelmht Linked In https://www.linkedin.com/in/jim-lennox-15ab1442/
Why Azure Functions? How did we get here? Functional Programming Classes with interfaces, Facades REST and Stateless, Serverless Functions
Why Azure Functions? API as architecture Serverless Scalable API -> Management -> Communication -> presentation A Dream Map https://share.mindmanager.com/#publish/UU-jZ4hJsWN6l- zwP3rFMtPgNGxWXHl55MG_1fXo
Core Ideas Azure Functions Function Chaining for long running tasks Micro Chains Communication Queues Durable Functions
Service Plans Consumption Plan App Service Plan Pay based upon resources used Executions, Time, Memory App Service Plan You own the VM Think IasS Linux, boutique images
Consumption Plan Scale Controller Auto scales CPU and memory Adds additional instances of the Function Host Based on number of events that its functions are triggered on Limited to 1.5 GB for each instance Is the Function App All functions within the App share resources Scale at the same time
App Service Plan Function Apps on dedicated VMs Basic, Standard, Premium Similar to Web Apps, API Apps, and Mobile Apps Functions Host always running Supports Linux Decouples cost from execution, time, and memory Pay no more than the cost of the VM
App Service Plan Consider when: Under utilized VMs already in architecture or Expect to run continuously Need more CPU, memory, or time than available in Consumption Plan Need VNET/VPN or larger VM sizes, Linux or need a custom image
Runtime Scaling Scale Controller Heuristic scaling based upon trigger type Bi directional scaling as compute demand changes Different triggers may have different scaling limits Single Function App Only scale to a maximum of 200 instances May process more than a single message and no set limit on concurrent executions New instances only allocated at 10 second intervals
Scale Controller
Azure Function Chaining
Durable Functions
Tools you will need or like NvM NodeJS VS Code Azure Storage Explorer Postman
Mind Maps Azure CLI Choices https://share.mindmanager.com/#publish/uoIAtmWD2yju5Tsydlm1rX we3j6XxMdY9cxkO_VT Install https://share.mindmanager.com/#publish/Wz21UmLDZVZ- rqyXzw0uv-gtEoyXq1pqPFEVnTjm Create Resource Group https://share.mindmanager.com/#publish/V4AgGdu8vw7pbtZ_E2OV bihxlZxHLOGNihN2ml_S
Mind Maps Initialize VS Code https://share.mindmanager.com/#publish/YfjZzJb3bCe3xUJGPOPc- XTpxITAwYmaBjy6zNdV Modify Runtime Props https://share.mindmanager.com/#publish/qLW_lC9Xzg0hsHIQOoj6dv andhHlvC_9FItln0pv Publish Function App https://share.mindmanager.com/#publish/cJcbvN2CLD1bJ_sfTj2iZywk cmBJwmtrFlYxJ0cv
Mind Maps Create Storage Account https://share.mindmanager.com/#publish/GsZXs3uNn- GDazDnq87GO2POc0hF2RRRZ-P0w0vR Check Runtime https://share.mindmanager.com/#publish/5cM8BMeRb7ifjgmIlvd4AB ZqE2Ms6BWO9XrN4bdD Create Function App https://share.mindmanager.com/#publish/YH2Pqb3DBHNPZtrurkgPhr JM9Kj1dKbZ3PqheJFh
Mind Maps Delete Resource Group https://share.mindmanager.com/#publish/X8A7FNt_iv2WntWGnD6se VXxV2_r2HNczn9V2-Qy Shell Launcher, host.json, Git https://share.mindmanager.com/#publish/AW5L3_imiuGIvk37d7fRG4 fAmOOF9FG36YZjJx1D
Resources Azure Functions Documentation Azure Functions Resources https://docs.Microsoft.com/en-us/azure/azure-functions/ Azure Functions Resources https://github.com/Azure/Azure-Functions Stack Overflow https://stackoverflow.com/questions/tagged/azure-functions Twitter https://twitter.com/azurefunctions
Resources Getting Started Building Azure Functions in C# with VS Code https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local Building Azure Functions in C# with VS Code https://blog.todotnet.com/2017/07/building-azure-functions-in-c-with-visual- studio-code/
Consumption Plan Pricing Function Pricing https://azure.Microsoft.com/en-us/pricing/details/functions Calculator Tool https://azure.microsoft.com/en-us/pricing/calculator/?service=functions Function App monitor
The End Onto our Quest!! Let’s look at some code
Consumption Plan (Extra Slide) Stored on Azure File shares Main storage account No recovery when deleted Triggers Blob trigger can be delayed up to 10 minutes Blob Processing Event Grid Queue message with name
Consumption Plan (Extra Slide) Default time limit 5 minutes scalable to 10 minutes host.json file Billing aggregated across all functions within a Function App Executions Time Memory Scale out automatically Pay when running Even during periods of high load
App Service Plan (Extra Slide) Enable “Always On” setting Similar to Web Jobs Functions runtime goes to idle after a few minutes Only HTTP triggers will wake up your functions Only available in Service App Plan Consumption Plan automatically activates function Apps