Normalized Throughput Usage is a metric available in Azure Monitor for Azure Cosmos DB that measures the rate of used throughput in an hour. It is normalized based on the provisioned throughput, allowing a fair comparison regardless of the varying throughput provisioned for different Azure Cosmos DB collections or databases.
Normalized Throughput Usage = (Used Throughput / Provisioned Throughput) * 100%
A higher percentage indicates that a significant fraction of the allocated capacity is being used. It helps in identifying potential bottlenecks or the need to scale-up your provisioned capacity to address increasing workload needs.
Monitoring Normalized Throughput Usage with Azure Monitor
Azure Monitor is a comprehensive service in Azure that provides an array of components tailored for monitoring resources in Azure. It works seamlessly with Azure Cosmos DB, providing access to critical telemetry for your Cosmos DB instances.
To access Azure Monitor, navigate to the Azure portal, search, and select ‘Monitor’.
In the ‘Monitor’ section, choose ‘Metrics’. In the ‘Scope’ section, select the subscription and the Azure Cosmos DB account to monitor. For ‘Metric Namespace,’ choose ‘Azure Cosmos DB’ and for the ‘Metric’ dropdown, select ‘Normalized Throughput Usage’.
It provides the following dimensions for further granularity:
- AccountName: The Azure Cosmos DB account name.
- Location: The geographical location where the Cosmos DB account is hosted.
- DatabaseName: The specific Cosmos DB database.
- Collection: The specific Cosmos DB collection.
Use Azure Monitor for Alerts on Normalized Throughput Usage
Azure Monitor enables setting up alerts based on the measured metrics. You can set an alert based on the Normalized Throughput Usage metric to help you proactively manage your resources. An alert can trigger a variety of actions, such as sending an email when the condition is met.
Here’s an example:
Navigate to ‘Alerts’ in the Azure Monitor blade. Click ‘New alert rule’. Select ‘Scope’ and choose your Azure Cosmos DB account. In the ‘Condition’ section, click ‘Add condition’. In the ‘Search for condition’ input, type ‘Normalized Throughput Usage’. Set the alert logic; for instance, you can set the alert to trigger when the Normalized Throughput Usage is greater than 70% over the past 15 minutes.
Monitoring and understanding the Normalized Throughput Usage can be vital to maintaining the efficiency and cost-effectiveness of your Azure Cosmos DB. By keeping a close eye on this metric with Azure Monitor, you can ensure you are utilizing your provisioned throughput sensibly and hence maximize the performance of your native applications on Azure Cosmos DB. Remember, it can also aid you in identifying potential bottlenecks or the need to scale your capacity based on the growing workload needs.
Practice Test
True or False: Azure Monitor can be used to monitor the normalized request unit usage across all Azure Cosmos DB accounts in a subscription.
• True
• False
Answer: True
Explanation: Azure Monitor provides the feature to monitor the usage across Azure Cosmos DB accounts.
In the Azure portal, the Azure Cosmos DB blade does _______________.
• a) Show overall request unit usage
• b) Provide a live metric stream of request unit usage
• c) Not display anything related to request units
• d) None of the above
Answer: a) Show overall request unit usage
Explanation: The Azure Cosmos DB blade in the Azure portal provides a view of overall request unit usage across all your containers and databases.
True or False: Azure Monitor enables us to visualize, query, route, archive, and act on metrics and logs.
• True
• False
Answer: True
Explanation: Azure Monitor is a tool that collects, analyzes, and acts on telemetry data from your Azure and on-premises environments.
Which of the following can be used to set alert rules for Cosmos DB metrics?
• a) Azure CLI
• b) Azure Portal
• c) Rest API
• d) All of the above
Answer: d) All of the above
Explanation: Azure Monitor provides several ways to interact with metrics including Azure portal, Azure CLI, Rest API, etc. Hence, all these can be used to set alert rules for Cosmos DB metrics.
True or False: Azure Monitor only collects and analyzes monitoring data from Azure resources.
• True
• False
Answer: False
Explanation: Azure Monitor can collect and analyze monitoring data from both Azure and on-premises resources.
Azure Monitor uses _______________ data to analyze the performance and availability of your application.
• a) Telemetry
• b) Query
• c) Log
• d) Archive
Answer: a) Telemetry
Explanation: Telemetry data (or metrics) such as events and traces are used by Azure Monitor to analyze the performance and availability of applications.
Azure Cosmos DB publishes metrics related to request unit consumption at a regular interval of _____.
• a) 10 seconds
• b) 1 minute
• c) 5 minutes
• d) 10 minutes
Answer: b) 1 minute
Explanation: Azure Cosmos DB regularly publishes metrics related to Request Unit (RU) consumption every minute.
True or False: Azure Monitor’s metric alerts do not support Azure Cosmos DB.
• True
• False
Answer: False
Explanation: Azure Monitor does support metric alerts for Azure Cosmos DB, in addition to a wide variety of other Azure services.
An Alert in Azure is created on the basis of _________.
• a) Metrics
• b) Logs
• c) Either metrics or logs
• d) Neither metrics nor logs
Answer: c) Either metrics or logs
Explanation: Azure alerts can be created based on metrics (near real-time data) and/or logs (historical and other data).
True or False: Request Units (RUs) in Azure Cosmos DB include both CPU, I/O, and memory resources.
• True
• False
Answer: True
Explanation: In Azure Cosmos DB, a Request Unit (RU) is a measure of throughput that includes CPU, I/O, and memory resources.
Which of the following components of Azure Cosmos DB does Azure Monitor track?
• a) Throughput
• b) Availability
• c) Latency
• d) All of the above
Answer: d) All of the above
Explanation: Azure Monitor tracks several metrics in Azure Cosmos DB including throughput, availability, latency and many others.
Azure Monitor can be integrated with _______ for further analysis.
• a) Power BI
• b) Tableau
• c) Both Power BI and Tableau
• d) None of the above
Answer: c) Both Power BI and Tableau
Explanation: Azure Monitor data can be analyzed with popular analytics tools like Power BI or Tableau by exporting the data to them.
True or False: Azure Monitor allows you to create alerts based on metrics and/or query results.
• True
• False
Answer: True
Explanation: Azure Monitor provides alerted based on metric values or log search queries that return the results.
Azure Monitor provides metrics for ______.
• a) Live streams
• b) Historical data
• c) Both live streams and historical data
• d) None of the above
Answer: c) Both live streams and historical data
Explanation: Azure Monitor provides both live stream and historical data monitoring.
True or False: Azure Monitor provides API access to metrics and logs, allowing you to users to build custom solutions on top of Azure Monitor data.
• True
• False
Answer: True
Explanation: Azure Monitor indeed provides RESTful API to access metrics and logs programmatically.
Interview Questions
What is Azure Monitor?
Azure Monitor maximizes the availability and performance of your applications by delivering a comprehensive solution for collecting, analyzing, and acting on telemetry from your cloud and on-premises environments.
How is normalized throughput utilized in Azure Cosmos DB?
Normalized throughput in Azure Cosmos DB provides users with better cost predictability, making it easier to budget for and manage costs by having a single, consolidated throughput across a set of Azure Cosmos containers.
How can Azure Monitor be used with Azure Cosmos DB?
Azure Monitor can be used to track the performance, maintainability, and usage of Azure Cosmos DB by collecting and analyzing various metrics and logs.
What metrics should generally be monitored in Azure Cosmos DB?
Some important metrics to monitor include total requests, consumed throughput, availability, latency, storage, system errors, and user errors.
How can Azure Monitor provide alerts?
Azure Monitor has an alerting system that proactively notifies you when some conditions, based on the metrics or logs, are met.
How can Azure Monitor assist in identifying performance issues in Azure Cosmos DB?
Azure Monitor helps in identifying performance bottlenecks by monitoring metrics like consumed throughput and latency.
What is the role of Azure Monitor’s log analytics in relation to Azure Cosmos DB?
Azure Monitor’s Log Analytics service can store, visualize, and query extensive amounts of operational data produced by Azure Cosmos DB for advanced analytics.
What data can Azure Monitor collect from Azure Cosmos DB?
Azure Monitor collects telemetry data such as event logs, metrics, and traces from Azure Cosmos DB.
Which tool is integrated with Azure Monitor to create comprehensive dashboards?
Azure Monitor is integrated with Power BI to create comprehensive dashboards for in-depth analysis.
What is latency, and why should we monitor it?
Latency is the amount of time it takes for a system to respond to a request. Monitoring latency helps in identifying bottlenecks and improving the response time of databases.