Frank Sun

3 results

Boosting Performance and Insights with MongoDB Atlas and New Relic

In order to keep up with the demands of the modern business landscape, organizations must prioritize monitoring and optimizing application performance. Today, we're excited to announce a powerful collaboration between MongoDB Atlas, the leading database-as-a-service platform, and New Relic , the renowned monitoring and observability solution. This integration enables users to seamlessly monitor, analyze, and optimize their MongoDB deployments with efficiency and ease. Observability to ensure availability and uptime Monitoring a MongoDB Atlas deployment is now simpler than ever with the integration of New Relic. By connecting the two platforms, users can effortlessly monitor the performance of their MongoDB metrics, such as latency, throughput, and error rates, directly within the New Relic user interface. With real-time visibility into the health and performance of their databases, developers, and operations teams can quickly identify potential bottlenecks and proactively address issues before they impact end-users. Similarly, administrators can get an immediate high-level view of the health and availability of their MongoDB databases. Intelligent alerting and notifications The combination of MongoDB Atlas and New Relic empowers users to set up intelligent alerts and notifications tailored to their specific business requirements. Leveraging New Relic's alerting capabilities, users can create custom alert policies based on performance metrics and query patterns. Whether it's a sudden increase in response times or an unexpected spike in query access patterns, teams can receive timely notifications via email, Slack, or other preferred channels, enabling them to take immediate action. Powerful dashboarding and reporting Users can also take advantage of comprehensive dashboarding and reporting capabilities. With customizable dashboards and rich visualizations, users can gain real-time insights into the performance of their MongoDB clusters. Additionally, New Relic's reporting tools enable teams to generate detailed reports on database performance, query analytics, and overall system health, empowering them to make data-driven decisions and track improvements over time. By combining the strengths of these two powerful platforms, users can now unlock a new level of control and efficiency in managing their MongoDB databases. From streamlined monitoring and analysis to improved troubleshooting and enhanced collaboration, this integration leads organizations to proactively optimize their applications, ensure scalability, and deliver exceptional user experiences. With MongoDB Atlas and New Relic working cohesively, businesses can stay ahead in today's rapidly evolving digital landscape, where performance and efficiency are key differentiators. If you’d like to see the MongoDB Atlas and New Relic integration in action, sign up for MongoDB Atlas , our cloud database service, and learn more about New Relic’s monitoring and observability capabilities .

August 24, 2023

Tag, You're It: Using MongoDB Labels to Drive DataDog Business Logic

MongoDB Atlas and DataDog work better together to enable you to take advantage of the automation, elasticity, and scalability of modern infrastructure and act on real-time information to make well-informed decisions. With the latest release of MongoDB’s DataDog integration, we’ve added the ability to send custom defined labels in Atlas, CM, and OM to tags on the DataDog metrics object. Applying tags to DataDog's metrics allows users to organize and categorize their metrics in various ways. Here's how the new DataDog metrics tagging works: Define key-value labels in MongoDB at the cluster level that get automatically sent to DataDog as metrics tags. You can define tags based on the attributes you want to track and then assign those tags to the relevant metrics. For example, a tag named "region" could be assigned to metrics representing servers in different geographic regions. Filter and group metrics in DataDog by tags. You can then use these tags to filter, group, and aggregate metrics in various ways. For example, you can group metrics by tags such as "application," "environment," or "owner" to gain insights into how different parts of your infrastructure are performing. You can also filter metrics by tags to view just the metrics you're interested in. Use tags to set alerts and dashboards. You can create alerts and dashboards in DataDog based on tags. This allows you to monitor specific aspects of your infrastructure, such as servers in a particular region or metrics related to a specific application. DataDog's metric tagging feature is highly flexible and customizable, allowing you to adapt it to your specific organizational needs. Effectively using metrics tagging will grant you a better understanding of your application’s performance and help organizations make data-driven decisions. Read on to see an example of how MongoDB’s DataDog tagging integration can help organize your metrics and how you can use it to drive your business’ monitoring requirements. Setting cluster labels in Atlas In the example below, I’ll use MongoDB’s Data API to access and configure my MongoDB Atlas data. In this case, I’ll use MongoDB’s Data API to set new labels on my MongoDB Atlas clusters. To explore the new MongoDB Data API, you can use the public Postman workspace provided by the MongoDB developer relations team. You can use the cluster configuration API endpoint to add labels to a cluster in MongoDB. You can then use the get all clusters endpoint to verify that your labels were applied correctly. Once you’ve labeled your MongoDB clusters, set up your DataDog integration as you would normally. For more information on configuring MongoDB’s DataDog integration, refer to the documentation here . Using DataDogs metrics tagging to drive business logic After setting up your DataDog integration, you’ll automatically start seeing the labels you previously defined in MongoDB show up as tags on your DataDog metrics. You can now use these tags to filter, organize, and define logic based on the needs of your business. As an example, you can filter results in the DataDog Metrics Explorer. If I only want to see metrics for clusters associated with the “leafy” application, I can use tags to filter the metrics I get back. You can also use tags to define custom logic for your DataDog monitors. In this example, I’m configuring monitors to trigger different priority alerts based on the metrics tags. When query targeting exceeds the threshold for production clusters, I’ll get a P2 alert. However, the same alert for non-production environments wouldn’t have the same priority. In this example, I can use the “usage” metrics tag to define different alerting priorities. And finally, Datadog metrics tagging can help you organize and filter data in dashboards. Metrics tagging enables you to easily group related data together and create more focused and specific dashboards. For example, you can use the app_name tag here to filter on just the leafy application. This will help you quickly identify and troubleshoot issues. Using tags effectively can grant deeper insights into your data and help your organization make more informed decisions to improve the performance and availability of your applications and infrastructure. This new enhancement to MongoDB’s DataDog integration provides significantly more flexibility in how you use DataDog and helps you get the most out of your investment. The DataDog integration is available on MongoDB Atlas on M10 cluster tiers and higher. Learn more about DataDog’s powerful tagging capabilities. If you’d like to see MongoDB’s DataDog integration in action, the easiest way to get started is to sign up for MongoDB Atlas , our cloud database service.

