|
|
|
|
|
by ralph87
2057 days ago
|
|
Running a site the size of the BBC on Lambda is nothing short of an exuberant waste of a government-subsidized budget, it's absolutely crazy. Lambda VM time has a massive markup compared to regular compute. It only makes sense where usage does not exceed some threshold the BBC absolutely certainly do. There are plenty of alternative options, even on AWS, that don't suffer from such huge markup without requiring any additional ops input. The thing that runs in Lambda is practically a container image already. Does it really cost tangible budget to have CI build a full image rather than a ZIP file that already contains a few million lines of third party JS/Python deps? IMHO this is the epitome of serverless gone wrong. |
|
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)
requests per year = 2000 * 3600 * 24 * 365 = 63072000000 request costs = 0.2 * 63072000000 / 1000000 = 12,614 USD
GB/sec per year = 0.128 * 2000 * 3600 * 24 * 365 = 8073216000 GB/sec costs = 8073216000 * 0.0000166667 = 134,553.87
Total cost = 12614 + 134553.87 = 147,167.87 USD
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
Azure D32a_v4 (32 core, 128 GiB, 800 GiB storage) = $1.84/hour PAYG; $0.5704/hour Spot
DS32a_v4 at spot pricing = 99 * 0.5704 * 24 * 365 = 494673.696 USD
Plus FTE support (e.g. n FTEs @ 100k USD)
With 2 FTEs total is 694,673 USD
Summary: AWS Lambda is 4.7x cheaper than a Kubernetes solution