Server-Less Architecture In Azure

 

Server-less architecture is event-driven stateless compute containers that are heavily relied on third party services. These third-party services are known as Backend as a Service (BaaS) or Mobile Backend as a Service (MBasS) or custom code that's run in ephemeral containers (Function as a Service or "FaaS"). For example, you developed a mobile app whose backend and database system is not designed by you but you used a ready to be deployed backend system like parse or firebase.

The term serverless may be confusing. The application has a server hardware and server process which running somewhere else and managed by third-party vendors. Serverless in this scenario that the organization is not looking for hardware and the server-side code itself.

If you would like to become a Microsoft Azure certified professional, then visit Mindmajix - A Global online training platform: “Azure Training”  Course.  This course will help you to achieve excellence in this domain.

Let's see an example of an eCommerce app. 

Traditional Azure Architecture:

Traditional ArchitectureServer-less Architecture:

 

Server-less architecture

Description:

In serverless architecture instead of writing our own authentication logic and managing the data, we use a third-party service like Facebook or Google authentication.

Use a third-party database as a service product in cloud-like firebase or amazon dynamo DB or azure cosmos DB to create our product database.

Use a cloud search functionality inside your application to allow users to search and discover products.
An event-driven purchase function that writes successful purchase to a purchase database.

Microsoft Azure Tutorials

Evolution of Serverless Computing:

Server-less computing supports multiple languages and abstracts the underlying infrastructure from the developer so that they can focus on building the business logic and rich user experience. Resources are charged for the time they are being used. In serverless applications are broken into small specific core components.

Traditional Architecture
Server-Less Architecture

Serverless computing came after the penetration of cloud computing into development. Serverless computing eliminates the hassle of setting up a server, database, and server-side code writing. Instead, we have APIs we use for interacting with the database and servers.

In the cloud and with a third party BaaS provider we can have a lot of connectors and predefined functions so the developer needs not write their own code to connect with services. Instead, they write functions that trigger in response to an event. 

These functions are evolved as Function as a Service (FaaS). AWS Lambda and Azure Functions are two top Server-less architecture.

MindMajix Youtube Channel

Server-less Computing in Microsoft Azure:

Azure Functions is a serverless architecture inside the Microsoft Azure cloud computing platform. It allows writing a small piece of code (function) in any supported programming language like PHP, JavaScript, bash, C#, etc and runs them inside a container.

Azure functions app can connect into azure cosmos DB storage and external applications like sendgrid, dropbox, etc. through connectors.

Azure Functions

Azure Server-less function app stack: 

                     Azure Server-less Functions 

In server-less stack, functions are bound to specific events and triggered when necessary. Example events are

  • HTTP / HTTPS Request
  • Message Queue Trigger
  • File / Storage Trigger
  • Timer / Schedule
Azure Functions

Performance of Server-less architecture:

Server-less computing abstracts the underlying infrastructure from the developer so the developer can focus on building the business logic. The performance of server-less computing depends on the configuration and client-side logic and performance of third-party connectors.

Azure service plans and data center regions also affect the scalability of function apps.

Azure Interview Questions

Below are the performance figures of Azure Serverless architecture:

  • Scalability:  Manual Scaling in App Service plan and Auto Scaling in Consumption plan
  • Maximum numbers of function:  Unlimited functions
  • Concurrent executions: No limit
  • Max Execution: 300 Seconds
  • Supported language: C#, JavaScript, F#, Python, Batch, PHP, PowerShell
  • Dependencies: Nuget, npm
  • Deployment slots: Visual Studio Team Services, OneDrive, Local Git repository, GitHub, Bitbucket, Dropbox, External repository
  • Environment variables: App settings and ConnectionStrings from App Services
  • Versioning: Cloud Source, Branch/Tag
  • Events: Blob, EventHub, Generic WebHook, GitHub WebHook, Queue, Http, ServiceBus Queue, Service Bus Topic, Timer triggers
  • HTTP(S) invocation: HTTP(S) Trigger
  • Orchestration logging: Azure Logic Apps
  • Monitoring: App Service Monitoring and Application Insights.

Advantage of Server-less Architecture:

Pay for what you use: in server-less computing you only pay for the runtime usage and resource consumption of your function. You do not need to pay for idle resources. 

