HTTP Triggered Azure Functions

HTTP Triggered Azure Functions

Preface

This article of getting accustomed to serverless functions will help a developer to learn what Azure functions are, how to create an Azure function from Visual Studio, publish and test the function on Azure. The article will also teach how to debug a published Azure function from Visual Studio.

Introduction

With the latest situation of the serverless Azure story, Azure Functions can now be developed in Visual Studio, just like any other. NET project type. This means we can use the familiar and powerful features and workflows of Visual Studio when developing Azure Functions. We can write, unit test, and debug function code locally before publishing it up to the cloud. The purpose of this article is to cover the concept of Azure functions i.e. the serverless functions or precompiled functions supported by Azure.

In this two-article series of learning Azure Functions, we’ll cover we’re going to be learning how to get started with Azure Functions in Visual Studio, we’ll get a high-level overview of Azure Functions, and have a look at the Visual Studio development environment. We’ll be creating a new Azure Function in our Function project, we’ll learn how we can run this function on our local development machine, and how we can publish it to Azure right from within Visual Studio. Once we’ve learned how to create a basic function, in the following article, we’ll learn how we can create precompiled functions that work with the different Azure storage features, such as Blobs and Queues.

Azure

Azure is a cloud platform from Microsoft and provides numerous resources in context on cloud computing. One of the resource is virtual machine i.e. a fully functional machine of your choice with the choice of your configurations and operating system could be created within seconds with just a few clicks and you can access the machine remotely from anywhere with your secure credentials and do whatever you want for e.g. hosting your web site, developing applications, creating production or test environment for your software, etc. Let’s see step by step how we can achieve that.

No alt text provided for this image

Azure Functions and Serverless Computing

Talking about the definitions from here,

“Azure Functions is the serverless computing service hosted on the Microsoft Azure public cloud. Azure Functions, and serverless computing, in general, is designed to accelerate and simplify application development.”

The first thing to note about Azure Functions is that they operate in a fully-managed environment. Essentially what this means is that we don’t have to go and create or manage virtual machines. Microsoft provides and provisions all the underlying hardware that our Azure Functions are based on. One of the benefits of this is that it gives us high reliability because we don’t have to manually manage the underlying infrastructure. Another benefit is that we don’t have to worry about going and applying security patches to the underlying infrastructure. Microsoft will take care of this for us. It is, however, up to us to ensure that the systems that we’re building on top of Azure Functions are appropriately secured and managed. Another benefit of this fully- managed environment is that it gives us automatic scaling. The Azure Functions platform will automatically scale our functions out to deal with variations in incoming request volume. If we’re executing our Azure Functions on the Consumption plan, then we’re only going to pay when the functions are executed. Another benefit of Azure Functions is that we need to write less boilerplate code, and one of the reasons for this is that our Azure Functions can easily integrate with a range of Azure services. For example, integrating our function with Azure Blob storage is as simple as configuring the correct attributes on our C# code. Read more...


要查看或添加评论,请登录

Akhil Mittal的更多文章

社区洞察

其他会员也浏览了