13 ms·
>Theoretically, you've taken something that would take 70 hours and had it run in 250ms without having to set up any additional infrastructure. And you've spen
by hueving 10y ago
>Theoretically, you've taken something that would take 70 hours and had it run in 250ms without having to set up any additional infrastructure.
And you've spent the cost of building out that 8 server infrastructure in one batch.
- etrain 10y agoOne of the nice things about lambda is the billing is super granular - you get billed at 100ms intervals. Assuming 70 hours at $0.000000834/100ms [1] The whole job costs $2.10. [1] - https://aws.amazon.com/lambda/pricing/ https://aws.amazon.com/lambda/pricing/
- teej 10y ago70 * 60 * 60 * 10 * $0.000000834 = $2.1
- nostrademons 10y agoBy comparison (since I was curious), 70 hours on an m3.medium spot instance will run around $0.70. On an on-demand, it's about $5.39. EMR will cost you about $7.00 on top of the EC2 costs. If you can peg the CPU and don't mind getting interrupted, spot instances are still a fair bit cheaper. But Lambda looks pretty attractive for any other use-case where the statelessness of Lambda doesn't bite you.
- deleted 10y ago[deleted]
- etrain 10y agoKeep in mind that with EC2 you're billed hourly so the fastest a 70 cpu-hour job could finish on m3.medium for $0.70 is 1 hour, and that's ignoring setup time, etc. Meanwhile, on Lambda, you can actually run 1600 60s jobs (or 27 CPU-hours) in 3 minutes. This is inclusive of setup time, job submission, stragglers, etc. [1] Of course, if you've got sustained load, it's cheaper to go with spot instances, but the "occasionally I need a buttload of compute," model is well-served by Lambda. [1] http://ericjonas.com/pywren.html http://ericjonas.com/pywren.html
- IanCal 10y agoAs a note for people, if your constraints are a bit different then these are some services to check out: Joyent Manta: https://www.joyent.com/manta https://www.joyent.com/manta Hyper: http://hyper.sh http://hyper.sh Possibly Joyent Triton: https://www.joyent.com/triton https://www.joyent.com/triton I personally often want to run a bunch of things for ~1-15 minutes, and have too much data or setup to fit neatly in a lambda function. However, I don't need 1000 things running simultaneously, although manta would help still there. I'd love to see some more layers over the top of services like this, hopefully someday getting us back to picloud. I miss that service.
- marktangotango 10y agoHow secure are docker hosts like hyper.sh? I've always been skeptical, the multitenant docker security story hasn't been very encouraging, or has that changed?
- riobard 10y agohyper.sh containers are kernel-isolated like virtual machines.
- teej 10y agoThe cost to execute a 250ms Lambda on the most expensive tier 1M times is about $7.70. If your data is in S3 the cost of 1M GETs at the most expensive is $0.40. You don't pay for transfer between S3 and Lambda.
- ralusek 10y agoAs the other poster who replied to you showed, it's actually incredibly cheap. Additionally, it's perfectly elastic. That expensive hardware you provision or buy for your server that can handle this task (at a much, MUCH slower rate) would cost you significantly more. In addition to the cost of the server and running it, you also have a much harder job developing it. If we're talking about multicore, you're now managing the job concurrently on a single machine, and need the code to facilitate it. I also feel like your comment is implying that the outcomes of the lambda option vs the worker server are comparable. As mentioned, the worker machine will still run in hours, rather than less than a second.