Scalability: In server-less computing the backend service provider will scale the infrastructure according to load. Developers are no need to write code for scalability or make any provision for  resource allocation.

Rapid Development and Iteration: In server-less computing each functions are single threaded. single threaded functions make debugging easy and deployment easier. The development team are no longer dependent on IT team and deployment happens directly from codebase. CI and CD makes rapid development fast.

Less System Administration: In server-less computing servers are managed by the third party service provides. Developers need not manage and provision servers and infrastructures. No patching and server updates.

Developer Productivity: As the underlying infrastructure is abstracted from developer, they can focus on writing the efficient business logic.

Server-less computing decreases the complexity of the application thus making deployment easier.

Azure functions:

Azure Functions is a serverless architecture inside the Microsoft Azure cloud computing platform. It allows writing a small piece of code (function) in any supported programming language like PHP, JavaScript, bash, C#, etc and run them inside a container.

Azure functions app can connect into azure cosmos DB storage and external applications like sendgrid, dropbox, etc. through connectors.

Azure functions are event-driven and can perform multiple tasks like

  1. Time-based processing - Azure functions support event-based processing. It makes time-based processing easy and a function can be written to perform a job in a specific time interval.
  2. Azure service event processing - We can write a function app that detects azure service event like reading a log file in a storage blog, transform it into SQL database, and send a notification to the user.
  3. SaaS event processing - SaaS event processing like saving a file to one drive from an email attachment or sending a mail when a new file is added.
  4. Web and mobile application backend - Azure functions can power application backend based on user data and events triggered.
  5. Real-time stream processing - Azure stream analytics can receive a message from the Internet of things devices and then process them to create records on SQL azure tables. these records are used to apply analytics on the internet of things data.
  6. Real-time bot messaging - Azure functions can be integrated with azure bot framework to process a bot behavior using a webhook.

Related Article: Azure Stack - Cloud Services

Advantages:

  • Azure Functions are cheaper as compare to other cloud provider’s server-less stack. Azure Functions are only billed for the active consumptions of resources. Cost is based on execution time and memory usage for each function invocation.
  • Azure Functions are simpler and contain less amount of codes. These are single-threaded and easy to debug.
  • Azure Functions are scalable with very minimal configuration.
  • Azure Functions have no limit on the number of functions you can write per project and supports multiple languages than another cloud.

Disadvantage:

  • Vendor lock-in is a common problem in azure functions serverless computing. The vendor will have complete control of the run time environment.
  • Migrating Azure function code to another environment is difficult and often you have to write the code from scratch.
  • Testing and authoring of azure functions outside the azure portal are difficult.

Logic Apps:

Logic apps are managed services that let developers create business apps without writing code. Logic apps provide a building block based on IFTTT (If this then that). Logic apps provide connectors to integrate other third-party services like twitter, sendgrid, dropbox, etc. It is used to automate the workflows and write a custom application for business. 

Related Article:  Azure Analysis Services

Applications, data, and devices can be connected in the cloud or in an on-premises environment with creating logic apps that perform simple automated tasks like saving an attachment to one drive from outlook or send an email when a new tweet is created.

Logic apps perform an action based on an event or control flow. Azure portal has thousands of predefined templates and connectors to create Logic apps.

Advantage:

  • The logic apps have no upfront or ongoing costs. Logic apps are charged for only resource consumption and hence the cheaper solution.
  • Logic apps require no coding and with a lot of connectors available, it is very easy to write and deploy logic apps.
  • You can create your custom connector with REST API.
  • Logic apps provide inbuilt diagnoses and monitoring each logic app at each step.
  • Logic apps also support continuous integration and continuous deployment.

Disadvantage:

  • Not easy to retrieve information if something goes wrong
  • Formatting data in the web viewer
  • Logic apps are still in preview mode.

Azure Service Fabric:

Azure Service Fabric is a distributed systems platform for packaging, deploying and managing microservice that are scalable and reliable. Service fabric also used for native cloud application development.

Service fabric Services includes:

  • The failover manager ensures availability by shifting resources within the cluster including when resources are added or removed.
  • The cluster manager interacts with the Failover manager to ensure application and service constraints are not violated.
  • Naming Service provides name resolution services to ensure all services within the application are accessible.  Since the workloads are dynamic, client applications are not expected to understand what underlying infrastructure is supporting a particular service.  The Naming Service will facilitate routing between clients and the underlying service.
  • Filestore service provides local data and assembly persistence across nodes in the service.
Azure Service Fabric

In-Service Fabric application can be deployed in two ways.

  1. Stateless
  2. Stateful

Application Life Cycle Management in Service Fabric:

Service Fabric supports application life cycle management, continuous integration and continuous deployment of cloud applications and containers. 

Service Fabric can be integrated with CI/CD tools like Visual Studio Team Services, Jenkins, and Octopus Deploy.

Service Fabric enables simpler application administration, monitoring and patch update. Most applications contain both stateless and stateful microservices and service fabric enables the deployment of multiple instances of the application along with the container and run-time stack.

Related Article: Azure Monitor

Benefits of Service Fabric:

  • Using service fabric, we can deploy our applications in the azure or on-premises data centers without any code changes. 
  • Service fabric programming model and containers allow developers to write scalable apps that are composed of microservices.
  • Service fabric simplifies the application design and assures high availability
  • Manage the lifecycle of your applications without any downtime, including breaking and nonbreaking upgrades.
  • Scale-out or scale in the number of nodes in a cluster. As you scale nodes, your applications automatically scale.
  • Monitor and diagnose the health of your applications and set policies for performing automatic repairs.
  • Service fabric can be run in Linux and supports multiple languages.

Disadvantage:

  • You have to pay extra for using service fabric.

Azure Batch:

Azure Batch is a platform service for running large-scale parallel and high-performance computing (HPC) applications efficiently in the cloud. It schedules high compute-intensive workloads to be performed on a managed collection of virtual machines. It can automatically scale up or scale down resources as required.

Azure batch automates the job. We can easily define compute resources to execute the application in parallel. It is managed service for batch processing of a high volume of data.

Azure Batch

Related Article: A Complete Guide On Microsoft Azure Batch

Example: Video file transcoding.

Let assume we have to transcode large numbers of video files. We upload and configure our application in azure batch. 

  • Upload the input video files to the Azure storage account.

  • Create a Batch pool of compute nodes in your Batch account with properties such as node size, Operating system, and location of the storage account.

  • Create a Batch job to run the workload on the pool of compute nodes and associate it with a Batch pool.

  • Add tasks to the job

  • As the tasks run, you can query Batch to monitor the progress of the job and its tasks.

  • As the tasks complete, they can upload their result data to Azure Storage. You can also retrieve files directly from the file system on a compute node.

  • When your monitoring detects that the tasks in your job have completed, your client application or service can download the output data for further processing or evaluation.

Advantage:

  • High performance and highly scalable

  • Fully managed service

  • You only pay for the resources you use

  • Azure batch supports Windows and Linux

Disadvantage:

  • Requires platform expertise in setting up tasks

  • More programmatically and less tooling.

Explore Microsoft Azure Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download Now!

 

Azure Server-Less Architecture Overview - Infographics

Azure Server-Less Architecture Overview - Infograpgics

 

If you are interested to learn Azure and build a career in Cloud Computing? Then check out our Microsoft Azure Certification Training Course at your near Cities

Microsoft Azure Course BangaloreMicrosoft Azure Course HyderabadMicrosoft Azure Course PuneMicrosoft Azure Course DelhiMicrosoft Azure Course ChennaiMicrosoft Azure Course NewyorkMicrosoft Azure Course WashingtonMicrosoft Azure Course DallasMicrosoft Azure Course Maryland, Microsoft Azure Training VirginaMicrosoft Azure Training Pennsylveina

These courses are incorporated with Live instructor-led training, Industry Use cases, and hands-on live projects. This training program will make you an expert in Microsoft Azure and help you to achieve your dream job.

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
Azure TrainingNov 19 to Dec 04View Details
Azure TrainingNov 23 to Dec 08View Details
Azure TrainingNov 26 to Dec 11View Details
Azure TrainingNov 30 to Dec 15View Details
Last updated: 03 Apr 2023
About Author

Anji Velagana is working as a Digital Marketing Analyst and Content Contributor for Mindmajix. He writes about various platforms like Servicenow, Business analysis,  Performance testing, Mulesoft, Oracle Exadata, Azure, and few other courses. Contact him via anjivelagana@gmail.com and LinkedIn.

read less
  1. Share:
Microsoft Azure Articles