This presentation was done to a group of university undergraduates, giving them an introduction into Azure cloud platform and Serverless in Azure. Introducing the Azure serverless offerings with light details about Azure Logic Apps, Azure Event Grids and Diving into details about Azure Functions.
Serverless in the Azure World: Event-Driven Apps with Functions and Logic Apps
1. Serverless in the Azure World
Kasun Kodagoda
Technical Lead | 99X Technology
https://kasunkodagoda.com
2. I am, Kasun Kodagoda
• In ♥ with Azure & Azure DevOps
• Active Blogger – https://kasunkodagoda.com
• Open Source Contributor - https://github.com/kasunkv
• Technical Lead
I Work For,
• Established in 2004
• Headquartered in Sri Lanka with offices in
Europe and Australia
• Providing high quality, high value Software
Product Engineering + R&D services
3. What is Azure?
• A complete cloud platform
• Host existing applications/services
• Host new applications/services
• Enhance On-Premise applications/services
• Easy to Scale
• High availability
• Easily manageable services
• Many ways to manage Azure Services
• Including the Azure Portal, CLI, REST APIs etc.
4. Types of Azure Services
Infrastructure as a Service
(IaaS)
Platform as a Service
(PaaS)
Serverless
Customer Managed Platform Managed Code Only
5. Catalog of Azure Services
Compute Networking Web & Mobile IoT & Enterprise Integration
Development Services Intelligence & Analytics Databases Storage
Monitoring & ManagementSecurity & Identity
6. Azure Regions
• Azure is a global cloud platform
• Available in many geographical regions
• Create your resources in any region
• Run your apps closer to your customers
• Conform to legal requirements
• High availability with multi-region apps
Not all resources are available in all regions
10. Azure Logic Apps
• Great for workflow automation
• Business workflows
• Operations workflows
• Designer First Experience
• Visually design workflows, No coding needed
• If you want, you can use JSON to code your logic apps
• Hundreds of Connectors at your disposal
• Integrate, Interact with enterprise services
• Triggers and Actions
• Create custom connectors if you want
11. Azure Logic Apps
• Pay-As-You-Go Pricing Model
• Pay for only what you use
• Different pricing for each connector types (e.g. Standard, Enterprise)
• Fixed Pricing Model
• Integrated Service Environments (ISE)
• Fixed monthly prices
• Different ISE tiers to select from
13. Azure Event Grids
• Great for Event-Based applications
• Serverless event routing
• Reacting to events from Azure Resources, Customer event publishers etc.
• Event Sources
• Where the events happen
• E.g. Blob storage, Azure Maps, Resource Groups etc.
• Event Handlers
• Where the event is sent by event grids
• E.g. Azure Functions, Logic Apps, Azure Automation etc.
14. Azure Event Grids
• Simple to use
• Point and click to send events from your azure resource to handlers
• Advanced Filtering capabilities
• Select which event types go to what event handler
• Reliable service
• Exponential back-off up to 24hr to make sure events are delivered
• Can handle high volume of events
• Pay-Per Event
• Pay-as-you-go model
• 100,000 operations free
18. Azure Functions
• Simplified Programming Model
- Write the code to respond to an event
- No need to write setup code
- Write code for only what you need to do
- Focus on the business logic
• New Pricing Model
- Pay only for what you use, No more
- If you are not using, you are not paying
- Consumption Plan
- Pay as you Go
- App Service Plan
- Use Already existing App Service Plan
19. Azure Functions
• Consumption Plan
- Pay as you Go
- Uses 2 metrics to measure resource usage
- Number of Executions
- CPU Time x RAM Usage (Giga Byte Seconds GB-s)
- CPU Time in seconds (s)
- RAM Usage in Giga Bytes (GB)
- Free monthly grant provided
- 1 Million Executions
- 400,000 GB-s
* Function execution is limited for 5 minutes for execution. You can also set daily quota in GB-s
20. Azure Functions
• App Service Plan
- Already existing App Service Plan
- Dedicated Pricing Model for Functions
- Predictable monthly cost
- E.g. If you already have powerful VMs
- Run like normal Web or API App
* Does NOT have the 5minute execution limitation.
21. Azure Functions
• Triggers
- Defines the invocation of the function
- Must have exactly one trigger
- A trigger has some associated date with it
- Remember, Events + Data
- Contains the payload that triggered the functions
- Easy to configure triggers
- Use the UI provided in the portal
- Update the functions.json file manually
22. Azure Functions
• Bindings
- Means of connecting to data from the code
- 2 types of bindings
- Input Bindings
- Output Bindings
- Bindings are optional
- Can have multiple input and output bindings
- Easy to configure bindings
- Use the UI provided in the portal
- Update the functions.json file manually