DEV Community

Farmijo
Farmijo

Posted on

Thoughts on Serverless Architectures

Several months ago, I started working in a small startup. Given their growing volume of clients and needs and due to the small team, they decided to build most of their core infrastructure through AWS lambda functions, using the serverless framework for it. So, we're running our whole business through lambda and it works! It's amazing to see that a whole working business is built over a such simple architecture.Before working here, I just saw lambdas as a way of build crons or small tasks, but it could be bigger than that.

After working with it for some time, I'm starting to see a lot of of advantages but some cons too. Summarized, is a really good way to make things scalable and provide a unified framework to build things without worry too much about infrastructure issues.
But, it have some trade-offs to be known too.

Pros:

  • Serverless, its name says it, don't worry about servers. Just code, deploy and it will work. On this days of overwhelming complexity through containers and kubernetes, is fine to avoid this kind of worries.
  • Prod and Dev environments can be easily replicable at 100%! No need to worry about environments too!
  • Easy deploys, easy rollbacks. And, through Serverless framework, be platform agnostic is quite easy (not 100% transparent, though)
  • All of this allows to build and ship things really fast!

But, there are things to take care off. Some of them are tradeOffs, some of them just points to take into consideration:

  • Serverless framework does not provide any information about how to build your stuff. It just provides an easy way to build and deploy a Serverless infrastructure on a lot of cloud platforms. The way that it avoids the server problems and configs does not mean that it helps you to properly develop things. You can develop HORRORS (coupled lambdas, twisted Code,..) and deploy it easily. Its advantage is on avoid to have dedicated staff into infrastructure, not into development.
  • You're slave of a cloud provider. Someone will manage your servers, responses time will depend on them, scalability too... if you Work with Serverless, Make sure that you're able to migrate to other alternatives easily.
  • Infernal YAMLs. You will be defining too much stuff through them. Be sure that you're writing them properly too.
  • Local development can be problematic if you start to couple lambdas. One lambda development works fine, two at the same time, don't. They don't react on local quite fine to external events or invocations, so you will need to take care of how you structure your Serverless architecture

Having some cons, I think that it can boost the productivity of a team and fits perfectly for MVP constructions. But, think about it more as a sinergy than as a Swiss knife. A poor codebase built through a Serverless architecture won't be better than a poor codebase on premise. But, if things are built properly, the boost of productivity is gigantic.

Top comments (5)

Collapse
 
albicodes profile image
Albiona

Hey Farmijo, have you heard about Webiny Serverless Framework? I suggest you check it out and see the advantages it offers for developing serverless applications, furthermore, it provides a couple of serverless applications such as a headless cms, page builder, form builder, and file manager. Here’s the link: webiny.com/

Let me know what do you think, and if you have any questions!

Collapse
 
ferasallaou profile image
Feras Allaou

Nice piece, I've shared my experience as well medium.com/@FerasAllaou/5-critical..., a lot of points should be considered before moving to serverless Arch

Some comments may only be visible to logged-in visitors. Sign in to view all comments.