Serverless applications
In the world of cloud computing, in order to better understand public cloud services such as Microsoft Azure, it is necessary to understand the shared responsibility model and distinguish between what will be managed by the cloud provider and the tasks that are your responsibility to manage.
Workload responsibilities vary depending on the workload. These workloads can be hosted as Software as a Service (SaaS), Platform as a Service (PaaS), Infrastructure as a Service (IaaS), or in an on-premises data center. What is interesting about cloud providers is that they provide the infrastructure required to run applications for the users. Cloud providers support the execution of the servers deployed to the dynamic management of the resources of the machine. These machines can be scaled according to the runtime load.
The user focuses only on the development and deployment of applications.
Serverless computing, also known as Function as a Service (FaaS), is a cloud-native development model that allows developers to build and run applications without having to manage servers. Serverless computing allows developers to only write the code, while the backend infrastructure is managed by the cloud provider. Developers can write multiple functions in order to implement business logic in an application, and then all these functions can be easily integrated to communicate with each other. Applications using this pattern are said to be using serverless architecture.
Microservices and serverless are two major concepts in cloud computing today.
Serverless architecture is a very commonly implemented aspect of microservices architecture. In microservices architecture, the application is broken down into small independent pieces and each one has its own task to fulfill. Deployment and management of microservices are widely used in a serverless model.
In a serverless model, application code is executed on demand in response to pre-configured triggers by the application developer. However, the benefits of building applications from microservices are perhaps most apparent when the application is hosted in the cloud using serverless architecture.
For most use cases, code is executed in stateless containers. Code execution can be triggered by different events, such as sending HTTP requests, database events, and queuing services. Meanwhile, in the application, we can trigger monitoring alerts, or even initiate file downloads and scheduled events (as in the case of cron jobs).
FaaS is a subset of serverless computing, focusing on event-driven triggers where code is executed in response to events or requests.
The use of serverless computing improves developer productivity and reduces the time required to release and deliver new applications to the market. However, along with the benefits of serverless computing, challenges also present themselves in the difficulty of monitoring and maintaining serverless applications. Consideration should also be given to the security issues around serverless architecture, such as the need to analyze short-lived functions in order to scan for vulnerabilities and prevent code injection.