Chad Green Serverless in Action TechBash November 14, 2019
Who is Chad Green � Director of Software Development at ScholarRx � chadgreen@chadgreen.com chadgreen.com � ChadGreen � ChadwickEGreen
Agenda • What is Serverless Computing • Functions as a Service • Serverless Options • Azure Functions Overview • Azure Functions in Action • Pricing • Best Practices Serverless in Action @ChadGreen 3
What is Serverless Computing Serverless in Action
The evolution of application platforms How do I deploy new code to my servers ? How can I increase server utilization? Which packages should be on my server? What size of servers should I buy? Who has physical access to my servers ? How often should I patch my servers ? It takes how long to provision a new server ? On-Premises Serverless in Action @ChadGreen @ChadGreen 5
The evolution of application platforms What is the right size of servers for my business needs? How can I increase server utilization? How many servers do I need? How can I scale my application? How do I deploy new code to my server ? How often should I patch my servers ? Which Operating System should I use? How often should I backup my server ? Who monitors my application? Which packages should be on my server ? IaaS On-Premises Serverless in Action @ChadGreen 6
The evolution of application platforms What is the right size of servers for my business needs? How can I increase server utilization? How many servers do I need? How can I scale my application? PaaS On-Premises IaaS Serverless in Action @ChadGreen 7
The evolution of application platforms The platform for next generation applications Serverless On-Premises IaaS PaaS Serverless in Action @ChadGreen 8
What is Serverless? Abstraction of Servers Event-Driven/Instant Scale Micro-Billing Serverless in Action @ChadGreen 9
Benefits of Serverless Manage apps not servers Reduced DevOps Faster Time to Market Serverless in Action @ChadGreen 10
Challenges of Serverless Architecture Organizational No Runtime Complexity Support Optimization Serverless in Action @ChadGreen 11
Function as a Service Serverless in Action
Serverless is more than just one thing Backend as a Service (BaaS) Functions as a Services (FaaS) • Applications that significantly or fully • Application run in stateless compute depend on services (in the cloud) to containers that are event-triggered, manage server-side logic and state ephemeral, and fully managed by a 3 rd party Serverless in Action @ChadGreen 13
Function Scale Function Microservice Function Function Function Microservice Function Nano Services Monolith Function Function Microservice Function Function Microservice Function Function Serverless in Action @ChadGreen 14
FaaS is at the center of serverless Single responsibility Short lived Stateless Event driven & scalable Functions don’t stick around when Functions are single-purposed, reusable Functions don’t hold any persistent state Functions respond to predefined events, pieces of code that process an input and finished executing, freeing up resources and don’t rely on the state of any other and are instantly replicated as many return a result for further executions processes times as needed Functions-as-a-Service programming model use functions to achieve true serverless compute Serverless in Action @ChadGreen 15
Serverless Options Serverless in Action
Market Landscape AWS Lambda Run code without thinking about servers. Pay only for the compute time you consume. Serverless in Action @ChadGreen 17
Market Landscape AWS Google Lambda Cloud Functions Event-driven serverless compute platform Serverless in Action @ChadGreen 18
Market Landscape AWS Google IBM Lambda Cloud Functions Cloud Functions Execute code on demand in a highly scalable serverless environment Serverless in Action @ChadGreen 19
Market Landscape AWS Google IBM Auth0 Lambda Cloud Functions Cloud Functions WebTask All you need is code Serverless in Action @ChadGreen 20
Market Landscape AWS Azure Google IBM Auth0 Lambda Cloud Functions Cloud Functions WebTask Your vision. Your cloud. Serverless in Action @ChadGreen 21
Azure Serverless Offerings Event Grid Logic Apps Functions Manage all events that Design workflows and Execute your code based can trigger code or logic orchestrate processes on events you specify Storage Database Security IoT Analytics Intelligence Serverless in Action @ChadGreen 22
Code Events + data Azure Functions Serverless in Action
Features of Azure Functions • Choice of language Batch Serverless in Action @ChadGreen 24
Features of Azure Functions • Choice of language • Pay-per-use pricing model Batch Serverless in Action @ChadGreen 25 25
Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies Serverless in Action @ChadGreen 26
Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies • Integrated security Serverless in Action @ChadGreen 27
Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies • Integrated security • Simplified integration Serverless in Action @ChadGreen 28
Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies • Integrated security • Simplified integration • Flexible development Serverless in Action @ChadGreen 29
Features of Azure Functions • Choice of language • Pay-per-use pricing model • Bring your own dependencies • Integrated security • Simplified integration • Flexible development • Open-source Serverless in Action @ChadGreen 30
Triggers and Bindings 2.x Trigger Input Output Type 1.x � � � � � Blob Storage � � � � � Cosmos DB � � � Event Grid � � � � Event Hubs � � � � HTTP & Webhooks � � � � IoT Hub � � � Microsoft Graph Excel tables � � � Microsoft Graph OneDrive files � � Microsoft Graph Outlook email � � � � Microsoft Graph events � � Microsoft Graph Auth tokens � � � � Mobile Apps � � � Notification Hubs � � � � Queue Storage � � � SendGrid � � � � Service Bus � � � SignalR � � � � Table Storage � � � Timer � � � � Twilio 31 Serverless in Action @ChadGreen
Develop How You Want • Azure Portal • Quickly get started without having to install anything else • Visual Studio 2017 • First class C# development experience • Visual Studio Code • First class Node.js development experience • Edit any function project generated via CLI • Azure Functions Core Tools (CLI) • Build any kind of function and edit in IDE of your choice Serverless in Action @ChadGreen 32
Runtime Versions Runtime 1.x Runtime 2.x • .NET Framework 4.6 • .NET Core 2.0 • Cross Platform • Language Extensions • Java • Binding Extensions • Microsoft Graph • Durable Functions Runtime 3.x • .NET Core 3.0 Serverless in Action @ChadGreen 33
Runtime Version Languages 2.x 1.x Language GA (.NET Core 2.2) C# GA (.NET Framework 4.7) GA (Node 8 & 10) JavaScript GA (Node 6) GA (.NET Core 2.2) GA(.NET Framework 4.7) F# Preview (Java 8) Java N/A Python Preview (Python 3.6.x) Experimental TypeScript Experimental GA (Supported through transpiling to JavaScript) PHP N/A Experimental Batch (.cmd, .bat) N/A Experimental Bash N/A Experimental Preview (PowerShell Core 6) Experimental PowerShell Serverless in Action @ChadGreen 34
Consumption Plan • Pay for what you use without the need to reserve compute resources. • Function Apps are assigned to compute processing instances that are scaled dynamically by the platform. • Functions can have multiple parallel executions minimizing the total time needed to process requests. • Cost is driven by the number of executions and by accounting for memory size used and total execution time across all functions in a Function App as measured in gigabyte-seconds. Selection guidance • Good option if your functions run at elastic scale with potentially intermittent executions. Serverless in Action @ChadGreen 35
App Service Plan • Function Apps run on dedicated VMs, just like Web Apps work today • Dedicated VMs are allocated to your apps and they are always available whether code is being actively executed or not. Selection guidance • Good option if you have existing, under-utilized VMs that are already running other code • Good option if you expect to run functions continuously or almost continuously Serverless in Action @ChadGreen 36
Premium Plan Serverless in Action @ChadGreen 37
Recommend
More recommend