Lesson content
Read, practise, then check your understanding
Serverless: Functions and Logic Apps
Azure Functions runs event-triggered code and integrates through triggers and bindings. Azure Logic Apps models integration workflows as triggers, conditions, loops, connectors, and actions. Functions fits custom code; Logic Apps fits visible orchestration and connector-rich processes.
Core ideas
- One trigger starts a function, while input and output bindings reduce integration boilerplate.
- Function hosting plans differ in scaling, networking, startup, duration, and billing behavior.
- Logic Apps connectors authenticate to Azure, Microsoft, SaaS, and enterprise systems.
- Retries and at-least-once delivery require idempotent business operations.
Design and operating model
Select the entry event, validate its contract, authenticate with managed identity, and define retry, timeout, concurrency, and poison-message handling. Separate orchestration from pure business logic. Store workflow state durably and correlate each execution across functions, queues, APIs, and external connectors.
Example
const { app } = require('@azure/functions');
app.http('hello', {
methods: ['GET'],
authLevel: 'function',
handler: async (request, context) => {
const name = request.query.get('name') ?? 'learner';
context.log('Greeting request', { name });
return { jsonBody: { message: `Hello, ${name}` } };
}
});
Run examples in a disposable training subscription. Replace names, Regions, identifiers, scopes, sizes, and policies with reviewed values, and confirm current Azure CLI and service requirements before production use.
Production guidance
- Use managed identity and Key Vault; never store connector or application secrets in source.
- Load-test scale behavior and protect downstream systems with concurrency and rate limits.
- Capture execution history, structured logs, metrics, traces, and dead-letter diagnostics.
The chapter quiz follows the lesson and checks both service vocabulary and architecture decisions.
Knowledge check
Answer every question correctly to complete this chapter.
0 of 10 checks passed
Your progress is saved on this device.