Live data from Hacker News

Firecracker – Lightweight Virtualization for Serverless Computing

aws.amazon.com

101–110 of 114 posts

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#102
post #77
post #73

Earlier quoted context omitted.

Want to run Ruby on Rails on Lambda, with no changes from the servers I run on my laptop. Or maybe I want to run Crystal. Or maybe I’m writing my own language. Doesn’t really matter. Lambda works great as a deployment and execution model. This allows anything to run on Lambda, not just specially prepared runtimes.

It's a VM, right? So whatever you put in the base image will be available, just like with a container. It's just fast to provision and small.

In this case the base image is then a packaging format, which takes us back to building special AMIs for this. Used to do EC2 deployments like this in the early days, using Packer.io.

Prefer containers because build once run anywhere, as opposed to build for each deployment target.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#103
post #73

Earlier quoted context omitted.

Want to run Ruby on Rails on Lambda, with no changes from the servers I run on my laptop. Or maybe I want to run Crystal. Or maybe I’m writing my own language. Doesn’t really matter. Lambda works great as a deployment and execution model. This allows anything to run on Lambda, not just specially prepared runtimes.

So essentially pairing Firecracker with Lambda will reduce Lambda down to a simple trigger that can spin up one of these VMs where before Lambda ran the code?

Yes, and the fact that each Lambda executor is a VM allows the execution of any code in any language using any server.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#104
post #81

Earlier quoted context omitted.

Only dev instances should see zero traffic, any production site will have > 0 load at all times.

That's not completely accurate. - If we're talking about a business that provides a service to local companies, there are quite a few hours during the week where everyone is either asleep or enjoying their weekend. Not every company has millions of users spread across every time zone; some companies provide a niche service to a small number of high paying users. - Lots of developers have small hobby projects that are…

Those folks would be ideally suited for Digital Ocean, Vultr, etc. All of the function as a service providers have a cost model that only make sense for < (some really low qps). A $10 DO instance can handle how many $$ worth of FuncaaS?

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#105

Earlier quoted context omitted.

That's not completely accurate. - If we're talking about a business that provides a service to local companies, there are quite a few hours during the week where everyone is either asleep or enjoying their weekend. Not every company has millions of users spread across every time zone; some companies provide a niche service to a small number of high paying users. - Lots of developers have small hobby projects that are…

Those folks would be ideally suited for Digital Ocean, Vultr, etc. All of the function as a service providers have a cost model that only make sense for < (some really low qps). A $10 DO instance can handle how many $$ worth of FuncaaS?

I mean, the first 1 million Lambda invocations and 400,000 GB-seconds of compute are free each month... you can do a lot of things within the free tier alone. That free allocation represents about $7 worth of Lambda resources. Assuming that it cost the same to write your application to run in Lambda as it would to write it as standalone, which it almost certainly doesn't due to (probably) immature frameworks, that would be really nice for certain businesses. I agree that it is a niche, and savings of a few dollars a month aren't generally valuable to viable businesses.

What I was getting at is that the "scale to zero" feature with Knative is rather worthless if you spend more money just running the Kubernetes master on EKS alone than you would spend running a $5 or $10 per month DigitalOcean instance.

Lambda scales all the way to zero, and it's free when it's at zero. You just pay for what you use. Actually, you pay for what you use minus $7, since every account always gets the free tier for Lambda.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#106

Earlier quoted context omitted.

Those folks would be ideally suited for Digital Ocean, Vultr, etc. All of the function as a service providers have a cost model that only make sense for < (some really low qps). A $10 DO instance can handle how many $$ worth of FuncaaS?

I mean, the first 1 million Lambda invocations and 400,000 GB-seconds of compute are free each month... you can do a lot of things within the free tier alone. That free allocation represents about $7 worth of Lambda resources. Assuming that it cost the same to write your application to run in Lambda as it would to write it as standalone, which it almost certainly doesn't due to (probably) immature frameworks, that wo…

I was using the DO instance as a standard unit, so on DO $10 gives you (1vCPU 2GB)

    5M GB seconds (2 * 86e3 * 28)
    2400M function invocations @1k qps, (86e3 * 1e3 * 28 / 1e6)

with that, the DO query load represents $17k

Does the math checkout?

I know which model allows me to "scale to zero" faster. If I hand you $10, you will give me a nice used Honda?

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#107

Earlier quoted context omitted.

I mean, the first 1 million Lambda invocations and 400,000 GB-seconds of compute are free each month... you can do a lot of things within the free tier alone. That free allocation represents about $7 worth of Lambda resources. Assuming that it cost the same to write your application to run in Lambda as it would to write it as standalone, which it almost certainly doesn't due to (probably) immature frameworks, that wo…

I was using the DO instance as a standard unit, so on DO $10 gives you (1vCPU 2GB) 5M GB seconds (2 * 86e3 * 28) 2400M function invocations @1k qps, (86e3 * 1e3 * 28 / 1e6) with that, the DO query load represents $17k Does the math checkout? I know which model allows me to "scale to zero" faster. If I hand you $10, you will give me a nice used Honda?

