6 ms·
I will never understand why people are attracted to the Lambda SAM style of programming. Sure there are scalability benefits but it comes at the cost of complex
by threeseed 8y ago
I will never understand why people are attracted to the Lambda SAM style of programming. Sure there are scalability benefits but it comes at the cost of complexity, development time, vendor lock in, wildly variable p95/p99 numbers, a nightmare debugging experience and costs that are expensive and fluctuating.
You could just build a Docker web app eg Rails/Play, deployed in ECS or Elastic Beanstalk with the same scalability in easily 1/10 the time and complexity. And if you get sick of AWS trivially move it to GCP, Azure or on-premise.
- mateuszf 8y agoI agree, to be fair though - almost all of this could be mitigated in future by better tooling.
- toomuchtodo 8y agoHope is not an architectural methodology.
- moduspol 8y agoIf every emerging technology were scrapped early on due to lack of tooling, we'd have no mature technologies.
- toomuchtodo 8y agoFair point, as long as it’s someone else’s time and dime to mature these arguably fad technologies of questionable value. Until then, it’s not a mature technology, it should not be sold as such, and you take significant risk in implementing with it.
- deleted 8y ago[deleted]
- Annatar 8y agoVery few technologies in IT are actually mature, and of those that are, it’s exactly their documentation and tooling which makes them mature.
- ariehkovler 8y agoServerless tooling is coming fast. 1. Biggest issue with serverless is debugging when you can't make a local environment and can't install anything like a conventional debugger in the serverless environment. I know of at least one company with a new and very elegant solution for this problem. 2. Visibility and monitoring is also a challenge and there are a bunch of serverless monitoring startups. 3. Security is interesting because, again, you can't install anything to protect your code: no Web Application Firewalls, for example. And there are several interesting theoretical attacks on serverless apps. Already, there are specialist serverless security companies. A lot of companies don't 'migrate' to serverless. They use a Lambda or GCP Function to handle one small part of a backend task like image processing or some other form of backend tooling. Serverless is often just a good way of gluing other microservices together.
- acejam 8y agoYou can run and debug AWS Lambda locally. We've done it with several of our API's: https://github.com/awslabs/aws-sam-cli https://github.com/awslabs/aws-sam-cli
- ariehkovler 8y agoyou can't always create the full environment locally, though, including inputs and connections to other services... local Lambda is an option but there are more elegant solutions too.
- acejam 8y agoYou have full control over the incoming event object, so you should have complete control over inputs. Connections to services depends on your setup of course. If you can route to your VPC, you can access those private resources too. By default, it will use your local AWS keypair, but I believe there is a way to assume an IAM role as well.
- ariehkovler 8y agoSure, but if you can just get full stack traces right off of your production code while it runs, then that's even easier.
- Touche 8y agoI don't use SAM but I do use Lambda and I disagree with everything you say here. FaaS allows me to completely eliminate web server junk from my brain. I only have to think about individual functions (routes) that takes some input and produce an output. Essentially I can focus completely on my business domain.
- tuyguntn 8y agowithout fine-tuning. How do you handle database connection pooling? yes, lambda can scale as a function, but not as a wrapper around database (yet)
- adrianm 8y agoWhat about Datomic Ions?
- djstein 8y agoI think the answer to this right now is either: - DynamoDB - Aurora In my case I am going to go with Aurora as I am deploying Django applications with Lambda
- some_account 8y agoDynomodb for nosql managed dB, or Aurora with read replicas and multi - AZ for high availability.
- zbentley 8y ago> FaaS allows me to completely eliminate web server junk from my brain. Sure, but that "junk" is key to making things scale. Prototype on whatever you want, but if you have to leave the prototype phase you have to care about/get involved in that layer.
- Touche 8y agoNot all parts of your app need to scale in the way you are talking about, that's the key thing FaaS detractors miss.
- nostalgeek 8y agoBecause it has a generous free tier, that's it. As soon as one does really heavy work with these systems cost start to get extremely high. There is nothing new with this, it's just worker queues, with a warm up/ shut down AND extreme vendor lock in when it comes to services you can query from lambda. https://medium.com/@amiram_26122/the-hidden-costs-of-serverless-6ced7844780b https://medium.com/@amiram_26122/the-hidden-costs-of-serverl... https://cloudncode.blog/2018/03/22/is-aws-lambda-expensive-to-run/ https://cloudncode.blog/2018/03/22/is-aws-lambda-expensive-t...
- dave_sid 8y agoCorrectamoodo. In my recent experience, building a docker image and deploying to ec2 has been 100 times less painful than using lambda. And I can move it all off AWS and run it on a fridge in a matter of hours if I need to.
- runlevel1 8y agoI've noticed a curious side-effect of Lambda/Serverless/FaaS services: The ease with which you can go from zero-to-production can make it easier to build something completely new than to fix or extend something old. In time, you get a sprawl of half-baked services and a complex distributed system. That can lead to each service's creator becoming the sole maintainer of their creation because they're the only one who fully understands how it fits into the puzzle. I'm hoping this will get better as the newness subsides and mature practices leak back in. Better tooling could also help.
- some_account 8y agoBut those instances you run cost money 24 hours per day. Lambda doesn't cost anything when there is no traffic, and it handles spikes very well.