A series of presentations diving in to Azure Functions which is a serverless computing platform from Microsoft. The series spans from an introduction to azure functions to developing online as well as locally, debugging, code sharing strategies, deploying azure functions and other advanced topics
5. Simplified Programming Model
New Pricing Model
Why Functions are Unique?
• 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 requirement
6. Simplified Programming Model
New Pricing Model
Why Functions are Unique?
• Pay only for what you use, No more
• If you are not using, you are not paying
• Servers when you need them
• Serverless when you don’t
8. New Pricing Model Explained
Consumption Plan
App Service 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”
9. New Pricing Model Explained
Consumption Plan
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 5 minute execution limitation.”
10. Built Around App Services
• Built on top of Azure Web Jobs SDK
• Can run on existing App Service Plans
• Run alongside other Web, Mobile & API apps
• App Service features at your disposal
- Continuous Deployment
- Deployment Slots
- Remote Debugging
• Run on Isolated & Dedicated Environments
- Using App Service Environments
• Scalability
- Scale up to larger VMs for more compute power
- Easily Scale out
- Auto-Scaling to automatically handle load
12. Azure Function Integrations
• Both Azure and 3rd Party Services
• Serve as a trigger for the functions
• Serve as input and output for the functions
• Current integrations include
- Azure Notification Hubs
- Azure Service Bus Queue & Topics
- Azure Storage Blobs, Queues & Tables
- Azure Event Hubs
- Azure DocumentDb
- Azure Mobile Apps
- GitHub Webhooks
- Twilio SMS Service
- SendGrid Email Services etc.
13. Other Features
• Security
- Use OAuth providers for HTTP Triggered functions
- E.g. Google, Facebook, Azure AD etc.
• Flexible Development & Deployment
- Directly use the portal
- Setup CI/CD with source control
• Support for External Packages
- Supports 3rd party dependencies with NuGet and npm
• Open Source
- Runtime is available on GitHub
15. Triggers & Bindings
Triggers
Bindings
• 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
16. Triggers & Bindings
Triggers
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
17. Triggers & Bindings
Ty p e S e r v i c e Tr i g g e r I n p u t B i n d i n g O u t p u t B i n d i n g
Schedule/Timer Azure Functions ✔
HTTP Azure Functions ✔ ✔
Blob Storage Azure Storage ✔ ✔ ✔
Events Azure Event Hubs ✔ ✔
Queues Azure Storage ✔ ✔
Queues & Topics Azure Service Bus ✔ ✔
Tables Azure Storage ✔ ✔
SQL Tables Azure Mobile Apps ✔ ✔
NoSQL Databases Azure Document Db ✔ ✔
Push Notifications Azure Notification Hubs ✔
Twilio SMS Text Twilio ✔
SendGrid Email SendGrid ✔
18. Demo
A L a p a r o u n d A z u r e F u n c t i o n s A p p I n A z u r e P o r t a l
19. Thank You
S e e Y o u i n t h e N e x t E p i s o d e
Kasun Kodagoda
https://wpdevkvk.wordpress.com