Azure functions are based on a serverless execution model (it is the equivalent of Amazon Lambda) and extend the concept of a PaaS (which abstracts from the infrastructure details and facilitates auto-scaling). In addition, serverless has a pay-per-execution system.
In summary, the benefits of Serverless are as follows:
- Automatic scaling
- Reduction of time to market
- Agile deployment
- Pay-per-use
(Gartner) "Serverless architectures enable developers to focus on what they should be doing –writing code and optimizing application design– making way for business agility and digital experimentation."
In general, we want to solve scenarios where we want data processing to react to "events;" also, we want to pay only for the resources that are consumed. Data processing can be triggered as a cron, or react to a trigger. There are different types of triggers (e.g.:Timer, Queue, Blob Storage, etc).
For more information, see Azure Functions triggers and binding concepts.
They are timed functions. One possible scenario is updating the merchandise stock, or updating the redundancies of a DB.
They are not suitable for long-running batch procedures.
- Install the requirements in the machine where you will run the deployment: you just need Azure CLI (version 2.12.1 or higher).
- Create a Deployment Unit object with only one main procedure. Procedures have nothing particular in their logic, except considering the parameters they receive according to the function trigger.
Note: In the case of Timer-triggered functions, the procedure receives no parameters.
- Use the Application Deployment tool to select the target of the Azure functions.
- Configure the properties in the property grid.

When the function is published on an existing function app, the function is updated.
The behavior of all functions within the App function can be configured globally. This is done in the host.json file. For example, in that file, you can configure the trace level for the app, Health Monitor, etc.
Azure functions have a default timeout, which can also be changed at the host.json file.
The GeneXus user has to manage this file. The Application Deployment Tool uploads one with the basic settings, but if you want to use another you can edit it and add it to the deployment unit.
{
"version": "2.0",
"logging": {
"fileLoggingMode": "always",
"logLevel": {
"default": "Trace",
"Host.Results": "Trace",
"Function": "Trace",
"Host.Aggregator": "Trace"
},
"applicationInsights": {
"samplingExcludedTypes": "Request",
"samplingSettings": {
"isEnabled": true
}
}
}
}
When publishing in the Linux Operating System, if the Function app is down, it throws the following error:
Error publishing to Azure Functions: ServiceError: Operation returned an invalid status code 'Bad Request'
Failed: Deploy Application
In GeneXus Beta Channel.
- For now, it is possible to publish only one function at a time.
- Only Timer-Triggered functions are supported.
HowTo: Monitor Azure functions
|