Download presentation
Presentation is loading. Please wait.
Published byTeodoro Moroni Modified over 5 years ago
1
Alex Karcher 5 tips for production ready Azure Functions
Program manager – Microsoft 5 tips for production ready Azure Functions
2
Common Architecture Patterns
Serverless APIs Mobile / Web backends Event and Stream Processing IoT event and data processing Big data and machine learning pipelines Integration and Enterprise Service Bus Connecting line-of-business systems Pub/Sub for business events Automation and Digital Transformation Process automation
3
Tip 1: Serverless APIs and HTTP
HaveiBeenPwnd, Quest, Starbucks
4
Sample synchronous serverless architecture
Cosmos DB API Management (primary) Traffic Manager API Management (secondary) Cosmos DB
5
Azure Functions “Behind the scenes”
HTTP Request HTTP Response
6
Functions “Behind the scenes”
Azure Infrastructure Functions Instance Azure Functions Runtime HTTP Request Azure Functions (App Services) HTTP Front-end Functions Instance HTTP Response Azure Functions Runtime Scale Controller Functions Instance Azure Functions Runtime
7
Scalability Considerations
The “Scale Controller” determines how many instances are actively doing work For Event Hub, Queue, Service Bus the scale controller can assess message backlog length and burndown rate to scale For HTTP functions today looks at request queue for each instance The “host.json” config file allows you to set instance limits for concurrency at an instance level Other knobs are to turn off file-system logging, and not include a dashboard storage account
8
Your App in Concept
9
Your app with long cold start
10
Your app with one pre-warmed instance
11
Scale out settings
12
Your app with one pre-warmed instance
Minimum Plan Size
13
Your app with a 3 instance min plan size
Minimum Plan Size
14
Tip 2: Event Stream Processing
Starbucks, Honeywell, Walmart
15
Sample synchronous serverless architecture
Cosmos DB Devices and Clients Event / IoT Hubs
16
Event Stream Processing: Scaling
Starbucks, Honeywell, Walmart
17
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Cosmos DB
18
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Partition 2 Cosmos DB Partition 3 Partition 4
19
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Partition 2 Cosmos DB Partition 3 Partition 4
20
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Device 2 Partition 2 Cosmos DB Device 3 Partition 3 Device 4 Partition 4
21
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Device 2 Partition 2 Cosmos DB Device 3 Partition 3 Device 4 Partition 4 Device 5
22
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Device 2 Partition 2 Cosmos DB Device 3 Partition 3 Device 4 Partition 4 Device 5
23
Sample synchronous serverless architecture
Devices and Clients Event / IoT Hubs Function Instances Device 1 Partition 1 Device 2 Partition 2 Cosmos DB Device 3 Partition 3 Device 4 Partition 4 Device 5
24
Scalability Considerations
This is a bread-and-butter serverless scenario – elastic growth Process messages in a batch (`EventData[]`) – “cardinality: many” Only one active instance per partition You can guarantee ordering with Event Hubs You must handle exceptions yourself. No deadletter queue Messaging choices: Event Hubs – high scale, high throughput, ordering is preserved Service Bus Queues / Topics – ”never lose a message”, ordering via sessions. Good for high variable workloads Storage Queues – inexpensive, less “enterprise” and message broker features Event Grid – send an ”event” out, any subscribers can get poked to be alerted. No ordering, no transnationality
25
TIP 3 - EventHub Scale Options
Add partitions You can raise beyond 32 by contacting support 🤫 Increase Functions instance size Premium Plan
26
Inner and Outer Loop Development
Build and Test (CI) Deploy (CD) Run (Prod) Inner Loop Code Run Debug Source Control Monitoring and Diagnostics
27
Inner and Outer Loop Development
Build and Test (CI) Deploy (CD) Run (Prod) Inner Loop Code Run Debug Source Control Monitoring and Diagnostics
28
Tip 4: Azure DevOps for CI/CD
29
Dev Ops GA of Functions Build task New streamlined CLI command
11/17/2019 2:03 PM Dev Ops GA of Functions Build task Easily add Functions to a CI/CD pipeline New streamlined CLI command az functionapp devops-pipeline create Automatically configures DevOps to build with new commits to your version control Configures Github or Azure Repos automatically aka.ms/functions-azure-devops © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
30
Inner and Outer Loop Development
Build and Test (CI) Deploy (CD) Run (Prod) Inner Loop Code Run Debug Source Control Monitoring and Diagnostics
31
Tip 5: Monitoring Gain real-time observability
Analyze and debug traces and metrics View dependencies and relationships with AppMap Application Insights Optional: demo of app map © Microsoft Corporation. All rights reserved.
32
Application Map
33
Distributed Tracing
34
Alex Karcher 5 tips for production ready Azure Functions
Product manager – Microsoft 5 tips for production ready Azure Functions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.