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

推荐订阅源

WordPress大学
WordPress大学
博客园 - 司徒正美
I
InfoQ
宝玉的分享
宝玉的分享
G
Google Developers Blog
J
Java Code Geeks
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
腾讯CDC
F
Fortinet All Blogs
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
B
Blog RSS Feed
博客园 - 聂微东
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
L
LangChain Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏

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 Gunicorn performance with Datadog
2016-06-24 · via Datadog | The Monitor blog

Gunicorn, or Green Unicorn, is a UNIX-compatible WSGI HTTP server that is commonly used to run Python applications. Developed in 2010 by Benoit Chesneau, this open source project is similar to uWSGI, mod_wsgi, and CherryPy. Gunicorn is often implemented with a reverse proxy server like NGINX, which typically handles requests for static resources and then passes on the requests to Gunicorn. Gunicorn processes the dynamic portion of the request and returns a response to NGINX, which sends the response back to the client.

Gunicorn can be used to serve Python applications and is compatible with frameworks like Django and Flask. It’s easy to configure, lightweight, and only needs 4–12 worker processes to handle hundreds or thousands of requests per second.

Gunicorn Datadog integration dashboard

As shown in the screenshot above, Datadog’s out-of-the-box Gunicorn dashboard shows you information ranging from resource utilization to work metrics such as request duration and the rate of successful requests. With Datadog, you can start monitoring Gunicorn’s performance alongside other elements of your infrastructure, so you’ll be ready to investigate issues when they arise.

Datadog + Gunicorn

Our integration with Gunicorn collects several categories of metrics:

  • latency: including the average and maximum request duration
  • throughput: gunicorn.requests, the number of requests per second
  • HTTP status codes: metrics such as the rate of 5xx errors help you stay on top of potential server issues
  • resource utilization: gunicorn.workers, so you can make sure you are designating the right number of workers to support your application

Note that in order to collect most of the metrics listed above, including status codes and request duration, you will need to point Gunicorn to your StatsD server, as outlined here.

Investigate issues as they arise

You can use Datadog to monitor Gunicorn alongside NGINX and custom metrics from your web application to understand what’s happening in your infrastructure. In the screenshot below, you can see that the number of busy Gunicorn workers, the 95th percentile of Gunicorn request duration, and average NGINX connections peak at roughly the same time.

monitor Gunicorn alongside NGINX

You can also correlate Gunicorn metrics with events like code deploys. For example, the screenshot below shows the number of 5xx errors overlaid with all releases tagged “hotfix” (indicated by the pink bars). If any particular hotfix event correlates with a spike, you may want to investigate if that update caused issues for your web servers.

correlate Gunicorn metrics with code deploys

Set up targeted alerts

Create alerts to keep tabs on Gunicorn and make adjustments to your configuration when needed. For example, you may want to set up alerts to find out when:

  • there is an unusually low number of workers (gunicorn.workers) available
  • the percentage of workers being utilized is high (for example: > 85%), indicating that you may want to scale up
  • the 95th percentile duration of responses has increased above an acceptable threshold

Start monitoring Gunicorn

If you’re already using Datadog, you can start monitoring Gunicorn by following these instructions. If you don’t yet have a Datadog account, sign up for a 14-day free trial here.