kubeless icon indicating copy to clipboard operation
kubeless copied to clipboard

How kubeless can be better than AWS Lamda or GCP functions ?

Open crizstian opened this issue 6 years ago • 10 comments

With AWS lamda functions i pay 20usd for 3 million request of 250mb and i have dozens of functions there, i've been testing kubeless and i think is extraordinary but for each function, kubeless creates 3 objects at least in k8s cluster:

  • pod
  • service
  • configmap

and this will consume my k8s nodes memory even though the functions are requested or not, and google will charge me for that resources.

So, how can kubeless benefits me more than AWS Lamda or GCP functions in terms of investment(money), i have no doubt that kubeless is an extraordinary framework.

I am asking this because i consider it very useful, but i need to convince my manager to switch from AWS to a full k8s technology , but my manager doesn't see the benefit from the investment(money) side

crizstian avatar Dec 29 '17 21:12 crizstian

Hi, sorry for the delay, we got busy with new year's :)

That's a great question.

kubeless is meant as an open source clone of GCP functions or AWS lambda. You can install it and use it anywhere, including on prem. So the main benefit is cloud portability, you are not tied to a single vendor.

The second biggest advantage is that if you are using k8s already and running different workloads then you are extending your k8s usage and now able to run functions just like lambda. If you are using a bunch of AWS services and don't have the need for a different type of workloads then Lambda is most likely you best choice.

In terms of resource consumptions: on GCP if you get a k8s cluster using GKE, you will be charged for the GCE VMs used by your cluster, not charged per resource usage. GKE does not charge per objects created in the k8s API server, so running 10 or 100 functions will not cost you more. You will only pay for the VMs needed underneath.

Lambda folks will tell you that their lambdas are only provisioned when you use them, but these days users are actually keeping their functions warm by faking load. Hence they actually get charged when they don't use the functions. So things are still maturing on that front.

sebgoa avatar Jan 04 '18 19:01 sebgoa

@Crizstian if you rent dedicated servers at aws, you can't win. but outside of aws for example, you pay a fraction for the same compute.

For example: compare these geekbench scores:

ec2 c5.2xlarge - USD 159/month using reserved pricing.

https://browser.geekbench.com/v4/cpu/4844151

vs e3-1270v6 - EUR 39/month for a dedicated machine (for example at worldstream)

https://browser.geekbench.com/v4/cpu/4540210

Same with S3. Just check.

alexanderkjeldaas avatar Jan 07 '18 00:01 alexanderkjeldaas

Apart from the price and performance: Some companies like to be in full control of their data and prefer to run their own datacenter(s). Just my 2ct

byteSamurai avatar Jan 19 '18 16:01 byteSamurai

@sebgoa

Lambda folks will tell you that their lambdas are only provisioned when you use them, but these days users are actually keeping their functions warm by faking load.

What is typically the reason for doing this "keeping warm"? Is there something we can learn or avoid?

deissnerk avatar Jan 29 '18 14:01 deissnerk

@deissnerk here is a read https://read.acloud.guru/how-to-keep-your-lambda-functions-warm-9d7e1aa6e2f0

sebgoa avatar Jan 29 '18 14:01 sebgoa

There are good reasons for at least doing end-to-end testing continuously, so some provisioning should be up at all times. Otherwise you can't know that your system works.

alexanderkjeldaas avatar Jan 29 '18 14:01 alexanderkjeldaas

I am also evaluating wether running Kubeless on GKE could outperform AWS Lambda (or Google Cloud Functions when it's out of beta). For small workloads running your functions on either of the cloud providers is unbeatable. As there is almost zero cost and no setup/maintenance required. The story changes however when your application requires more resources.

When reacting to http events, for example, AWS charges $3.50 per 1m requests just for the API Gateway. Taking this into account I am sure that there must be some kind of break even where Kubeless can outperform AWS in terms of costs.

Long story short, I think it would really help others like me (especially when migrating existing workloads) to have some sort of pricing overview for running certain workloads on different environments e.g. GKE, bare metal etc.

maxfrigge avatar Apr 24 '18 08:04 maxfrigge

Came across this while evaluating the options of running Kubeless vs paying for others. Does anyone know how AWS, Google achieve such low cost utilizing the almost same / similar technology? or Are they running them at loss?

KrishnaPG avatar Sep 22 '18 15:09 KrishnaPG

fwiw, AWS actually uses a very different tech, they do a lot of pre-provisioning, plus it is not open source. Google GCF most likely runs on Borg but internals are unknown, it is probably a variant of google app engine. So these two cloud solutions do not use similar technology.

sebgoa avatar Sep 23 '18 08:09 sebgoa

What is about cold start. For example. If I create a function in kubeless, then it will be created a new pod, where my function running, this pod running permanently until my function will be deleted. So, when I call my function, for example throught http, it's send the response immediatly, correct? I mean it don't need to start something, set environment, etc... I'v read this article about aws lambda cold start

de1m avatar Feb 21 '20 11:02 de1m