16 ms·
The Unfulfilled Promise of Serverless
- shireboy 5y agoI actually just did my first production serverless project and didn’t find the first point to be an issue. I banged out some nodejs, can run it locally for dev or at lambda for prod. It’s a small one-endpoint service, but it works great imo.
- l5870uoo9y 5y agoFor smaller applications you likely won't experience much complexity, but building larger apps involving multiple related cloud services, configuration and the need for debugging can increase (dramatically).
- edude03 5y agoYep, despite being big fan of serverless I feel like most useful? (for lack of a better word) Serverless deployments are predicated on locking you in while decreasing the cost for the platform operator. Take serverless DBs for example. If you’re using a managed db you generally don’t care whether it’s serverless or not, but the platform operator does, as it becomes easier for them to offer you a free tier to get you too put your critical data into their platform.
- bob331 5y agoBlah blah blah
- DarthNebo 5y agoThis is where Knative shines, specially with Google's Cloud Run and Cloud Run with Anthos. The billing is also not at an invocation level rather than a cumulative runtime where each container can define a level of concurrency according to your needs instead of having to spin up individual functions every time.
- paulgb 5y agoYes, it’s a shame “serverless” became synonymous with FaaS, but understandable given that Lambda was the first to use the term. I was pretty excited by Lambda initially, but I gave up on it for some of the reasons the author talks about. Google Cloud Run actually achieves what I want from serverless: I never have to think about the number of servers and can pay for less than one instance during low-traffic periods, but I could migrate my app elsewhere easily if I wanted.
- wpietri 5y agoOoh, interesting! Is there a name for this slice of "serverless"? I'm glad to hear there's a pony in here somewhere.
- gunnarmorling 5y ago"Container-based Serverless" is the commonly used term for the general concept I think, with Knative being the key representative.
- imiric 5y agoGood article, and I think it's a sign we're approaching the trough of disillusionment w.r.t. serverless architecture. Just like with microservices, the benefits come from not using it as a giant hammer for everything, but in isolated use cases where it's actually a good fit. These are few and far between for serverless and the first challenge is making the right decision of when to use it. I do agree about vendor lock-in, but at the end of the day this is inescapable because of its very nature. It was always meant to be "run this code on someone else's infrastructure without me having to worry about maintaining it", so vendors are free to choose how that actually happens. What we need to fix this are standards that can be adopted by all vendors, so that it's easier to migrate. Something like OCI for serverless that isn't tied to specific runtimes would be ideal.
- ldehaan 5y agoI made fun of server people touting serverless as if that wasn't saying I'm useless, hire me. It's like the cloud, which is speshul. You're running your servers in my data center, but that sounds correctly like we own your ass now... so let's add a layer of abstraction and call it a cloud. Oh cloud is overused, let's add another layer of abstraction and call it serverless, my aren't we clever. I build serverless clouds when I fart, the best clouds.
- l5870uoo9y 5y agoWhile I completely agree with the sober assertion that the serverless hype didn't mean that programmers would only write business logic, I also think that no one should take business "bullshitters" serious when they claim such. Hype speech (wild exaggeration disregarding reality) is a pervasive dialect of the web.
- gerbilly 5y ago> serverless hype didn't mean that programmers would only write business logic Yeah, I've found that when we recently tried serverless, we ended up wasting tons of time bikeshedding multiple CI/CD pipelines.
- fivea 5y ago> The bulk of your time building serverless applications will not be spent writing the application logic or focusing on the parts of your code that are in fact the differentiated thing that you’re being paid to work on. It just flat out won’t. Instead you’ll spend most of your time figuring out how to mate these functions with other services from that cloud provider. I completely disagree with this point, as it goes totally against the experience that I and my team have piled up after a couple of years of running a couple of serverless apps that rely heavily on a few AWS Lambdas. The API Gateway and ALB code was pretty much a one-and-done, with the bulk of the work consisting of setting up TLS termination, and the bulk of the work was on writing and testing all the business logic. The only exception I've seen to this rule is if your serverless apps consists of a bunch of event handler from a large bunch of AWS services, like S3 triggers and message queues, that are not much than one-liners that don't do much beyond plumbing around events. Still, I don't feel it's right to describe this sort of application around lambdas that don't do much by design. > I’m apparently atypical here! Folks don’t like to spend an order of magnitude more to monitor a system than the system itself costs to run. (...) I also don't believe this point is fair or reasonable. It makes no sense to complain about serverless because it can be dirt-cheap (or even free to use) but your choice of monitoring service, coupled with the way you chose to use it, ends up costing more. You pick what you use and decide how you use it, and if your personal choices lead to a price tag greater than zero then that's the outcome of your own design decisions. This complain is particularly eggregious given that AWS CloudWatch has a free tier that's very clear and included in basic intro to AWS tutorials. > (...) It turns out that while it’s super easy to find folks who know WordPress, you’re in trouble if both of the freelance developers who understand serverless are out sick that day — not to mention that they cost roughly as much as an anesthesiologist. Again, this is hardly a serverless issue. You'd experience the exact same problem if you ran a Spring monolith.
- eof 5y agoI kind of wonder if you and OP are talking about significantly different scale in amount of code/functionality/team size. Perhaps I am just jaded, but I take it for granted that writing application logic is only ever going to be a significant minority of “your time”—in larger orgs there are teams specializing on the different monitoring, platform, infra, etc taxes that are a reality of running software at scale. Five smart hackers that know aws and python well are going to get much further on lambda-all-the-things than an org of several thousand would, probably. Lambda is also outrageously expensive at scale; but at the end of the day I’d chalk this up mostly to “OP not very good serverless compared to other patterns, fivea good at serverless”
- bsenftner 5y agoIt was a poorly designed service, for the client-user, from day one; for the Serverless provider it is more large sized revenues genius. Running a server or a cluster of servers is elementary, kids. Do not believe the cloud hype. There is no need to spend the cloud dollars when a small fraction of ones' cloud expense gets one exponentially more compute. All you need to do is get over the fear that running a server is difficult. it is not.
- eof 5y agoRunning a secure and reliable server is not trivial. Getting one up and running is easy, sure. Keeping it that way with 4 nines of reliability is anything but. Scaling past that one sever is it’s own task. Talking about a cluster being elementary is frankly absurd. I think you might be confusing “got it working!” with “hardened in production.“
- bsenftner 5y agoIt is not trivial, but it is not rocket science either. And as far as that goes, rocket science is not that hard either. It is a skill set that is very much worth developing, which pays itself back exponentially.
- kaetemi 5y agoI feel like a lot of the industry is just trying to be relevant by pretending simple things are difficult, selling buzzword solutions to hide the simplicity.
- rmbyrro 5y agoIt's not about simplicity, it's about opportunity costs.
- tlarkworthy 5y agoI am building a distributed FaaS using the WEB as the normalising environment. This has several benifites like the developer's browser transiently becoming "prod" unlocking debugging-in-prod tooling, but it also addresses portability. 20ms deploys. it's 100% optimized for DX, no toolchain either https://observablehq.com/@endpointservices/webcode https://observablehq.com/@endpointservices/webcode I used to work on Google's FaaS and I intend to take those lessons for generation 2.
- hn_throwaway_99 5y agoI couldn't disagree with this article more. We've built an entire architecture running our Series A startup on serverless technologies, and it's been fantastically successful. We have a small team, so I specifically knew I didn't have the team capacity to do a lot of server management. Here are our general components: 1. We have a bunch of services running on App Engine NodeJS Flexible version. We have extremely minimal lock-in because we basically just have a normal Express app serving GraphQL. 2. In fact, we migrated some of our services to Cloud Run for lower costs. Cloud Run is basically serverless Docker containers, and the migration was very easy. Again, our apps are for the most part platform agnostic apps on Node. 3. We also make use of Google Cloud Functions for our asynchronous event handling. This has also been a great choice. Going with serverless tech has easily saved us ~2 FTEs in a team of fewer than 10 engineers.
- _huayra_ 5y agoHow portable is an app using serverless? With VMs (and especially containers / k8s stuff), you can just pick up the whole app and ship it off to another cloud provider (except if one uses custom offerings). Can serverless functions be done the same way? I guess at the end of the day it's just JS / Python code, but is there an "export to / import from a common format" API / web portal button?
- rmbyrro 5y agoIt depends on how you develop. In most cases, it's arguably easy to separate your code from cloud-specific stuff. If you do that, you have high portability.
- potatoman22 5y agoPortability is nice, but is it really needed all that often?
- fartcannon 5y agoYes, because Amazon, like a bad landlord, could at any point in time kick you out, or quintuple your rent. What GP has built is fragile.
- gerbilly 5y agoI have a theory that even though the serverless trend is sold as a technical revolution, it's mostly due to accounting practices. Serverless is purely about CAPEX, vs OPEX. Companies are so loath to make capital expenditures (CAPEX) that they will willingly let their employees waste thousands of extra hours learning a new development model so they can pay Amazon using operating expenses instead. And it's funny because even though amazon has no choice but to use capital expenditures to populate their datacentres with machines, they are offering lambda as a way to monetize the unused cycles. So lambdas are being twice used as a kind of compromise to fill in the gaps on an accounting sheet. I believe the joke is on us as technical people. We twist ourselves into knots to promote this new development model as a technical innovation, which it really isn't. We have just made the time-sharing service (they used to have them in the 60s and 70s) fashionable again. (Along with the long feedback cycle which makes working on these systems so frustrating.)
- WJW 5y ago> I believe the joke is on us as technical people. Quite the opposite? We can be paid for migrating current applications to "serverless", and when the tides of tech fashion change we can be paid again to migrate to the new fashionable tech. If the joke is on anyone, it is on the shareholders of the companies getting locked in. But, it is their money and if they want to trade some CAPEX for OPEX that is not really my problem.
- bob1029 5y ago> But, it is their money and if they want to trade some CAPEX for OPEX that is not really my problem. What if we made it your problem by granting you equity in the business? I feel like this is the #1 reason to funnel a portion of shares to your employees. Making the technical people give even 1% of a shit about the cost of doing business is infinitely better than 0%.
- WJW 5y agoIf you are an engineer with 1% of equity, more power to you. In all the companies I've worked at, the influence of the cloud provider bill on the eventual worth of my options has been lower than my annual beer costs. The #1 benefit of options for startups is that they shift engineering costs from now to the future, so that you can hire any engineers at all while operating on a small budget. If the business works out, you already have so much money that the cost of the options will be negligible. If the business doesn't work out, the cost of the options was zero.
- gadflyinyoureye 5y agoWe abuse serverless on my team. We make our services in NestJS. We use an adapter to connect express to Lambda RestAPI events. Business logic is properly tiered. The code is testable for units and integration. To support debugging locally we use podman and localstack. The perform is quick enough for our purposes. Our TLAs are basically do it before the 30 second window times out for the API Gateway. If we need better performance or if we hit issues like payload size limitations, we could deploy our apps on EC2 with no loss of features or rework.
- russtrotter 5y agoA few years back, I refactored a memory/time-intensive task of an application to leverage AWS lambdas. Once the code got into production, it ended up working out fine and we were able to side-step OOM issues that were plaguing the prior incarnation. Takeaways: * being able to scale on a per-request basis and understand your burst usage of resources is pretty useful * the top-level comment regarding CAPEX vs OPEX was spot on. Our higher-ups always had their eyes on the AWS bill and not having to pay for instances (either spot or elastic) appeased them. * at the time at least with Java-based lambdas, the local tooling was really clunky and slow with that nasty startup. You might have better success with node or python in that area. * otherwise, like any other tech, there's gonna be tradeoffs. Something good to keep in your toolbox, but like most things they're no silver bullet.
- smackeyacky 5y agoThe startup time for .NET lambdas is pretty good. A good alternative to Python at least for me
- kaba0 5y agoUnless you are doing something really short-living, or just calling FFI for IO, python is really slow compared to node or java.
- rurp 5y agoI'm basically living this experience right now. My previous job involved building and maintaining web apps using boring dependable frameworks and infrastructure. My current company is all in on serverless and uses it for everything. I now spend much LESS time writing business logic. Figuring out how to finagle various proprietary services and wrangle them together can take a ton of time and effort. The crazy thing to me is that this is how things run at par. As the article points out, the downside risk with serverless is massive compared to using more traditional tools. If AWS jacks up its prices, deprecates services we rely on, or has a major issue with my company for any reason -- these could easily become existential events for us.
- canyonero 5y ago> That’s what this article is about: Say what you will about serverless, it’s failed to live up to its promise and hasn’t proved to be particularly lucrative for anybody Hard disagree. If you define lucrative as having a successful business model around serverless tooling/architecture or if your business is simply powered with severless services. Lots of folks have been had lucrative success without question. Not only that, serverless has allowed full-stack web dev to flourish, so Id argue it’s helped some individuals build lucrative careers as well.
- manishsharan 5y agoI work in the financial industry and I can't even begin to count the number of servers that we are running to just run nightly and weekly batch jobs. Migrating this workload to Azure Batch job is helping us save a ton of money while improving our ability to concurrently execute multiple jobs and also cutting down on our server costs. As much as I enjoy Corey's tweets, he is wrong on this one use case.
- jeffbee 5y agoI guess it makes sense for a blog with "A.W.S." in its name but starting out by explicitly dismissing the obvious disproof of your thesis, Google App Engine, doesn't really make the argument work. App Engine exists. App Engine is serverless.
- shaicoleman 5y agoAWS recently (prematurely) announced lambda function URLs, which would make API Gateway unnecessary [1]. It will probably be officially launched in the next couple of weeks. For our app, I'm in the process of removing API Gateway and calling lambdas directly from our back end servers instead, as it added a lot of complexity and the 30 seconds timeout imposed by API Gateway is causing issues. 1. https://www.reddit.com/r/aws/comments/qxrubv/lambda_function_urls_aws_lambda/ https://www.reddit.com/r/aws/comments/qxrubv/lambda_function...
- tebbers 5y agoFinally! This has been a glaring omission for me for years and has prevented me from adopting Lambda thus far.
- vishnugupta 5y agoI tried API Gateway -> Lambda but found it a bit too complex to even setup. Instead, I've used ALB -> Lambda (1) to good effect; much simpler to setup and no maintenance issues so far. (1) https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/ https://aws.amazon.com/blogs/networking-and-content-delivery...
- grakic 5y agoALB integration limits payload size to 1Mb, compared to 6Mb one gets with Lambda API or API Gateway. I would love to use ALB more, if not for this limit.
- MaxDPS 5y agoIs this different va what Google already does this Cloud Functions?
- smackeyacky 5y agoI don't see Lambda functions in this way, but then again I'm not using them as server replacements as in making them the end points of an API call. I use lambdas exclusively to process other events generated by S3 or DynamoDB that happen because my web service stored something or directly wants something to happen. This way, I didn't have to write a scheduling system or a batch system for my software, I just use AWS's perfectly good implementations. I don't really see the advantage in specifying my API, tying myself to the AWS authentication infrastructure or trying to encapsulate small bits of my API into Lambdas although I can see why you might do that in a bigger system. For me, the scaling occurs in ECS, not in distributing lambda functions. The better part of "serverless" is the containers running the web system, S3 and the managed service running the database. The lambda functions make the job of longer running tasks much easier to manage and they are terrific for that.
- yencabulator 5y ago> Serverless, but not portable > you’ll spend most of your time figuring out how to mate these functions with other services from that cloud provider That's just as true if you move the code from serverless to a VM in that cloud, and keep using all the other services. Vendor lock-in for the serverless function itself seems to mostly be an AWS thing (Lamdba). Elsewhere, the trend is more running any old container will function as serverless. If you choose to consume dozens of proprietary services from a regular container, that is on you.
- throwaway2016a 5y agoAWS Lambda also supports running containers. And it supports a number of language runtimes. Including custom runtimes. The only think proprietary it imposes is the interface your function reads in when it is called. I'm curious what part of Lambda makes it have excessive lock-in vs the others once you discount "choosing to consume dozens of proprietary services"? All my serverless code always has a wrapper function to decide the request object so porting it to another cloud provider (even from Lambda) is pretty easy. Edit: The article seems to state the issue is that things like step functions are proprietary but: a. That's not lambda b. Don't use step functions, no one is forcing you. There is nothing step functions does that can't he handled other ways.
- yencabulator 5y agoLet me put it this way: AWS Lambda started out as requiring custom code, and has slowly become usable without vendor lock-in. Other providers started out with "just serve HTTP from a container".
- throwaway2016a 5y ago> What format is it expecting? Do you have the endpoints correct? Is the security scoping accurate? Oh, it didn’t work? Time to embark on a microservices distributed systems murder mystery where the victim is another tiny piece of your soul, because getting coherent logs out of a CloudFront –> API Gateway –> Lambda configuration is CRAP. I'm trying to figure out what this means because my experience has been the opposite. I find the logs to be generally very code, AWS X-Ray gives you good visibility into the whole process. And you can use third party telemetry / tracing providers too. Also AWS Cloudwatch is actually pretty powerful for monitoring and supports custom metrics and alarms. It's not the most powerful log system in the world but it is pretty painless to use. Also, Lambda are just short functions written in the language of your choice (of which there are many) or in a container. What exactly about that is not portable? If I write node.js code it is trivial to run in another environment that runs node.js. I'm no an AWS super-fan but I feel this article is a rant (and one written without knowing all the actual capabilities of AWS) and not fact based. I personally use Lambda a lot. The operations effort is near nonexistent saving me countless hours. As I said, I actually like cloudwatch. And economically, if my microservice is unused it uses zero resources and scales up near instantly. Edit: to add to that, it sounds like the author's real issue is with microservices not serverless.