Does serverless mean no servers?
Any program on the computer runs on the hardware, as well as serverless applications are run on the servers, but this part is not exposed to the developers and is self-managed by the vendors.
Components of the serverless application:
Serverless functions
Usually, serverless functions are single-purpose functions that imply your business and application logic. In simple words, it is just a code of your application which execute certain actions. Ideally, One function = one option execution, but sometimes developers use one function for several options.
Serverless backends
a term also known as a backend as a service. This unit allows dev teams shifting backend regular functions (data storage, authentication, messaging, etc.) to the cloud. Just integrate all needed backend services and options that are already provisioned by the cloud provider and set up its execution.
Deployment of the serverless applications seems easy. A developer creates a code - i.e. module/function, that executes a certain action. This function is provided to the cloud provider in a compressed or executable format. If any update is required, the only thing the developer has to do is to upload a new version and initiate the update. Along with this, the developer integrates pre-ready backend services with his serverless architecture. For example, data storage, notifications, analytics tools etc.
Even though serverless is one of the most growing approaches on building software architectures, it comes with some drawbacks:
- Higher latency compared to other architectures because of cold starts
- Debugging and observing is more difficult
- Deeper dependency on the FaaS vendor
Thus, a simple and basic serverless application would look like the figure below: