What is serverless framework? Why use it?
The Serverless Framework is an open-source project that replaces traditional platforms (hardware, operating systems) with a platform that can run in a cloud environment. It can scale up or down and doesn’t require as much provisioning when you want to roll something out; which translates into saving money on resource use.
Serverless is beneficial as it lets you focus on delivering a product, rather than managing typical IT problems.
BaaS (Backend as a Service) laid the groundwork for what was to come. It’s a cloud service model where server-side logic and state are hosted by a cloud service provider and can be used by client applications running in a web or mobile interface.
Next came FaaS (Function as a Service) which changed the coding game. The code executes differently here; it’s triggered by an event and runs in containers. Those containers are allocated dynamically, being created and destroyed as the workload shifts.
You can create code (a function) that does a specific task, throw it into your FaaS provider (Google, AWS, Azure, etc.), and then they handle scaling up or down based on the set of parameters you came up with.
Serverless is essentially a runtime architecture where infrastructure is entirely managed by a cloud service provider, and resources are dynamically allocated on demand. Yes, it uses servers, but they’re not servers that you have to worry about. It’s all taken care of by the cloud provider.
You can see where we’re headed with this. Imagine not having to mess with servers at all. All that money and man-hours you’ve been dumping into traditional frameworks can be a thing of the past! Don’t forget deployment. It’s about to get much simpler.
It can’t be perfect, right? There are a few things to consider before you go jumping aboard the Serverless Framework Express. Vendor lock-in is a concern. You won’t necessarily be stuck with the first vendor you go with, but it can become difficult to rearrange how your software is triggered and interacts with the architecture. There’s no way to completely avoid lock-in with anything, though. Your programming language and backend database are similar examples, proving you’re never going to be completely free from some sort of commitment.
Data security is another concern. Your information is sitting out on the internet. Yes, it’s protected by all manner of safeguards, but it’s still out there.
Monitoring can also be complicated. You’ve got to have a good notification system, an easy way to view logs and error messages, and catch warnings before things spiral out of control. Only you can decide if you’re willing to make that a priority.
There are several, but here are a few to look at:
- Lambda: FaaS
- Amplify: BaaS
- Functions: FaaS
- Xamarin: Mobile BaaS
- App Services: Microsoft’s suite of serverless technologies
- Cloud Functions: FaaS
- Firebase: Google’s mobile-focused BaaS
Ready to try it for yourself? Check out Linux Academy’s free Serverless Concepts course that will get you up to speed on how to do more by going serverless.