appsignal

Monitor NGINX Performance Automatically with AppSignal

Connor James

Connor James on

Monitor NGINX Performance Automatically with AppSignal

Understanding how NGINX performs can be overwhelming. There are many data points to follow, and it can be tricky to know which ones are relevant to you and which ones you can ignore.

In this article, we'll explain how you can use AppSignal to monitor NGINX, expanding your visibility over your application's performance.

Making All Your Metrics Magical

AppSignal allows you to create custom dashboards with performance metrics ranging from throughput to response time. Manually creating dashboards takes time and it can be difficult to know which metrics really matter. For this reason, AppSignal has automated the process through Magic Dashboards. Once you install AppSignal, our agent scans your infrastructure, and we automatically create the most important dashboards for you, including a NGINX dashboard.

NGINX magic dashboard set-up

Your Magic Dashboards appear automatically under your application's dashboard list. Once a dashboard is set up, you can curate it to display metrics that suit your application's unique context.

Visualize Your NGINX Metrics with Magic Dashboards

Let's look at how our Magic Dashboards help you utilize NGINX actions when your application's availability is threatened, with high traffic causing outages.

Imagine you have an application called SnapGram that allows users to upload photographs and view and like photographs of fellow users. Your application has a small number of dedicated users and is relatively stable with no availability issues.

This all changes when a major competitor unexpectedly bans sharing photos of cats and cappuccinos, causing users to migrate to SnapGram. Within hours, your active user count skyrockets from a few hundred to thousands. Suddenly thousands of people are complaining they can't use SnapGram. However, when you check your application's logs, it seems everything is running fine, and there's no spike in error incidents.

Your NGINX Magic Dashboard tells another story:

NGINX magic dashboard

The Throughput graph gives us quick insights into how many requests our application is receiving. Looking at the graph, we can see that SnapGram is "breaking the internet" - it's getting a lot of requests. Our Request time graph is also going up, so SnapGram is taking longer to respond to requests. The Connections chart, which presents the status of connections to our application, shows us that many people are waiting for SnapGram to respond. It can't keep up with the demand.

Because SnapGram can't keep up with demand, the Status codes chart shows us that time-outs have skyrocketed. Most people who try and interact with SnapGram receive time-out errors. Because this occurs before SnapGram's application process receives a request, simply analyzing our logs would not alert us to the issue at hand (we'd only see the limited percentage of requests SnapGram was able to successfully handle).

Now that you know the issue isn't in your code, you can improve SnapGram's availability by firing up additional servers so your application handles traffic better. Each new server will appear as a different marker in your Magic Dashboard's Upstream Response Time and Upstream Status Code graphs, giving you per-process insights.

NGINX magic dashboard upstream graphs

To further reduce the load on SnapGram, you also enable upstream caching. As more and more requests are cached, the request time (and upstream request time) decreases as the stress on your application reduces. As SnapGram stabilizes and user requests are served, you'll notice that users stop complaining and return to sharing photos of cats and cappuccinos.

NGINX magic dashboard resolved issue

More Metrics = More Magic

SnapGram is just a simple example of how having access to easy-to-read metrics can help you to keep your application stable and get the most out of your NGINX integration.

Our NGINX Magic Dashboards can keep track of the following metrics:

  • Request Time: the time your NGINX server takes to respond to a request, as a per-minute mean and 95th percentile.
  • Throughput: a count of the requests handled by your NGINX server.
  • Request Length: the length in bytes of the request received from the client by your NGINX server, as a per-minute mean and 95th percentile.
  • Response Length: the length in bytes of the response sent to the client by your NGINX server, as a per-minute mean and 95th percentile.
  • Status Codes: a count of the status codes of the responses sent by your NGINX server.
  • Connections: a gauge of the connections currently being handled by your NGINX server, measured once per minute and segmented by connection status.
  • Upstream Status Codes: a count of the status codes of the responses sent by the upstream servers that your NGINX server proxies from.
  • Upstream Response Time: the time taken to respond to a request by the upstream servers that your NGINX server proxies from, as a per-minute mean and 95th percentile.
  • Upstream Cache Status: the cache status (such as HIT or MISS) when handling a cached request proxied from an upstream server.

AppSignal, the Developer-driven APM Tool

If you're ready to start with NGINX and AppSignal, learn more about configuring your AppSignal integration in our NGINX metrics documentation.

AppSignal's Magic Dashboards are just one of our many developer-driven features that help you get the most out of monitoring your application. Developers also enjoy using our monitoring because we have:

  • An intuitive interface that is easy to navigate.
  • Simple and predictable pricing.
  • Developer-to-developer support.

If you are a new trial user, you can also get a free box of stroopwafels. Once you start pushing some data, reach out to us, and we'll send a package to you 🍪!

Connor James

Connor James

Official technical writer at AppSignal. Podcast addict who loves cannoli so much that he's considering changing his name to Connoli. He thinks there's a `u` in color. You might find him on the mic, on the stage, or lying on the sofa when he's off Documentation Duty.

All articles by Connor James

Become our next author!

Find out more

AppSignal monitors your apps

AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!

Discover AppSignal
AppSignal monitors your apps