4 ms·
Pretty amazing. Looking at their numbers... 39 million requests X 2.39 seconds per request = 93.21 million seconds of compute time performed each month. That w
by PhilWright 9y ago
Pretty amazing. Looking at their numbers...
39 million requests X 2.39 seconds per request = 93.21 million seconds of compute time performed each month. That works out at 2.95 years of computation for $370.
Although he mentioned that about half the traffic comes from cached results. So maybe it is more like 1.5 years of actual new computing each month. Compare the $370 against the AWS cost of running a VM for 1.5 years to do the same workload and I think your saving a lot of money.
- pfg 9y agoIt's worth pointing out that AWS allocates CPU shares based on the memory size selected for a function. The CPU performance you'd get with a function running on 256MB would probably be significantly lower than a core of a c4.large instance. It's unlikely that you'd get cheaper raw compute from any cloud vendor when using Lambda-like products, compared to their IaaS offerings. The savings are in lower ops costs, easier auto-scaling, integration with tons of other AWS products, no minimum cost for services with a small amount of requests, etc.
- manigandham 9y agoIt's pretty explicit in the article: > In the last month, 52% (20.3MM out of 39MM) of our API requests were served from the cache, meaning less than half (18.7MM requests) required invoking our Lambda function. That $14 saves us around $240 a month in Lambda costs.
- fweespeech 9y ago> That works out at 2.95 years of computation for $370. It is 2.95 years of computation on less than 1 CPU core. http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction-function.html http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduct... > AWS Lambda allocates CPU power proportional to the memory by using the same ratio as a general purpose Amazon EC2 instance type, such as an M3 type. For example, if you allocate 256 MB memory, your Lambda function will receive twice the CPU share than if you allocated only 128 MB. https://aws.amazon.com/ec2/instance-types/ https://aws.amazon.com/ec2/instance-types/ > m3.large 2 7.5 1 x 32 > Each vCPU is a hyperthread of an Intel Xeon core except for T2 and m3.medium. 1 Core per 7.5GB RAM. Or ~1/28th of 1 core. (2.95*365.25)/28 = ~39 Core Days. That is really only impressive when you are comparing AWS prices to AWS prices which is a trap people seem to frequently fall into imo.
- vacri 9y agoThe computation costs for Lambda were $174, not the full $370.
- fweespeech 9y agoUsing AWS Lambada created that cost structure. Using an alternative to AWS would not. $150 (at most) dedicated server for instance.
- codefined 9y agoWe're all assuming content comes in constantly, but that's not the case. I imagine they spike heavily at peak times, perhaps 5-6 fold (judging by my own site statistics). Serverless might be good for them because they can handle small loads with small costs and large loads with no effort.
- fweespeech 9y ago> We're all assuming content comes in constantly, but that's not the case. I imagine they spike heavily at peak times, perhaps 5-6 fold (judging by my own site statistics). Serverless might be good for them because they can handle small loads with small costs and large loads with no effort. No. I've pushed 1000 r/s (approx) on a price tracking tool at work for keeping track of competitors on one of those boxes. Their largest spike (even if you assume its 10x their average) would be at most 15% of that.
- codefined 9y agoWow, I wonder if it's location based. Mine was heavily situated in one location, whereas yours was perhaps global? So it was always prime time for someone? Here is a graph of my usage for the past week (note lows of 30-40 and highs of 650 odd): https://puu.sh/wrAn1/5816d3f7d7.png https://puu.sh/wrAn1/5816d3f7d7.png
- 9y ago