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

推荐订阅源

The Cloudflare Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
博客园 - 司徒正美
V
Visual Studio Blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
D
Docker
Vercel News
Vercel News
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
爱范儿
爱范儿
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏

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
Monitoring CouchDB performance with Datadog
Marshal Ma · 2016-07-13 · via Datadog | The Monitor blog
Marshal Ma

Marshal Ma

Apache CouchDB is an open source NoSQL database, tailored for the web. As a document-oriented database that stores data in JSON, CouchDB is accessible and queryable via HTTP request. It can complete complex document indexing and view updating on the fly with JavaScript. CouchDB replicates changes among peer hosts asynchronously and guarantees eventual consistency, making the data store globally scalable and a good fit for many types of public-facing web/mobile apps.

Boost awareness with CouchDB monitoring

Datadog takes CouchDB monitoring beyond ad hoc command line checks and manual inspection of the runtime statistics report. You can see graphs of real-time and historical metrics on request traffic, latency, and read/write workload from all your CouchDB servers in one place.

CouchDB monitoring default screen board

Monitoring CouchDB throughput and workload

You can break down CouchDB traffic in terms of HTTP status codes and request methods. Though not explicitly for database service, those metrics can provide insights on database activity and host health. For example you can set alerts on too many “forbidden” responses (403) or if the number of internal server errors (500) suddenly increases.

CouchDB monitoring request breakdown

If you are seeing a high number of delete requests, you may consider optimizing the application logic, as document deletion is the kind of operation that’s better and more effectively handled with a bulk update.

Know when it’s time to compact a bloated database

CouchDB supports distributed scaling over multiple host clusters. To minimize the amount of communication between each host, incremental replication is commonly used to propagate document changes. During the process, CouchDB automatically detects conflicts but leaves the resolution up to the application. Thus, as in a version control system, all changes, even delete operations, are diligently recorded. As a result, the database can swell in size with old document revisions.

One way to get around the problem is to compact the database from time to time. But since this is a heavy disk I/O operation, when is it reasonable to run a compaction?

CouchDB monitoring disk size comparison

Monitoring CouchDB with Datadog can help you find the answer, by tracking database size in real time. By multiplying the current document count by the estimated average size of a document designed for that database, you can get a sense of how big the database should be. If the disk size is much greater than the expected size of documents stored in the database, it’s very likely that the disk is overpopulated by the fragments of past revisions, and it may be a good time to compact the database.

Safeguard the authentication cache

CouchDB monitoring authentication cache

Another important aspect of CouchDB that Datadog monitors is the authentication cache. CouchDB stores a fair amount of user credentials in memory to speed up the authentication process. Monitoring usage of the authentication cache can alert you for possible attempts to gain unauthorized access.

If CouchDB reports a high number of auth_cache_misses, then either the cache is undersized to service the volume of legitimate user requests, or a brute force password/username attack is taking place. Correlating the auth_cache_misses with httpd_status_codes.401 (unauthorized request) metrics helps shed light on which scenario it might be.

CouchDB monitoring authentication cache with unauthorized request

Get started

If you’re already a Datadog customer, you can easily start monitoring CouchDB in minutes here. CouchDB is one of more than 1,000 technologies that Datadog integrates with, so you can monitor your entire infrastructure in one place, from servers and containers to load balancers, caches, and custom applications. If you’re new to Datadog, you can sign up here for a full-featured free trial.

Acknowledgments

Thanks to Jan Lehnardt, CEO of Neighbourhood.ie, for his technical assistance with this article.