Live data from Hacker News

Behind the scenes, AWS Lambda

bschaatsbergen.com

51–60 of 89 posts

Re: Behind the scenes, AWS Lambda

#51
post #21

Really cool post! From the architecture, it's not really clear to me why Lambdas have the 15 min limitation. It seems to me AWS could use the same infrastructure to make a product that competes with Google Cloud Run. Maybe it's a businesses thing?

I can't think of any reason outside of product positioning. A lot of the novelty of Lambda is its identity as a function: small units of execution run on-demand. A Lambda that can run perpetually is made redundant by EC2, and the opinionated time limit informs a lot of design.

It may be product positioning, but Lambda really stems from AWS desire to do something about the dismal utilisation ratio of their most expensive bill item: Servers [0].

I speculate, 1min or 15mins workloads are optimum to schedule and run uncorrelated workloads. Any more, and it may diminish returns?

[0] https://youtu.be/dInADzgCI-s?t=524 (James Hamilton, 2013)

Re: Behind the scenes, AWS Lambda

#52

Earlier quoted context omitted.

This is a good paper that talks about Aurora and provides some insight into how RDS operates: https://www.allthingsdistributed.com/files/p1041-verbitski.p... It’s nice that AWS builds their own higher level abstractions on the same primitives outside developers use. Feels like they eat their own dogfood much more than Google where they bypass GCP and instead utilize underlying Borg primitives for many services.

Which gcp services run directly on borg? My understanding is at least bigtable, cloud sql and other dbs are within “hidden” VMs. I think loadbalancers and storage are exceptions but same is true for aws (except the classic elb probably)

Bigtable, Firestore and Spanner run directly on Borg.

Cloud SQL V2 runs in hidden VMs.

Re: Behind the scenes, AWS Lambda

#53
post #34
post #16

Earlier quoted context omitted.

From what I know there is a secret sauce beyond a mere AMI and a control plane, based on some EBS volumes magic. I may be mixing things up with Aurora though.

There were some comments in the early days that the Multi-AZ magic for classic RDS was just drbd on top of EBS. Aurora is a completely different approach where the RDBMS code is modified to directly interface with EBS instead of going through a traditional OS filesystem layer.

Amazon published a paper describing how Aurora works:

https://www.allthingsdistributed.com/files/p1041-verbitski.p...

Re: Behind the scenes, AWS Lambda

#54
post #21

Really cool post! From the architecture, it's not really clear to me why Lambdas have the 15 min limitation. It seems to me AWS could use the same infrastructure to make a product that competes with Google Cloud Run. Maybe it's a businesses thing?

I can't think of any reason outside of product positioning. A lot of the novelty of Lambda is its identity as a function: small units of execution run on-demand. A Lambda that can run perpetually is made redundant by EC2, and the opinionated time limit informs a lot of design.

> A Lambda that can run perpetually is made redundant by EC2

Is only conceptually true outside of "EC2 Classic", because (to the best of my knowledge) every other EC2 launches into a VPC, even if it's the default one for the account per region, and even then into the default security group (and one must specify the IDs). That may sound like "yeah, yeah" but is a level of moving parts that Lambda doesn't require a consumer to dive into unless they want to control its networking settings

I would think removing the time limit on Lambda would be like printing money since I bet per second for Lambda is greater than EC2

Re: Behind the scenes, AWS Lambda

#55

Fantastic paper. So I've been playing with the java and python runtimes and it's absolutely stunning how much better python is on execution and start up time. Also how does an event actually get to the lambda handler? Because they can come from all kind of sources.

I believe they fire up an http server, based on how their local executor behaves, and then do "servlet-y" (or WSGi-y) dispatch into the entry point method

Re: Behind the scenes, AWS Lambda

#56

Earlier quoted context omitted.

Which gcp services run directly on borg? My understanding is at least bigtable, cloud sql and other dbs are within “hidden” VMs. I think loadbalancers and storage are exceptions but same is true for aws (except the classic elb probably)

Bigtable, Firestore and Spanner run directly on Borg. Cloud SQL V2 runs in hidden VMs.

Are those not internal services that pre-date GCP that are exposed externally _through_ GCP?

Re: Behind the scenes, AWS Lambda

#57
post #54

Earlier quoted context omitted.

I can't think of any reason outside of product positioning. A lot of the novelty of Lambda is its identity as a function: small units of execution run on-demand. A Lambda that can run perpetually is made redundant by EC2, and the opinionated time limit informs a lot of design.

> A Lambda that can run perpetually is made redundant by EC2 Is only conceptually true outside of "EC2 Classic", because (to the best of my knowledge) every other EC2 launches into a VPC, even if it's the default one for the account per region, and even then into the default security group (and one must specify the IDs). That may sound like "yeah, yeah" but is a level of moving parts that Lambda doesn't require a con…

[deleted]

Re: Behind the scenes, AWS Lambda

#58

Earlier quoted context omitted.

You can't. Are you actually asking this question? Or you pretending to ask a question because you think the fact that AWS Lambda run on AWS is some huge gotcha that I never imagined and no one would ever tolerate? I explicitly note vendor-specific baggage. AWS revenue is over 45 billion annually and half of customers use lambda.

My point is that the industry really hasn't moved on from the old LAMP stack if it's been replaced by a single company. When it truly comes down to it, the day-to-day tools are not ours if they aren't open. And if deploying a lambda function on my own hardware is vastly more complex, then the tools haven't really changed, they just got outsourced. There are a bunch of semi-standards like Serverless Framework and Knat…

> And if deploying a lambda function on my own hardware is vastly more complex, then the tools haven't really changed, they just got outsourced.

Well... Yeah?

I came into web development in 97. Back then almost everything was on shared servers, so pretty much the same thing.

Re: Behind the scenes, AWS Lambda

#59

Aside: Lambda, out of Peru, is apparently the next virus variant we need to worry about. Edit: I had never seen the word before then I saw it used twice in two days, in different contexts. Just thought it was odd.

The Y-combinator is a function in Lambda calculus.

Re: Behind the scenes, AWS Lambda

#60
post #13

This is great! Awesome writeup w thekind of details that are sometimes opaque and hard to find documentation for. I recently deployed a NextJS app using Serverless framework (and serverless-nextjs), so Lambda@Edge... looking fwd to playing more with compute at CDN edgein general (eg fly.io). Amazing how easy it is, esp. as someone who came into webdev in 1998.

Considering your long experience, didn't you feel like we lost a lot post-PHP? I also stepped out of the PHP world into JS, and never understood why there isn't any apache2-modnodejs... And to me, the serverless JS movement seems to be just that, but with a lot of unnecessary baggage.

I've been doing software for maybe 25 years. We gained a lot of control and ownership, thanks to FLOSS, 15-20 years ago and then lost a lot.
Post reply on HN