Azure Serverless Architecture:
Serverless architecture is also known as Serverless Computing or Function as a Service(FaaS)/Backend as a Service(BaaS) depending on its utility.
Backend as a service (BaaS): The back-end cloud services (databases and storage) provide client applications with the APIs to connect directly to their services.
Functions as a service (FaaS): A function is a piece of code that is deployed on the cloud and is being run on a hosting environment, hence providing a layer of abstraction from the server running that code.
The serverless applications are hosted by Microsoft Azure. This eliminates the need for server software/hardware management by the developer. These applications are broken up into separate individual functions which can be invoked and scaled individually, rather than doing this at the entire application level. The physical hardware concerns, management of the operating system, and the web server software processes are done by Microsoft Azure.
PaaS (Platform as a Service) and Serverless/FaaS(Function as a Service) offer similar benefits but with a major difference in the way the application is composed and deployed, which in turn affects the scalability, as in PaaS the application is deployed as a single unit using a web framework, and hence the scaling is done only at the application level. But in FaaS, the application is composed of individual autonomous functions. These functions can be scaled individually depending on the frequency of function call.
This also makes it more cost-effective as it only charges for the number of times the functions are called and the computation resources, which are quite less as compared to the payment for the whole application.
The serverless approach presents a level of abstraction and also lessens the time or resource invested in physical infrastructure management. It benefits every component of the application like computing, databases engine, AI, analytics, and messaging. When we use an end-to-end serverless platform, it also provides a set of various serverless technologies to gain the maximum benefit from it.
Azure Serverless Applications and Azure Portal offer a variety of featured components like :
- Azure Storage
- Logic Apps
- Messaging & Queuing
Advantages of Azure:
- Dynamic Scalability
The infrastructure dynamically scales up or down depending on the workload just in a matter of seconds.
- Faster time to Market
The serverless applications minimize the operational dependency on the development cycle which increases development team agility to deliver more output in a lesser span of time.
- No Infrastructure management
This helps to concentrate solely on the development and not on the administrative tasks.
- More Efficient Use of resources
As there is no dependency on infrastructure, it reduces the total cost as we do not have to manage the resources and it does not hamper the pace of our innovation.
Azure Application patterns:
These serverless applications can be built using a variety of application patterns. These patterns are mostly similar to the familiar approach and can be used to meet specific requirements and business needs. The following are the various patterns offered by Azure:
- Azure Serverless Functions
Azure Serverless functions use an event-driven model approach with triggers that executes the code to respond to events and bindings to integrate the services. It is being charged as per pay-per-execution, that is you are being charged only for the time and resources being used to execute the code. They are available as a managed service in Azure and Azure Stack. They can also work on multiple destinations like Kubernetes, Azure IoT Edge, and on-premises.
It also provides a lot of automation benefits like PowerShell support in Azure Functions.
- Azure Serverless Kubernetes
Kubernetes-orchestrated clusters manage the whole containers provided by the developers and automatically scale (up/down) the application depending on the sudden changes in the incoming traffic. We can produce serverless, Kubernetes-based applications using the orchestration capabilities of Azure Kubernetes Service (AKS) and AKS virtual nodes, which is based on the open-source Virtual Kubelet project. With Continuous Integration/ Continuous Delivery, it really makes the development easy as you can achieve replicable, manageable clusters of containers.
- Azure Serverless Workflows
These workflows contain a No-code/low-code approach. This is a workflow of combined tasks, where developers maintain APIs or just the executable code with minimal specifications. You can also plan and coordinate a long-running workflow as a set of activities using Durable functions which are an extension of Azure Functions.
- Azure Serverless Application Environments
Serverless Application Environment means that the whole application (backend as well as frontend both) is hosted entirely on Azure App Service, which is a high-productivity, fully managed environment. These services handle security, compliance and scalability requirements.
- Azure Serverless API Gateway
The Azure serverless API gateway or API facade in the Azure Portal is a fully managed centralized entry point for all serverless backend services, either running on Azure(App Service or Azure Kubernetes Service) or hosted outside of Azure. So the developers just need to publish, secure, analyze, and manage the APIs at a global level with Azure API Management.
The open-source serverless Azure Functions plugin extends the benefits of Serverless Framework to Azure services. It allows you to create, configure, manage and deploy the serverless applications built with the use of Azure Functions and Azure API Management, and can also be operated with easy integration with multi-cloud solutions for building and operating serverless applications.