5 ms·
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 infrastructu
by carlosf 5y ago
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?
- kolanos 5y agoThis service exists, it's called AWS Fargate [0]. [0]: https://read.iopipe.com/how-far-out-is-aws-fargate-a2409d2f9bc7 https://read.iopipe.com/how-far-out-is-aws-fargate-a2409d2f9...
- carlosf 5y agoOof Makes sense! I wish Fargate was easier to use and had a scale to 0 feature. If App Runner ends up supporting private deployments then we can have a true Cloud Run competitor.
- kolanos 5y ago> I wish Fargate was easier to use and had a scale to 0 feature. Fargate can be scaled to zero. Also, have you tried the CLI? [0] [0]: https://github.com/aws/copilot-cli https://github.com/aws/copilot-cli
- simonw 5y agoWhen I say "scale to zero" I mean like Cloud Run or AWS Lambda: I define it as the service automatically scaling to zero (and hence costing nothing to run) in between requests, but automatically starting up again when a new request comes in - so the request still gets served, it just suffers from a few seconds of cold-start time. I'm pretty sure Fargate doesn't offer this. It sounds like you're talking about the ability to manually (or automatically through scripting) turn off your Fargate containers, then manually turn them back on again - but not in a way that an incoming request still gets served even though the container wasn't running when the request first arrived.
- ignoramous 5y agoCurious, have you used Cloudflare Workers Unbound to see how it compares with Cloud Run in terms of pricing and cold starts?
- simonw 5y agoI haven't yet - my projects (all based around https://datasette.io/ https://datasette.io/) need full Python support, and it looks like Cloudflare Workers still only with with JavaScript or stuff-that-compiles-to-JavaScript. I don't think I can get Datasette working via the Python-to-JavaScript route, it has too many C dependencies (like SQLite).
- simonw 5y agoFargate isn't a competitor to Cloud Run (I wish it was) because it doesn't scale to zero in between requests and scale back up again when new traffic arrives.
- otterley 5y agoCheck out AWS App Runner. It may do exactly what you’re looking for.
- simonw 5y ago"Easily pause and resume your App Runner applications using the console, CLI, or API. You’re only billed when the service is running." That doesn't sound like the automated scale-to-zero I get from Cloud Run.
- otterley 5y agoIt does scale to zero CPU when your application isn’t serving requests. See the pricing model at https://aws.amazon.com/apprunner/pricing/ https://aws.amazon.com/apprunner/pricing/ for more details. It does not scale to zero memory, however, because customers have told us that cold-start latency has been their biggest pain point with Lambda functions. App Runner containers can respond to requests in milliseconds as a result.
- carlosf 5y agoI have the opposite use case. Most of the stuff my company is running is made up of data pipelines and machine learning pipelines. So we have a lot of infrequent jobs that don't really care about latency.
- otterley 5y agoThat sounds like a job for Fargate or EC2 instances that are managed by EC2 Capacity Providers on ECS.
- slumdev 5y agoThis isn't true. Fargate scales in minutes, not seconds. And it never scales to zero.
- cloakandswagger 5y agoI 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.
- ignoramous 5y agoIt 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 https://youtu.be/dInADzgCI-s?t=524 (James Hamilton, 2013)
- cinquemb 5y agoI loved using spot instances for managing scaling for a startup i worked at, saved alot of money instead of using these services they provide.
- ignoramous 5y agoI find myself favour Serverless more while it continues to mature, and generally have fewer complaints. Btw, you'd like AWS Batch: It is a hassle-free, zero-code way to run batch / uncritical workloads on Spots. https://aws.amazon.com/ec2/spot/use-case/batch/ https://aws.amazon.com/ec2/spot/use-case/batch/
- mdaniel 5y ago> 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