Azure Functions is a serverless compute service that lets you execute code in the cloud in response to a pre-defined trigger or an event without having to worry about the infrastructure or running a complete application. Functions when used effectively can make the development productive as it supports many languages like C#, Java, JavaScript, Python etc.., This allows the developers to write solutions based on requirement for example a complete application built with Java Backend can be complimented with JavaScript or Python built functions which execute simple piece of code like sending an email in response to an event or execute a periodic job that backs up the master database for archival. This piece of code scales automatically on the cloud and you pay based on consumption in the form of millisecond execution time. This reduces the overall cost and removes the overhead of this functionality from the main application. Functions can also be integrated with OAuth providers like Azure AD, Facebook, Google, Twitter and Microsoft Account.
Azure Functions

Azure Function Triggers
Durable Functions
It is an extension to Azure Functions which can help us perform stateful execution of code in a serverless compute environment. The extension lets us define stateful workflows with a definite input and output by writing orchestrator functions and stateful entities using the Azure programming model. Azure manages everything behind the scenes like extension states, checkpoints and restarts allowing the developers to focus only on the logic. This is synonymous to Step Functions in AWS.
Commonly used Application Patterns for Durable Functions:
Function Chaining

As can be seen in the above image, we can chain Functions to execute in specific order concisely. Here, the output of one function is acting as an input to the subsequent function. We also have the flexibility to implement control flows by using imperative coding constructs. Control flow semantics like conditionals and loops, try/catch and finally blocks can be implemented in this pattern.
Fan-Out / Fan-In
In this pattern, we executed multiple functions in parallel and then wait for all the functions to finish. Often, some aggregation work is done on the results that are returned from the functions. Fan Out can be easily achieved by sending out multiple messages to a single queue. Fan In can be challenging in a normal function as we need to write the code to track when queue triggered functions end and store their output.
