Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Serverless Functions Azure, AWS, GCP
Search
Mikhail Shilkov
October 30, 2019
Programming
0
180
Serverless Functions Azure, AWS, GCP
Comparison of Function-as-a-Service offerings of AWS, Azure, and GCP
Mikhail Shilkov
October 30, 2019
Tweet
Share
More Decks by Mikhail Shilkov
See All by Mikhail Shilkov
From YAML to TypeScript: Developer’s View on Cloud Automation
mikhailshilkov
0
64
Cloud Management Superpowers with Pulumi
mikhailshilkov
0
420
Cloud Superpowers with Pulumi and F#
mikhailshilkov
1
420
Cloud Management Superpowers with Pulumi and .NET
mikhailshilkov
0
93
Managing Any Cloud with .NET
mikhailshilkov
0
50
Azure Infrastructure as C# and F#
mikhailshilkov
0
200
Infrastructure as Software
mikhailshilkov
0
340
Azure Infrastructure as C# and F#
mikhailshilkov
0
250
Pulumi: Cloud Infrastructure as C# and F#
mikhailshilkov
0
610
Other Decks in Programming
See All in Programming
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
200
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
150
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.2k
Functional Event Sourcing using Sekiban
tomohisa
0
100
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
GitHub's CSS Performance
jonrohan
1030
460k
Scaling GitHub
holman
458
140k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Side Projects
sachag
452
42k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Docker and Python
trallard
40
3.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Transcript
Serverless Functions Azure, AWS, GCP Cloud Republic Event | Utrecht
| October 30, 2019
• Software developer • Cloud • Serverless • Functional programming
• Microsoft Azure MVP https://mikhail.io @MikhailShilkov Mikhail Shilkov
Function-as-a-Service Cloud Offerings
Hosting Plans Configurability Languages Programming Model Concurrency Isolation Cost Orchestrations
Cold Starts Scalability Conclusions Q&A
Hosting Plans
Azure Functions
AWS Lambda and Google Functions
Configurability
Azure Functions Consumption
AWS Lambda Memory Allocation
GCF Memory Allocation
Azure Functions Premium
Programming Languages
Language Azure Functions AWS Lambda Google Cloud Functions .NET (C#/F#)
GA GA - Node.js (JS/TS) GA GA GA JVM (Java) GA GA - Python GA (Linux only) GA GA PowerShell Preview GA - Go - GA GA Ruby - GA - Comparison Table
Programming Model
Azure Functions: Triggers and Bindings [FunctionName("MyFunc")] public static void Work(
[TimerTrigger("0 */10 * * * *")] TimerInfo timer, [Blob("filename")] Stream stream, [Queue("myqueue")] out string message) { // body }
AWS: JSON Input and Output exports.handler = async (event) =>
{ const response = { statusCode: 200, body: JSON.stringify('Hello from Lambda!'), }; return response; };
ASP.NET Core on AWS Lambda public class LambdaFunction : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
{ protected override void Init(IWebHostBuilder builder) { builder .UseContentRoot(Directory.GetCurrentDirectory()) .UseStartup() .UseApiGateway(); } }
GCP: Express-like API exports.helloWorld = (req, res) => { let
message = req.query.message || req.body.message || 'Hello World!'; res.status(200).send(message); };
Deployment Artifacts
Concurrency and Isolation
Resource Pool
Resource Pool
Resource Pool
Resource Pool
Resource Pool
Resource Pool
Resource Pool
Client Value Resource Utilization
Tradeoff
Server, VM, container, process, ...
Server, VM, container, process, ... VM VM
Server, VM, container, process, ... VM VM
Server, VM, container, process, ... VM VM
Server, VM, container, process, ... VM VM
Azure Functions 12
Legacy of App Service
Legacy of App Service
App Service: scalability
App Service: scalability
Function App Consumption Plan
Isolation Layers
Simultaneous Executions
Simultaneous Executions
Simultaneous Executions
Simultaneous Executions
AWS Lambda 22
AWS Lambda
AWS Lambda
AWS Lambda
Integrating with AWS Lambda
Simultaneous Executions in AWS Lambda
Isolation Layers
Simultaneous Executions in AWS Lambda
Simultaneous Executions in AWS Lambda
Simultaneous Executions in AWS Lambda
• • • • AWS Firecracker
Isolation Layers with Firecracker
«Naive» Function Composition
Statistical Multiplexing
Google Cloud Functions 31
Google Cloud Functions
Cost
Nominal Pricing
Nuances
Azure Simultaneous Executions
AWS Lambda: HTTP Integration
AWS Lambda: HTTP Integration
Orchestration
Azure Logic Apps
AWS Step Functions
Azure Durable Functions public static async Task Sequential(DurableOrchestrationContext context) {
var conf = await context.CallActivityAsync<ConfTicket> ("BookConference", "ServerlessDays"); var flight = await context.CallActivityAsync<FlightTickets> ("BookFlight", conf.Dates); await context.CallActivityAsync("BookHotel", flight.Dates); }
Performance and Scalability
Ideal Scalability: Throughput
Ideal Scalability: Latency
Customer Value Cloud Resource Utilization
Cold Starts
Example: Loading a map
Example: Loading a map
Example: Loading a map
Cold Start
Warm Start
Period Before a Subsequent Cold Start
Cold Starts: Language Comparison
Dependencies Add to Cold Start
Fighting Cold Starts: Azure [FunctionName("Warmer")] public static void WarmUp( [TimerTrigger("0
*/10 * * * *")] TimerInfo timer) { // No need to do anything }
AWS: Single instance warming
AWS: Multiple instance warming
ETL AT SCALE: Asynchronous data processing
Async Pipelines
Experiments with Queues
AWS Lambda Processing 100k SQS Messages
GCF Processing 100k Pub/Sub Messages
Azure Functions Processing 100k Queue Messages
CPU-intensive workload on AWS Lambda
CPU-intensive workload on Google Cloud Functions
CPU-intensive workload on Azure Functions
AWS Processing Speed per Reserved RAM
HTTP AT SCALE: Serving traffic of StackOverflow
Serving StackOverflow-like traffic
Requests/sec during the load test
0 200 400 600 800 1000 1200 Azure Functions: Response
Percentiles (ms)
0 200 400 600 800 1000 1200 Azure Functions: Response
Percentiles (ms)
0 200 400 600 800 1000 1200 Azure Functions: Instances
Google Functions: Response Percentiles (ms)
Google Functions: Response Percentiles (ms)
0 200 400 600 800 1000 1200 Google Functions: Instances
0 200 400 600 800 1000 1200 AWS Lambda: Response
Percentiles (ms)
0 200 400 600 800 1000 1200 AWS Lambda: Response
Percentiles (ms)
0 200 400 600 800 1000 1200 AWS Lambda: Instances
So, What Should You Choose?
• • • • Follow-up reading (1)
• • • Follow-up reading (2)
None