News for hackers. Stuff that matters.
Re:Firecracker – Lightweight Virtualization for Serverless C... by sudhirj on Tuesday November 27, 2018 @12:23AM (#18539651)
What this is allows, and I'm hoping a full fledged service will be announced on Thursday or Friday, is running containers as Lambdas. i.e. if you application starts fast enough, you can just set a container to start and run as a request comes in. It can also shut down when it's done running.

This allows things like per second billing for container runs, serverless containers (there's no container running 24/7, only when there's traffic), etc.

Re:Firecracker – Lightweight Virtualization for Serverless C... by Twirrim on Tuesday November 27, 2018 @09:52AM (#18542675)
Why run a container? What value does that abstraction provide here?

To my mind this completely negates any value proposition of the container. The only thing missing, at face value, is something as straightforward as the Dockerfile for building base images. I imagine that shouldn't be hard using things like guestfish etc in guestfstools.

Re:Firecracker – Lightweight Virtualization for Serverless C... by sudhirj on Tuesday November 27, 2018 @11:20AM (#18543621)
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.

Re:Firecracker – Lightweight Virtualization for Serverless C... by Twirrim on Tuesday November 27, 2018 @11:35AM (#18543765)
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.
Re:Firecracker – Lightweight Virtualization for Serverless C... by sudhirj on Wednesday November 28, 2018 @03:26AM (#18550032)
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 C... by lilcorey10 on Tuesday November 27, 2018 @12:46PM (#18544609)
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?
Re:Firecracker – Lightweight Virtualization for Serverless C... by sudhirj on Wednesday November 28, 2018 @03:27AM (#18550040)
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 C... by nine_k on Tuesday November 27, 2018 @10:52AM (#18543299)
Your container = your environment.

When your container is not running (say, 99% of time), other customers' containers are running. No need to ever boot the kernel, etc.

One might say that an unikernel has advantages over it. But it also has a higher barrier to entry.

Re:Firecracker – Lightweight Virtualization for Serverless C... by Twirrim on Tuesday November 27, 2018 @11:33AM (#18543752)
It's a KVM microinstance. Your image = your environment. Same as with a container.
Re:Firecracker – Lightweight Virtualization for Serverless C... by woogley on Tuesday November 27, 2018 @12:18PM (#18544253)
I'm expecting/hoping for this as well. GCP already has something like this in alpha - https://services.google.com/fb/forms/serverlesscontainers/ More info on it here in "Serverless containers" section: "https://cloud.google.com/blog/products/gcp/cloud-functions-s...
Re:Firecracker – Lightweight Virtualization for Serverless C... by nazka on Tuesday November 27, 2018 @04:26AM (#18540841)
On its website in the FAQ they say that it can't run Docker and others, yet. I hope this is coming soon too!
Re:Firecracker – Lightweight Virtualization for Serverless C... by discodave on Tuesday November 27, 2018 @12:49AM (#18539792)
> containers as Lambdas.

How similar is AWS Fargate to what you're describing?

Re:Firecracker – Lightweight Virtualization for Serverless C... by sudhirj on Tuesday November 27, 2018 @01:17AM (#18539936)
I need to run 1+ Fargate containers 24/7, which is useless and wasteful.

With Fargate-Lambda crossover I wouldn't be running anything 24/7, and it would be a lot less resource intensive than one Lambda-Container per request as well.

Google's App Engine gets / got this right when they first launched, but to make it work they had to demand apps be written for their sandbox (like AWS Lambda), because of which the model isn't as general purpose. Firecracker would allow regular containers to be used this way, making a Firecracker service the first service to allow general purpose servers to be started and stopped (all the way to zero) based on incoming traffic.

Re:Firecracker – Lightweight Virtualization for Serverless C... by sciurus on Tuesday November 27, 2018 @09:28AM (#18542498)
I think with the App Engine Standard generation 2 runtimes you don't have to write to their sandbox anymore. It still has to be one of their supported languages though, instead of any arbitrary server.

https://cloud.google.com/blog/products/gcp/introducing-app-e...

Re:Firecracker – Lightweight Virtualization for Serverless C... by thesandlord on Tuesday November 27, 2018 @12:27PM (#18544388)
Serverless Container support is coming to GCP: https://services.google.com/fb/forms/serverlesscontainers/
Re:Firecracker – Lightweight Virtualization for Serverless C... by chrisbroadfoot on Tuesday November 27, 2018 @01:17PM (#18544976)
Very easy to exec() into an arbitrary binary from these 2nd generation runtimes.

(and, as thesandlord notes below, arbitrary containers is the idea behind g.co/serverlesscontainers)

Disclaimer: I work on GCP.

Re:Firecracker – Lightweight Virtualization for Serverless C... by tybit on Tuesday November 27, 2018 @01:45AM (#18540060)
Another missing piece in addition to the billing aspect mentioned elsewhere, is all the existing event based integrations lambda provides. E.g. react to kinesis, sqs, sns etc. events. having aws manage the event plumbing in addition to start/pause/stop is really nice.
Re:Firecracker – Lightweight Virtualization for Serverless C... by xmly on Tuesday November 27, 2018 @01:07AM (#18539871)
Pricing model is not serverless. The basic serverless principle is no-use-no-pay.
Re:Firecracker – Lightweight Virtualization for Serverless C... by talawahtech on Tuesday November 27, 2018 @01:13AM (#18539915)
Theoretically, if container start up times are around 125ms it should be possible to achieve this with Fargate + Knative's "scale to zero" functionality[1]. AWS is already working on improving Fargate/Kubernetes integration.

[1] https://cloud.google.com/knative/

Re:Firecracker – Lightweight Virtualization for Serverless C... by coder543 on Tuesday November 27, 2018 @01:49AM (#18540080)
Doesn't a Kubernetes master on Fargate cost a significantly non-zero amount of money? Pretty sure it does.
Re:Firecracker – Lightweight Virtualization for Serverless C... by talawahdotnet on Tuesday November 27, 2018 @01:57AM (#18540127)
Sure, but if you already have one then there is no incremental cost.

It would be great if they announced that they were gonna remove EKS master costs altogether. Technically Firecracker should make it possible for them to run that infrastructure more efficiently :)

Re:Firecracker – Lightweight Virtualization for Serverless C... by sitkack on Tuesday November 27, 2018 @12:08PM (#18544140)
Only dev instances should see zero traffic, any production site will have > 0 load at all times.
Re:Firecracker – Lightweight Virtualization for Serverless C... by coder543 on Tuesday November 27, 2018 @03:29PM (#18546370)
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 inactive for most of the day/week.

Scale to zero can be convenient, but it's not usually a make-or-break thing.

Re:Firecracker – Lightweight Virtualization for Serverless C... by sitkack on Wednesday November 28, 2018 @11:29PM (#18558113)
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 C... by coder543 on Wednesday November 28, 2018 @11:41PM (#18558152)
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 C... by sitkack on Thursday November 29, 2018 @12:21AM (#18558286)
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 C... by coder543 on Thursday November 29, 2018 @12:35AM (#18558330)
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 C... by sitkack on Thursday November 29, 2018 @01:01AM (#18558408)
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 C... by coder543 on Thursday November 29, 2018 @01:06AM (#18558420)
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 C... by xmly on Tuesday November 27, 2018 @01:55AM (#18540111)
Yep, if with KNative, it is possible.