Before getting into detail, we should be careful and state a clear difference with microservices, and thus make the definition process of Serverless less painful: The architecture of microservices is the result of applying the “divide and rule” principle to avoid monolithic architecture, whereas Serverless appears with the idea to set and stop supplying servers regardless the low and mid-level management of infrastructure – and let the service provider on the cloud be in charge of it.
On some papers, we will find that Serverless is formally related to the term FaaS (Function as a service), in which the developer generates a group of lines of code that has only one functionality (obtain a register from a database or store a user, for instance). When generating code, it is exposed by means of some products, for example, among the ones that AWS provide, some examples are Route 53, Api Gateway and S3) supplied by the cloud and thus, the application is consumed by users. In this presentation of Amazon Web we can see how this architecture works.
Under the Serverless model the equipment is directly and exclusively focused on the functionality, the cloud will then be in charge of the way to expose the code, generate metrics and, furthermore, scale the product according to the existing demand, which represents an economy of the efforts carried out by the team. What’s more, normally, the payment model is only focused on paying the processing cost of servers of the cloud and the amount of received queries.