- Serverless encompasses two different but overlapping areas:
- Serverless was first used to describe applications that significantly or fully incorporate third-party, cloud-hosted applications and services, to manage server-side logic and state.
- These are typically “rich client” applications (SPA/Mobile) that use the vast ecosystem of cloud-accessible databases (e.g., Parse, Firebase), authentication services (e.g., Auth0, AWS Cognito), and so on.
- These types of services have been previously described as Backend as a Service (BaaS).
- Serverless can also mean applications where server-side logic is still written by the application developer, but, unlike traditional architectures:
- It’s run in stateless compute containers that are event-triggered.
- Ephemeral, which means they may only last for one invocation.
- Fully managed by a third party.
- One way to think of this is “Functions as a Service”.
Origin of Serverless
- The term “Serverless” is confusing since with such applications there are both server hardware and server processes running somewhere, but the difference compared to normal approaches is that the organization building and supporting a ‘Serverless’ application is not looking after that hardware or those processes.
- They are outsourcing this responsibility to someone else.
Benefits
- Reduced Operational Cost.
- Serverless is, at its most simple, an outsourcing solution.
- It allows you to pay someone to manage servers, databases and even application logic that you might otherwise manage yourself.
- Since you're using a predefined service that many other people will also be using we see an Economy of Scale effect.
- You pay less for your managed database because one vendor is running thousands of very similar databases.
- Reduced Development Cost.
- Since you don't need to implement many services that are available out of the box, you naturally save on your development costs.
- Any performance optimizations you make to your code will not only increase the speed of your app, but they’ll have a direct and immediate link to reduction in operational costs, subject to the granularity of your vendor’s charging scheme.
- Scaling Costs.
- One of the joys of Serverless FaaS is that horizontal scaling is completely automatic, elastic, and managed by the provider.
- The biggest benefit is that you only pay for the compute that you need.
- Easier Operational Management.
- Reduced Packaging and Deployment Complexity.
- Time to Market and Continuous Experimentation.
Drawbacks
- Vendor Control.
- With any outsourcing strategy you are giving up control of some of your system to a third-party vendor.
- Multitenancy Problems.
- Vendor Lock-in.
- It’s very likely that whatever Serverless features you’re using from one vendor will be implemented differently by another vendor.
- If you want to switch vendors you’ll almost certainly need to update your operational tools (deployment, monitoring, etc.), you’ll probably need to change your code, and you may even need to change your design or architecture if there are differences to how competing vendor implementations behave.
- Security Concerns.
- Each Serverless vendor that you use increases the number of different security implementations embraced by your ecosystem.
- If using a BaaS database directly from your mobile platforms you are losing the protective barrier a server-side application provides in a traditional application.
- While this is not a dealbreaker, it does require significant care in designing and developing your application.
- As your organization embraces FaaS you may experience a cambrian explosion of FaaS functions across your company.
- Each of those functions offers another vector for problems.
- Repetition of Logic Across Client Platforms.