Hello everyone,
I wrote a bit about serverless architecture and the ways it helps startups. We built Vacation Tracker almost fully on serverless stack on AWS, and for almost 50 teams the cost of our infrastructure is $0/month.
I hope this can be helpful and useful for someone's product in future :)
Serverless architecture improves the way we build software. But it’s much more than just development, because it can improve the way we are building our products in general.
With serverless, your developers can focus on the business logic implementation, instead spending a lot of time on setting up and maintaining infrastructure. It also decreases the cost of your application, because it converts capital to operating expenses. Besides that, having smaller services allows you to implement changes and A/B tests easier, and to pivot faster.
With all the benefits mentioned above, serverless becomes more than the architecture choice, it becomes an important strategy. For example, it can allow you to charge teams per active user, without having to be a big company, such as Slack.
Full article: https://vacationtracker.io/blog/startups-can-benefit-from-serverless/
It can be a truth in some specific cases when, for example, it makes sense to separate the functions' logic from the interface but definitely not in any case. Besides "improving" the way it brings new problems.
I agree that it doesn't work for everything, and I finished the article with "Of course, everything has its downsides. We’ll cover the most important limitations of serverless architecture in some of our next articles."
In my case, downsides are much smaller than upsides, otherwise I wouldn't use it at all. But we gained benefits from serverless architecture only when we fully embraced the platform. In my opinion "specific cases" are not a small number of cases, and that number is growing fast.
one thing I don't like about serverless is that we need their 'functions' in our app. For example, we need lambda for aws.
Debugging is also more difficult. We cann't run it locally, so everything we need to check on their portal.
If you use the
Severlesscli, you can doserverless invoke local --function functionName.Also you can use a test runner like Jest for Node.js to invoke a function locally.
Well, you don't "need their 'functions' in our app", because AWS Lambda is a platform. The point of serverless functions is that you care about function only, not the infrastructure and scaling, and ie. Lambda function is not in any way special, it just receives an event and context. Other serverless functions work the same.
Debugging is harder when you are new with serverless, I agree. Also, I wrote about testing, including running the function locally here: https://medium.freecodecamp.org/the-best-ways-to-test-your-serverless-applications-40b88d6ee31e.
This comment was deleted 7 years ago
Functions are just one piece of serverless ecosystem. Their role is to process the data, not to store it. In most of the cases they are not stateless, but more "remember nothing" (they can keep state in some situations). But for permanent storage you need to combine them with serverless database or serverless storage services (ie. AWS Lambda with DynamoDB and S3).
This comment was deleted 7 years ago
True, they are not stateful. But that's ok in my opinion, because as I said they are just a piece of serverless ecosystem.
You might want to take a look at AWS Step Functions, they allow you to create state machines. (not exactly stateful service, of course)
This comment was deleted 7 years ago
We used IoT Gateway's MQTT over web sockets to handle real time with serverless, which is kind of hack. They improved that a bit with AWS App Sync, but that's a GraphQL backend with built-in support for real-time, so it's not a solution for the project you are working with for sure :)
This comment was deleted 4 years ago
For productivity, serverless isn't different than many other things. If you need to do something fast, then definitely use something that you know good. With serverless you can use python, so using Django for initial release and then moving some services to serverless is a valid plan. This is exactly the next blogpost, because we did the same for Vacation Tracker. The team that worked on our product (2 mid level developers) never used serverless before, so they started with Express.js, and then we slowly moved to serverless.