5 ms·
At a past job, we hired some people out of Amazon to work on our cloud services. They rewrote large portions of it using AWS serverless tools. Cost was a big c
by PragmaticPulp 6y ago
At a past job, we hired some people out of Amazon to work on our cloud services. They rewrote large portions of it using AWS serverless tools.
Cost was a big concern for us. Strangely enough, the AWS experts insisted it would be impossible to estimate the cost of the serverless architecture until we deployed it at scale and tried it out. Is this still the case, or has it become easier to estimate costs during development?
In our case, costs did go up significantly after the serverless rewrite, but they also added additional functionality and complexity that made a 1:1 cost comparison impossible.
Serverless was interesting, but if I was involved in another backend project I would want to understand the cost better before diving into the deep end with all of these intertwined services.
- xiwenc 6y agoWas there a specific service or reason with high cost that stood out?
- PragmaticPulp 6y agoThe cost become a politically sensitive, and ultimately secretive, topic after it became clear that the costs were growing. I was less involved with that team over time. I got the impression that serverless was quick and easy for the simple server-side operations that could be mapped easily to AWS' serverless building blocks. Of course, this is where they started and showed initial promise. It broke down as they started taking more complicated server-side functions and forcing them into serverless style. It felt like a square peg / round hole situation that ballooned in complexity just to make it serverless. If I did it again, I'd have the teams start with the most complicated server-side functions instead of picking the low hanging fruit first. And, of course, be open to using regular old servers where it made sense to do so. AWS Serverless provided a lot of internal political ammunition because the cloud team could show up in a meeting with complicated diagrams exactly like what you see in this article, whereas previously we just showed single blocks for servers and another block for databases. The complexity did a great job of convincing execs that the AWS experts knew what they were doing, but then of course they were committed to going with the serverless options.
- ris 6y ago> At a past job, we hired some people out of Amazon to work on our cloud services. They rewrote large portions of it using AWS serverless tools. I think they probably considered you a "sucker". Think you're ever going to be able to migrate that app to anything other than AWS?
- PragmaticPulp 6y ago> Think you're ever going to be able to migrate that app to anything other than AWS? Obviously, no, we did not expect to migrate our AWS Serverless backend to something other than AWS. Avoiding vendor lock in makes sense in few, select circumstances. Avoiding vendor lock in for the sake of avoid vendor lock in leads to over engineered services that take longer to deliver because people are going out of their way to avoid using vendor-specific tools. In all of my time as an engineering manager, the number of times that avoiding vendor lock in has solved more problems than it caused is still zero. Use the best tools available at your disposal to get the job done. Cross the vendor-changing bridge if (and only if) it becomes a requirement.
- momokoko 6y agoI think you might be thinking it is a binary choice. Educated decisions can be made to decide if a particular item is worth the lock in or not. For example auto scaling groups in AWS are much faster to set up and maintain than vendor neutral choices. But leaving asg is pretty much the same amount of work as setting up auto scaling anyway. Switching out has cost but not that much. Something like cognito... that’s almost impossible to leave. But more importantly it’s the AWS “glue” between these services that is truly impossible to leave. I have seen two businesses fail under the weight of AWS billing and be unable to get out from underneath it before they ran out of funding. It’s definitely not something to look at lightly.
- scarface74 6y agoAnd how many companies are successful either because they started on AWS until they found product market fit and they were capitalized well enough to migrate off (Dropbox) or are successfully running their entire business at scale on AWS (Netflix). How many companies fail because they run out funding - period?
- tracer4201 6y agoHow long ago was this? I used AWS for a recent personal project. Lambda was not the right approach for me and primarily due to cost. I had an idea of how long a request takes to process (ball park estimate) and the expected throughout (requests per second). From that I knew that at minimum, I would be paying $x a month, and as the execution time of my code goes up or I get a spike in my traffic volume, it would only increase from there. If you’re at scale, AWS Lambda blows up real quick.
- scarface74 6y agoThat’s why you use Lambda+APIGW with proxy integration where you can use your standard frameworks like Express, Django, Flask, ASP.NET MVC and your can easily move from lambda without any code changes.
- tracer4201 6y agoI’m not sure what specific problem is being solved with the solution you’ve written. Also, I wasn’t building a web application.
- scarface74 6y agoYou’re not “locked in” to Lambda. When you see that lambda isn’t the answer you deploy the code to a server or Docker just by making a few changes to your deployment pipeline. If you use the standard APIGW solution where it routes to your various lambdas, you would have to rewrite code.
- tracer4201 6y agoSorry but maybe you misunderstood my post. I never said anything about “lock in”. I could easily estimate ballpark minimum costs in front. There’s absolutely no reason to continue using Lambda at that point. Lock in or no lock in, there’s also a cost of writing the deployment scripts and setting up your development vs. production Lambda stack. And if you are using Lambda, you’re going to end up making various decisions to keep your costs low. For example, I was working with a JVM stock. Spring is too heavy, and even Guice has some execution cost. So on Lambda, I would use Dagger... a decision made purely because I’m operating on Lambda. Building an architecture on Lambda requires certain decisions to be made up front. Saying that you can just lift and shift later on is very simplistic and will be costly depending on what you’ve already done on Lambda. I would always say estimate your costs first and think about the long term picture about your request rates, patterns (spikes), and growth rates.
- scarface74 6y agoHow do you evaluate cost without knowing usage patterns?