Re:Serverless computing on DC/OS with Galactic Fog
by jadbox on Friday July 22, 2016 @10:26AM
(#12143686)
Isn't the cost significantly higher? Even with bulk pricing, lambda was more than 8x more expensive than ec2 for constant computing.
[ Parent
| on HN ]
Re:Serverless computing on DC/OS with Galactic Fog
by imglorp on Friday July 22, 2016 @10:44AM
(#12143811)
It depends on your traffic.
If you have a million 1ms transactions per second, you'll spend $500k/month, or $6m/year.
https://s3.amazonaws.com/lambda-tools/pricing-calculator.htm...
Re:Serverless computing on DC/OS with Galactic Fog
by mej10 on Friday July 22, 2016 @12:29PM
(#12144580)
That pricing calculator isn't correct.
From the AWS Lambda pricing page:
Duration is calculated from the time your code begins
executing until it returns or otherwise terminates,
rounded up to the nearest 100ms
So it would really be closed to $1 million per month.
Re:Serverless computing on DC/OS with Galactic Fog
by random3 on Friday July 22, 2016 @10:39AM
(#12143782)
That's only if you compare raw compute. When you create a VM on AWS it will get <10% utilization (many times close to 1%). Sometimes you need to factor in for varying utilization so you need to overprovision but if you have many services and the deployment unit is the VM then you end up having tons of VMs doing nothing.
With containers the deployment model becomes more granular, hence you can share the VM and increase utilization, but you'll still pay for idle time.
With hosted functions (like lambda) you don't pay idle time, so in many cases it's much more efficient.
Indeed, if you host your own "lambda" implementation, you may or may not have cost improvements. In this case it may be just a matter of operational efficiency.
Re:Serverless computing on DC/OS with Galactic Fog
by philliphaydon on Friday July 22, 2016 @10:39AM
(#12143776)
It's highly dependent on your usage. If you want a crib job to run that isn't on your production server and it's to run every few hours. Great to schedule that on AWS lambda. EC2 would be more expensive.
Trying to process 1000s of requests on AWS lambda could end up hitting the limits of lambda and cost you more.
I use lambda to process exif data in images as they are uploaded to S3. Which is awesome because it doesn't require services running on the web server and costs me nothing because it comes into the free tier of AWS lambda.
Re:Serverless computing on DC/OS with Galactic Fog
by philliphaydon on Friday July 22, 2016 @10:43AM
(#12143803)
Oh and AWS database access sucks balls. Because you cannot pool connections you must open/close db connections. If you fail to close you will exhaust the database connections quickly and kill your app until the connections expire.
Re:Serverless computing on DC/OS with Galactic Fog
by mjb on Friday July 22, 2016 @01:08PM
(#12144903)
Phillip - have you tried making your database connection in 'static' code? With container re-use (see https://aws.amazon.com/blogs/compute/container-reuse-in-lamb...), you should see multiple invokes going to the same container, and you can use the same connection for all of them. That will only happen if your traffic is high enough.