AWS Lambda
$0.20 per 1M requests
$0.0000166667 for every GB-second
SLA 99.95%
Lets assume
- 2000 calls/sec
- each call is 1 sec duration
- 0.128 GB/sec/call
- db, storage iops will be the same if deployed as K8s
- 5x9s SLA (imples a three region deployment)
The equivalent K8s would be
- three clusters
- 2000 cores (more likely 10% more = 2200)
- 256GB memory
Three clusters will require 3000 cores to cater for region loss
- 3000 cores on 32 core machines => 94 machines
- round up to 99 machines to give vm level redundancy
=> 33 machines per cluster
The GB/sec calc is there My assumption was that even with k8s there'll be an API gateway, GTM etc
Comparing AWS Lamda = 147,167.87 USD to K8s with autoscaling:
DS32a_v4 at spot pricing = 66 * 0.5704 * 24 * 365 = 329782.46 USD With 2 FTEs @ 100k total is 529782.46 USD Caveat application can tolerate autoscaling delays
Summary: AWS Lambda is 3.5x cheaper than a Kubernetes solution