Serverless in Action
TechBash November 14, 2019
Chad Green
Serverless in Action TechBash November 14, 2019 Who is Chad Green - - PowerPoint PPT Presentation
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
TechBash November 14, 2019
Chad Green
Director of Software Development at ScholarRx
chadgreen@chadgreen.com chadgreen.com ChadGreen ChadwickEGreen
Serverless in Action
Agenda
3
@ChadGreen
Serverless in Action
Serverless in Action @ChadGreen
The evolution of application platforms
5
Which packages should be on my server? How do I deploy new code to my servers? How can I increase server utilization? How often should I patch my servers? What size of servers should I buy? Who has physical access to my servers? It takes how long to provision a new server?
On-Premises
@ChadGreen
Serverless in Action @ChadGreen
The evolution of application platforms
6
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? Which Operating System should I use? Who monitors my application? How often should I patch my servers? How often should I backup my server? Which packages should be on my server?
IaaS
On-Premises
Serverless in Action @ChadGreen
The evolution of application platforms
7
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
IaaS On-Premises
Serverless in Action @ChadGreen
The evolution of application platforms
8
The platform for next generation applications
PaaS IaaS On-Premises
Serverless
Serverless in Action @ChadGreen
What is Serverless?
9
Abstraction of Servers Event-Driven/Instant Scale Micro-Billing
Serverless in Action @ChadGreen
Benefits of Serverless
10
Reduced DevOps Faster Time to Market Manage apps not servers
Serverless in Action @ChadGreen
Challenges of Serverless Architecture
11
Complexity Organizational Support No Runtime Optimization
Serverless in Action
Serverless in Action @ChadGreen
Serverless is more than just one thing
13
depend on services (in the cloud) to manage server-side logic and state
Backend as a Service (BaaS) Functions as a Services (FaaS)
containers that are event-triggered, ephemeral, and fully managed by a 3rd party
Serverless in Action @ChadGreen
Function Scale
14
Monolith
Microservice Microservice Microservice Microservice Function Function Function Function Function Function Function Function Function Function Function
Nano Services
Serverless in Action
FaaS is at the center of serverless
15
Single responsibility
Functions are single-purposed, reusable pieces of code that process an input and return a result
Short lived
Functions don’t stick around when finished executing, freeing up resources for further executions
Event driven & scalable
Functions respond to predefined events, and are instantly replicated as many times as needed
Stateless
Functions don’t hold any persistent state and don’t rely on the state of any other processes
Functions-as-a-Service programming model use functions to achieve true serverless compute
@ChadGreen
Serverless in Action
Serverless in Action @ChadGreen
Market Landscape
17
AWS Lambda
Serverless in Action @ChadGreen
Market Landscape
18
AWS Lambda Google Cloud Functions
Serverless in Action @ChadGreen
Market Landscape
19
AWS Lambda Google Cloud Functions IBM Cloud Functions
Serverless in Action @ChadGreen
Market Landscape
20
AWS Lambda Google Cloud Functions IBM Cloud Functions Auth0 WebTask
Serverless in Action @ChadGreen
Market Landscape
21
AWS Lambda Google Cloud Functions IBM Cloud Functions Auth0 WebTask Azure
Serverless in Action @ChadGreen
Azure Serverless Offerings
22
Event Grid
Manage all events that can trigger code or logic
Logic Apps
Design workflows and
Functions
Execute your code based
Storage Security IoT Analytics Intelligence Database
Serverless in Action
Events + data Code
Serverless in Action @ChadGreen
Features of Azure Functions
24
Batch
Serverless in Action @ChadGreen
Features of Azure Functions
25
25
Batch
Serverless in Action @ChadGreen
Features of Azure Functions
26
Serverless in Action @ChadGreen
Features of Azure Functions
27
Serverless in Action @ChadGreen
Features of Azure Functions
28
Serverless in Action @ChadGreen
Features of Azure Functions
29
Serverless in Action @ChadGreen
Features of Azure Functions
30
Serverless in Action
Triggers and Bindings
31
Type
Blob Storage Cosmos DB Event Grid Event Hubs HTTP & Webhooks Microsoft Graph OneDrive files Microsoft Graph Outlook email Microsoft Graph Auth tokens Mobile Apps Notification Hubs Queue Storage SendGrid Service Bus SignalR Table Storage Timer Twilio
1.x
Microsoft Graph Excel tables
events
IoT Hub
Serverless in Action @ChadGreen
Develop How You Want
32
else
choice
Serverless in Action @ChadGreen
Runtime Versions
33
Runtime 1.x Runtime 2.x
Runtime 3.x
Serverless in Action @ChadGreen
Runtime Version Languages
34
Language C# JavaScript F# Java Python TypeScript PHP Batch (.cmd, .bat) Bash PowerShell 1.x GA (.NET Framework 4.7) GA (Node 6) GA(.NET Framework 4.7) N/A Experimental Experimental Experimental Experimental Experimental Experimental 2.x GA (.NET Core 2.2) GA (Node 8 & 10) GA (.NET Core 2.2) Preview (Java 8) Preview (Python 3.6.x) GA (Supported through transpiling to JavaScript) N/A N/A N/A Preview (PowerShell Core 6)
Serverless in Action
Consumption Plan
35
resources.
that are scaled dynamically by the platform.
total time needed to process requests.
for memory size used and total execution time across all functions in a Function App as measured in gigabyte-seconds. Selection guidance
potentially intermittent executions.
@ChadGreen
Serverless in Action
App Service Plan
36
today
available whether code is being actively executed or not. Selection guidance
already running other code
almost continuously
@ChadGreen
Serverless in Action
Premium Plan
37
@ChadGreen
Serverless in Action
Ways to Run Functions
38
App Service Plan
Free, Basic, Standard, Premium
All the advantages of Functions with the SLA and ‘always
App Service Plan
Consumption
Serverless
Pay only for what you use! Metering is per execution and per Gb second.
App Service Environment
Network Isolation
Your own dedicated cloud environment with network isolation for apps, higher scale, and the ability to connect securely to local vNets.
Azure Stack
On Premises
Leverage cloud innovations in on- premises infrastructure. Azure Stack brings the power
data centers.
Azure Functions Runtime
Functions on your Server
Run your Azure Functions on our local server (without the rest
Azure IoT Edge
On Devices
Run on IoT Devices by deploying custom modules.
@ChadGreen
Serverless in Action
Serverless in Action @ChadGreen
Pricing – General Information
40
Serverless in Action @ChadGreen
Consumption Plan Pricing
41
Meter Price Free Grant Execution Time $0.000016 per Gb-s 400,000 GB-s Executions $0.20 per million executions 1 million executions
Pricing Example
Serverless in Action
Demo: Create an Azure Function from the Portal
Demo: Create an Azure Function from Visual Studio
Demo: Monitoring a Rapidly Scaling Function
Serverless in Action @ChadGreen
Most Powerful Sith Lord
48
Serverless in Action @ChadGreen
Most Powerful Sith Lord
49
Serverless in Action @ChadGreen
Most Powerful Sith Lord
50
Vote VoteMonitor
Serverless in Action
Serverless in Action @ChadGreen
Function Timeouts
52
Serverless in Action @ChadGreen
The absolute minimum best practices
53
Serverless in Action @ChadGreen
General Best Practices
54
Serverless in Action @ChadGreen
General Best Practices
55
Serverless in Action @ChadGreen
General Best Practices
56
Serverless in Action @ChadGreen
General Best Practices
57
Serverless in Action
Testing Your Functions
58
ILogger which will be passed into the Functions
@ChadGreen
Serverless in Action @ChadGreen
Scalability Best Practices
59
Serverless in Action @ChadGreen
Scalability Best Practices
60
Serverless in Action @ChadGreen
Scalability Best Practices
61
Serverless in Action @ChadGreen
Scalability Best Practices
62
Serverless in Action @ChadGreen
How to get started
63
chadgreen@chadgreen.com chadgreen.com ChadGreen ChadwickEGreen