惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
罗磊的独立博客
H
Help Net Security
I
Intezer
G
Google Developers Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Troy Hunt's Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
J
Java Code Geeks
S
Security Affairs
T
The Blog of Author Tim Ferriss
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
Docker
The GitHub Blog
The GitHub Blog
F
Full Disclosure
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
S
Security @ Cisco Blogs
腾讯CDC
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
Blog — PlanetScale
Blog — PlanetScale
T
Threatpost
D
DataBreaches.Net
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
L
LINUX DO - 最新话题
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
S
Securelist
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Help Net Security
Help Net Security
P
Proofpoint News Feed
Project Zero
Project Zero
S
SegmentFault 最新的问题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 叶小钗

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Tips to optimize and secure Azure Functions
Jordan Obey · 2024-08-29 · via Datadog | The Monitor blog

Organizations whose IT infrastructure relies heavily on Microsoft will often adopt Azure Functions as part of their cloud modernization strategy. Azure Functions is an on-demand serverless solution that enables you to build and deploy event-driven code without worrying about provisioning and managing infrastructure. Azure Functions offers simplified development and deployment, automatic scaling, and seamless integration with other Azure services all within a cost-efficient pay-for-what-you-use model.

Although Azure Functions are fully managed, there are certain security and performance optimization challenges to keep in mind when working with them. For instance, the ability of Azure Functions to scale out in response to increased traffic makes it particularly susceptible to DDoS attacks. Attackers can overwhelm the system with a flood of requests, causing excessive scaling and resource exhaustion. It can also be difficult to ensure that functions are performing optimally with minimal latency spikes and cold starts, and scaling efficiently while keeping costs at sustainable levels.

In this post, we’ll go over a few quick tips and tricks you can use to ensure your functions on Azure are secure, efficient, and cost effective.

Optimizing Azure Function performance

More than just writing clean code, optimizing Azure Functions is also about how you configure the function apps that Azure Functions runs on. Because function apps are the environment in which individual functions are executed (providing all the necessary infrastructure, runtimes, and services you need to run your functions with minimal management), the way you configure them can have a great impact on how your functions perform.

In this section, we’ll look at a few configuration and design principles to keep in mind to get the most out of Azure Functions

Choose an appropriate hosting plan

If you do decide to modernize your workloads with Azure Functions, one of the first key decisions you’ll need to make is which plan you want to use for hosting your functions. The plan you choose impacts the performance, scaling behavior, and resource allocation of your function apps. It also determines whether support for certain advanced features is enabled. The four major function app hosting plans Azure offers are:

  • Consumption plan

  • Premium plan

  • Dedicated (App Service) plan

  • Container Apps plan

Consumption plan

You should use a consumption plan if your application is built around event-driven workflows and you want a fully serverless solution with a pay-for-what-you-use billing plan. And, because consumption plans only charge for the resources you actually use, enabling you to avoid high costs during idle periods, they are ideal if you expect your application to receive irregular or spiky traffic.

The tradeoffs of choosing a consumption plan include an increased likelihood that functions will experience cold start latencies. Additionally, consumption plans enforce a max duration of 10 minutes, which means if you expect to execute long-running processes you will run into timeout errors that degrade performance.

Microsoft has also recently announced the release of a new consumption plan (in preview), called the consumption flex plan that offers more flexibility and customizability by introducing private networking, instance memory size selection, and faster scale-out features.

Premium plan

If your application has consistent, high levels of traffic and requires guaranteed low latency function executions, then you should consider hosting your function apps on a premium plan. Premium plans provide dedicated “pre-warmed” resources and are designed to handle high traffic and ensure low latencies, making them suitable for applications with demanding loads.

Keep in mind that premium plans are more expensive than consumption plans and you would need to weigh the performance benefits against the premium plan’s impact on costs.

Dedicated plan

Hosting function apps on a dedicated plan is likely your best option if you already host applications on Azure App Service. Doing so enables you to make use of reserved instances you are already paying for by using them to host function apps. Dedicated plans have no execution time limits, which means they are ideal in use cases that involve long-running workflows such as data analysis and batch processing.

With that said, the dedicated plan can be more costly and require more decision-making around resource management and scaling behavior when compared with the consumption plan.

Container Apps plan

Lastly, Azure lets you host your functions on Azure Container Apps, a service for building and deploying serverless containers. Hosting Azure Functions within Container Apps enables you to customize your functions’ runtime environment and include specific dependencies, libraries, or frameworks that are not supported by default. Additionally, running functions on Container Apps is particularly useful if you are already running other containerized microservices because you can easily integrate functions with your other services and simplify your architecture.

Managing containers introduces additional complexity compared to traditional serverless environments as it requires you to handle container image creation, updates, and orchestration. There are also cost ramifications to consider; because billing is based on allocated resources instead of usage, containers can incur costs even when idle.

Monitor how your hosting plan impacts cloud spend

Cost is one of the major considerations to keep in mind when choosing a hosting plan for the workloads you plan to modernize. However, cloud service pricing complexity is often amplified with serverless functions, as costs can vary based on factors such as execution count and duration, memory consumption, and additional charges for outbound data transfers and integrated services. As such, it can be difficult for stakeholders to gain visibility into exactly how certain hosting and configuration decisions can impact their cloud spend. You can use Azure Monitor to view function app metrics that have cost implications such as function execution count. For a more holistic solution, you can use a tool like Datadog Cloud Cost Management to get a full view of your total cloud spend to help understand how Azure Functions and any other Azure cloud services you may be using—such as Azure SQL Database and Azure CDN—are impacting costs.

