Azure Functions
Categories:
2 minute read
Serverless computing
Azure Functions is based on the serverless computing model, which means you don’t need to worry about managing the underlying infrastructure, such as servers and networking components. Instead, you can focus on writing your code, and Azure takes care of the rest, including scaling, patching, and resource allocation.
Event-driven
Functions are designed to be event-driven, meaning they execute in response to specific events or triggers. This allows you to create highly responsive and efficient applications that only consume resources when needed.
Triggers
A trigger is an event that causes a function to execute. Azure Functions supports various triggers, such as HTTP, timers, message queues, and more. Each function can have only one trigger associated with it.
Trigger | Explanation |
---|---|
HTTP | Recieves an HTTP request |
Timer | Scheduled |
Azure Queue Storage | Message is added |
Service Bus Queue | Message is added |
Service Bus Topic | Message is added |
Blob Storage | Blob is added |
Event Hub | Recives a new event |
Bindings
Bindings are a way to connect your function to other services and resources without having to write complex code. They allow you to easily read and write data from various sources, such as databases, file storage, and message queues. There are input bindings (read data) and output bindings (write data).
Function App
A function app is a container that hosts one or more functions. It provides the environment, runtime, and scaling settings for all the functions it contains. Function apps can be grouped by functionality, project, or any other organizational structure.
Language support
Azure Functions supports a variety of programming languages, including C#, JavaScript, Python, Java, and PowerShell. This makes it easy for developers with different backgrounds to work with Azure Functions.
Scalability
Azure Functions automatically scales based on the workload. When there’s an increase in demand, more instances of a function are created to handle the load. Conversely, when demand decreases, instances are removed to save resources.
Pricing
Azure Functions uses a pay-as-you-go pricing model, meaning you only pay for the compute resources you actually consume. There’s also a free tier, allowing you to experiment and build small applications without incurring costs.