Published Nov 3, 2018

92. Azure Functions and CosmosDB from MS Ignite

    Explore the cutting-edge revelations from Microsoft Ignite as experts delve into Azure's latest advancements, including Cosmos DB's extraordinary features for data management and the enhanced Azure Functions 2.0 for agile deployment and scaling. Gain valuable insights on serverless computing, Test Driven Development, and tool integration essential for crafting high-performing cloud applications.
    Episode Highlights
    Coding Blocks logo

    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