The math does not check out.

Using your numbers and current Lambda prices:

5M GB-seconds * $0.00001667/GB-sec = $83.35

(5,000,000 * 0.00001667 = 83.35)

2400M function invocations * $0.2/million = $480

(2400 * 0.2 = 480)

total = $480 + $83.35 = $563.35/month, which is nowhere close to $17k/mo. I have no idea how you got that number.

I also find it highly unlikely that most businesses are servicing 2.4B requests per month on their API. In my opinion, you either have to be an absolutely enormous monster of a business or have a really unusual business model to be at that level of utilization and not be huge.

Whatever your business, you're unlikely to be spending $10/mo in resources to service nearly 30 billion requests per year. You're probably going to need more than $10/mo just to store the access logs for your API, let alone useful customer data!

In reality, a lot of entire businesses would be much lower in utilization than that. The downsides of a single DigitalOcean droplet are many: a single point of failure, and you'll never achieve high availability if you apply updates regularly and reboot, unless you have multiple $10/mo droplets and a load balancer. You'll also have high latency to customers outside of your region of the world, unless you run a HA-cluster of multiple droplets in each regional datacenter that you care about. Call it three droplets per region and we'll say you want to run them in five regions, so that's $150/mo just in droplets alone, plus a $10/mo load balancer per region, so $200/mo. Did I mention that you or your engineers are going to be responsible for doing the maintenance and replication across regions? Surely the number of engineering hours devoted to this upkeep will be worth more than $350/mo. Huh, I guess we just justified Lambda's costs.

And again, I never claimed this was some kind of snake oil magical solution.

I don't know why you think I'm opposed to the DigitalOcean solution and some sort of salesman for Lambda. I use DigitalOcean heavily for my personal stuff, and I almost never use Lambda, even though I like the idea. You've created a strawman, and you're trying to expertly knock it down... except for the whole math thing as noted above.

If we really dig into this, neither the DigitalOcean solution nor the Lambda solution discussed accounts for the cost of running your stateful infrastructure, whether it's a traditional RDBMS, some NoSQL system, Kafka, or just a giant object store like S3.

My singular point in this entire thread was that scale-to-zero is worthless if the solution that enables scale-to-zero costs more than not scaling to zero. If DigitalOcean is the solution that costs less than scaling to zero, then obviously that is more valuable than the solution that scales to zero.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#108

Earlier quoted context omitted.

I was using the DO instance as a standard unit, so on DO $10 gives you (1vCPU 2GB) 5M GB seconds (2 * 86e3 * 28) 2400M function invocations @1k qps, (86e3 * 1e3 * 28 / 1e6) with that, the DO query load represents $17k Does the math checkout? I know which model allows me to "scale to zero" faster. If I hand you $10, you will give me a nice used Honda?

The math does not check out. Using your numbers and current Lambda prices: 5M GB-seconds * $0.00001667/GB-sec = $83.35 (5,000,000 * 0.00001667 = 83.35) 2400M function invocations * $0.2/million = $480 (2400 * 0.2 = 480) total = $480 + $83.35 = $563.35/month , which is nowhere close to $17k/mo. I have no idea how you got that number. I also find it highly unlikely that most businesses are servicing 2.4B requests per m…

I used that $7 amount for 1M invocations. I trust your math, you're passionate and it sounds like you have first hand knowledge.

The economics are laid before us like a golden fleece.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#109

Earlier quoted context omitted.

The math does not check out. Using your numbers and current Lambda prices: 5M GB-seconds * $0.00001667/GB-sec = $83.35 (5,000,000 * 0.00001667 = 83.35) 2400M function invocations * $0.2/million = $480 (2400 * 0.2 = 480) total = $480 + $83.35 = $563.35/month , which is nowhere close to $17k/mo. I have no idea how you got that number. I also find it highly unlikely that most businesses are servicing 2.4B requests per m…

I used that $7 amount for 1M invocations. I trust your math, you're passionate and it sounds like you have first hand knowledge. The economics are laid before us like a golden fleece.

I edited my comment a few times after I posted it. I hope that you are responding to the most recent version, but your response leaves some doubt in my mind that this is the case. I am certainly passionate about recognizing that there are no perfect tech solutions, including DigitalOcean and Lambda.

Re: Firecracker – Lightweight Virtualization for Serverless Computing

#110
post #64

This looks great, I’m just wondering what Amazon’s motivation for open sourcing it is. It seems like some pretty critical secret sauce for making services like Lambda and Fargate both secure and efficient.

Google recently open-sourced Gvisor, which although implemented differently solves a similar problem. Possibly Amazon wants to encourage other vendors to build integrations with Firecracker rather than Gvisor. https://cloud.google.com/blog/products/gcp/open-sourcing-gvi...

Also cloudflare announced workers using isolates.
Post reply on HN