92. Azure Functions and CosmosDB from MS Ignite

Topics covered
Popular Clips
Episode Highlights
Function Basics
Azure Functions are small, serverless pieces of code designed to handle specific tasks without the need for managing infrastructure. John Calloway explains that they allow developers to focus on writing code without worrying about provisioning or patching servers 1. This makes them ideal for microservices, as they can scale on demand and support multiple programming languages, including C#, JavaScript, and Python 1. The release of Azure Functions 2.0 introduces .NET Core features, enabling cross-platform compatibility and improved performance 2.
Azure functions are just little bits of code that have a small responsibility.
--- John Calloway
With this update, developers can now run Azure Functions on Mac, Linux, and Windows, and even integrate them with Kubernetes and IoT Edge 2.
Scaling & Monitoring
Azure Functions automatically scale to meet demand, eliminating the need for manual infrastructure management. Alan Underwood highlights that they use simple heuristics to adjust the number of function instances based on response times, ensuring efficient performance 3. This scalability is complemented by built-in monitoring tools, such as Azure Application Insights, which provide detailed telemetry and performance data 4.
It's almost like the people that write that stuff know what is interesting and what is useful.
--- John Calloway
However, users should be cautious as extensive monitoring can quickly consume free resources, potentially leading to additional costs 4.
Cost Efficiency
Azure Functions offer a cost-effective solution with a pay-as-you-go model, charging based on gigabyte seconds and execution counts. Alan Underwood breaks down the cost structure, explaining that 3 million executions could cost as little as $18 5. The consumption plan automatically scales CPU and RAM, ensuring efficient resource use without upfront costs 6.
You're not going to pay through the nose for this.
--- Alan Underwood
This model allows developers to focus on building applications without worrying about infrastructure expenses, making Azure Functions an attractive option for cost-sensitive projects 6.
Best Practices
To maximize the benefits of Azure Functions, developers should adhere to best practices, such as avoiding long-running functions and writing defensive code. Alan Underwood advises keeping functions short, ideally under five minutes, to prevent failures 7. Defensive coding involves planning for potential failures and ensuring functions can recover gracefully, which is crucial for maintaining reliability in microservices architectures 8.
You want to plan for failures at each step.
--- John Calloway
By following these guidelines, developers can create robust, efficient applications that leverage the full potential of Azure Functions 8.
Related Episodes


Azure Functions and CosmosDB from MS Ignite
Answers 383 questionsClean Code - How to Write Amazing Functions
Answers 383 questions

3factor app - Async Serverless
Answers 383 questionsDesigning Data-Intensive Applications – Scalability
Answers 383 questions86. Lightning Talks
Answers 383 questionsCaching in the Application Framework
Answers 383 questionsAll Your Database Are Belong to Us
Answers 383 questionsClean Code - Formatting Matters
Answers 383 questions87. Thunder Talks
Answers 383 questionsDesign Patterns Part 1
Answers 383 questionsDatabases the SQL [see-kwuhl]
Answers 383 questions

Nuts and Bolts of Apache Kafka
Answers 383 questionsNDepends on How Good Your Code Is
Answers 383 questionsASP.NET 5 - It's Basically Java
Answers 383 questionsJavascript Promises and Beyond
Answers 383 questions