Use Datadog Cloud Cost Management to get a full view of your Azure cloud spend.
Use Datadog Cloud Cost Management to get a full view of your Azure cloud spend.

For example, let’s say that when you migrated to Azure Functions you adopted a consumption plan because it initially seemed cheaper because of its pay-as-you-go model but Cloud Cost Management reveals that your spend is higher than you expected. This could be due to things like cold starts and low-latency executions. You also might see that you are paying for unused resources which are hosted on Azure App Service. Armed with this insight, you may decide to move your functions that were on a consumption plan to the dedicated app service plan so you can make use of the unused compute resources you were already paying for.

Fast and reliable functions ensure better end user experiences and can improve the overall satisfaction of your customers. Additionally, optimized functions consume fewer resources, leading to lower operational costs. Azure recommends following a few key design principles to help optimize your functions. These design principles can be applied to individual function code blocks and configurations.

First, Azure recommends avoiding long-running functions. Unlike short-running functions, which execute quickly and free up resources, long-running functions can consume more resources, driving up costs. Particularly large long-running functions can also cause unexpected timeout issues and may require additional handling to ensure reliability.

Long-running functions are particularly problematic if you are using a consumption plan, which has stricter execution time limitations. If you’ve instrumented your Azure function app and are notified of unexpected timeouts, you can mitigate the issues by breaking down larger functions into smaller functions that have fewer dependencies and return faster responses. For example, let’s say you are modernizing e-commerce application workloads with Azure Functions and have a single function that handles the entire order processing workflow, including tasks like payment processing, inventory checking, order confirmation, shipping arrangement, and notification sending. Instead of relying on one function to handle these separate tasks, consider breaking them down into smaller short-lived functions such as PaymentProcessing and CheckInventory.

Azure also recommends writing functions that are stateless and idempotent. Stateless functions facilitate easy load distribution and horizontal scaling, as they do not depend on server-side session data. Idempotent functions enable safe retries without adverse effects, enhancing fault tolerance and consistency. By writing functions to be stateless and idempotent, you can ensure that they are scalable, reliable, and easy to maintain.

In the context of an e-commerce application, you may write a single stateless, idempotent function to handle updating the status of an order being processed. This function would remain stateless because it would only need the data passed to it via an HTTP request (e.g., orderId and status), making it independent of any previous function calls. To make the function idempotent you would ensure that it checks the current status in the database before creating a new status. If the current status is already the desired new status, it could return a message indicating that the status is already set. This ensures that if the function is called multiple times with the same orderId and status, the database is not adversely affected by repeated updates. By following these principles, the function can handle high loads and scale horizontally, while also providing fault tolerance through safe retries.

Additionally, you should aim to minimize the likelihood of errors and crashes by writing resilient functions with robust error handling and input validation. For instance, you should make sure your functions include logic to handle unexpected edge cases—such as empty input values—without crashing. That might look like the following:

def process_data(data):

if not data:

return "Warning: No data provided."

try:

return complex_operation(data)

except (ValueError, TypeError) as e:

return f"Error: {e}"

except Exception as e:

return f"Unexpected error: {e}"

Secure your functions and minimize potential attack surface

Ensuring that Azure Functions is secure helps prevent data breaches, maintain compliance with regulatory requirements, and protect the availability of your cloud services. With that said, securing Azure Functions is challenging because they’re ephemeral and scale dynamically (creating and deleting instances as needed), making it hard to maintain a consistent security posture. What’s more, functions can be triggered by various events such as HTTP requests, scheduled events, and messages, each widening the possible attack vector.

To help secure your serverless functions, Azure has a number of security features, including identity access management tools such as Entra ID and Managed Service Identity (MSI) as well as secret management services like Azure Key Vault. You can get the most out of these features and improve your security posture by following a few Azure recommendations.

For starters, you should enforce that clients can only connect to your function endpoints via HTTPS along with the latest TLS version. These can be configured from the general settings in your Azure portal. You should also be sure to follow the principle of least privilege (PoLP) and use role-based access control (RBAC) to assign minimum access rights to users, services, and functions. This approach minimizes the attack surface and enhances security by ensuring each component has only the permissions it needs. For example, if a function app needs to access a specific database, ensure it has access only to that database and not to others.

Datadog provides out-of-the-box (OOTB) detection rules that will automatically flag suspicious behavior and misconfigurations that lead to vulnerabilities. For instance, one OOTB rule will notify you if an Azure function has administrative privileges over your other resources. If a function has such privileges and is breached, it poses a threat across all of your Azure-hosted resources.

Datadog’s out-of-the-box detection rules will automatically flag suspicious behavior.
Datadog’s out-of-the-box detection rules will automatically flag suspicious behavior.

Start monitoring you Azure Functions today

In this post, we looked at a few key strategies and best practices you can implement to optimize and secure Azure Functions. We also discussed different function app hosting options and how each has different performance and cost considerations to keep in mind. And, with Datadog tools like Cloud Security, you can quickly detect and mitigate Azure Function security vulnerabilities.

If you’re not already a Datadog customer, sign up today for a 14-day free trial