May 1, 2023

Optimizing Your MongoDB Deployment with Performance Advisor

We are happy to announce additional enhancements to MongoDB’s Performance Advisor, now available in MongoDB Atlas , MongoDB Cloud Manager , and MongoDB Ops Manager . MongoDB’s Performance Advisor automatically analyzes logs for slow-running queries and provides index suggestions to improve query performance. In this latest update, we’ve made some key updates, including: A new ranking algorithm and additional performance statistics (e.g., average documents scanned, average documents returned, and average object size) make it easier to understand the relative importance of each index recommendation. Support for additional query types including regexes, negation operators (e.g., $ne, $nin, $not), $count, $distinct, and $match to ensure we cover with optimized index suggestions. Index recommendations are now more deterministic so they are less impacted by time and provide more consistent query performance benefits. Before diving further into MongoDB’s Performance Advisor, let’s look at tools MongoDB provides out of the box to simplify database monitoring. Background Deploying your MongoDB cluster and getting your database running is a critical first step, but another important aspect of managing your database is ensuring that your database is performant and running efficiently. To make this easier for you, MongoDB offers several out-of-the-box monitoring tools , such as the Query Profiler, Performance Advisor, Real-Time Performance Panel, and Metrics Charts, to name a few. Suppose you notice that your database queries are running slower. The first place you might go is to the metrics charts to look at the “Opcounters” metrics to see whether you have more operations running. You might also look at the “Operation Execution Time” to see if your queries are taking longer to run. The “Query Targeting” metric shows the ratio of the number of documents scanned over the number of documents returned. This datapoint is a great measure of the overall efficiency of a query — the higher the ratio, the less efficient the query. These and other metrics can help you identify performance issues with your overall cluster, which you can then use as context to dive a level deeper and perform more targeted diagnostics of individual slow-running queries . MongoDB’s Performance Advisor takes this functionality a step further by automatically scanning your slowest queries and recommending indexes where appropriate to improve query performance. Getting started with Performance Advisor The Performance Advisor is a unique tool that automatically monitors MongoDB logs for slow-running queries and suggests indexes to improve query performance. Performance Advisor also helps improve both your read and write performance by intelligently recommending indexes to create and/or drop (Figure 1). These suggestions are ranked by the determined impact on your cluster. Performance Advisor is available on M10 and above clusters in MongoDB Atlas as well as in Cloud Manager and Ops Manager. Figure 1:  Performance Advisor can recommend indexes to create or drop. Performance Advisor will suggest which indexes to create, what queries will be affected by the index, and the expected improvements to query performance. All of these user interactions are available in the user interface directly within Performance Advisor, and indexes can be easily created with just a few clicks. Figure 2 shows additional Performance Advisor statistics about the performance improvements this index would provide. The performance statistics that are highlighted for each index recommendation include: Execution Count: The number of queries per hour that would be covered by the recommended index Avg Execution Time: The average execution time of queries that would be covered by the recommended index Avg Query Targeting: The inefficiency of queries that would be covered by the recommended index, measured by the number of documents or index keys scanned in order to return one document In Memory Sort: The number of in-memory sorts performed per hour for queries that would be covered by the recommended index Avg Docs Scanned: The average number of documents that were scanned by slow queries with this query shape Avg Docs Returned: The average number of documents that were returned by slow queries with this query shape Avg Object Size: The average object size of all objects in the impacted collection If you have multiple index recommendations, they are ranked by their relative impact to query performance so that the most beneficial index suggestion is displayed at the top. This means that the most impactful index is displayed at the top and would be the most beneficial to query performance. Figure 2:  Detailed performance statistics. Creating optimal indexes ensures that queries are not scanning more documents than they return. However, creating too many indexes can slow down write performance, as each write operation needs to check each index before writing. Performance Advisor provides suggestions on which indexes to drop based on whether they are unused or redundant (Figure 3). Users also have the option to “hide” indexes as a way to evaluate the impact of dropping an index without actually dropping the index. Figure 3: Performance Advisor shows which indexes are unused or redundant. The Performance Advisor in MongoDB provides a simple and cost-efficient way to ensure you’re getting the best performance out of your MongoDB database. If you’d like to see the Performance Advisor in action, the easiest way to get started is to sign up for MongoDB Atlas , our cloud database service. Performance Advisor is available on MongoDB Atlas on M10 cluster tiers and higher. Learn more from the following resources: Monitor and Improve Slow Queries Monitor Your Database Deployments

November 22, 2022