Infrastructure
The First Screen of a Database Health Dashboard
A useful database overview connects workload, latency, errors, saturation, capacity, replication, and maintenance state instead of presenting dozens of isolated counters.
- Database Observability
- Systems Design
- Monitoring
- Infrastructure
- Dashboards
Most database dashboards fail the moment you open them. You see thirty gauges, twenty graphs, and no hierarchy. The query-per-second counter sits next to cache hit rate sits next to buffer pool size, and you still can’t answer the question: is the database healthy right now, and what do I need to do?
A useful first screen connects the pressures that matter instead of listing isolated metrics. It shows what the database is doing, how efficiently it’s handling that load, what it’s running out of, whether replication is drifting, and whether maintenance tasks are falling behind. These stories are independent; showing them together on one screen lets an operator or engineer decide whether to investigate further or page someone else.
Workload and latency belong on the same tile
Query volume and response time are not two separate stories. A database handling one thousand queries per second at five milliseconds each is fine. The same database handling one thousand queries per second at one second each is screaming for help. Showing them apart invites a reader to fixate on the wrong axis.
The first tile should show recent throughput (requests per second, not cumulative) and the corresponding latency percentile—usually p50, p95, or p99—on the same display. A time-series graph works well: throughput as bars or an area, latency as a line. If throughput is flat and latency spikes, the database itself is struggling. If throughput crashes and latency stays normal, something upstream blocked the traffic. If throughput and latency both climb, you have a load problem or a cascade incoming.
Include error rate or failure count as a third dimension if space allows, but not as a hidden legend. Errors matter more than latency; a query that times out is worse than a query that completes slowly. If errors are nonzero, that tile should draw immediate attention.
Resource saturation is the constraint you can measure
A database is constrained by CPU, memory, disk I/O, or network, in some combination. Most dashboards show resource utilization as percentages: CPU at 73%, memory at 61%, disk at 45%. These numbers are useless. A database can be CPU-bound at 40% and memory-bound at 90%, or both at 75%. The percentages don’t tell you which resource is the actual bottleneck.
Instead, track saturation. For CPU, that’s run queue length or the time spent waiting for a thread. For memory, it’s the count of evictions or the size of the swap usage. For disk I/O, it’s queue depth or the time blocked on reads and writes. For network, it’s packet retransmission rate or the size of the backlog.
Show one saturation metric per resource, with a clear threshold line. If CPU run queue is 12 and the system has 8 cores, CPU is saturated. If the disk I/O queue is zero, I/O is not the problem. Saturation metrics tell you where the next 10% of capacity will come from, or where a small spike will cause a cascade.
Replication and consistency health need to be visible, not buried
If the database replicates, the first screen must answer: is the replica current? How far behind is it? Is it catching up or falling further behind? The metric is usually replication lag, measured in bytes or time.
Lag is not a rate; it is a status. A replica lagging by two gigabytes is different from a replica lagging by two seconds, and both are different from a replica that is not connected. A single gauge or status indicator per replica is better than nothing, but add a trend line showing whether lag is growing, stable, or shrinking.
If the database offers tunable consistency (eventual vs. immediate, or a quorum setting), show the current mode and when it was last changed. A replication health tile that doesn’t answer “can I read my own writes from the replica?” is incomplete.
Capacity and maintenance state complete the picture
A database can run out of space in several ways: the filesystem fills, the transaction log grows, or the replication backlog exceeds retained storage. Show used and free space for each major resource, with the growth rate (bytes per hour, for instance). If space is growing faster than the retention or backup cycle can handle, someone needs to add capacity or reduce retention before a crash.
Maintenance state includes vacuum, reindex, consistency checks, and garbage collection. These tasks run on a schedule or on demand. Show their last completion time and status. If a maintenance job is overdue or failing, it will eventually drive latency up or cause failures that look random.
Capacity and maintenance are not emergencies until they are, but they are the emergencies that arrive on schedule. A dashboard that omits them delays the decision to provision or repair until the outage forces it.
Dashboard design review checklist
Before shipping a database health screen, use this checklist:
- Workload and latency. Does the first tile show throughput and a latency percentile on the same display, with error rate visible? Can you tell whether traffic is climbing or the database is struggling to keep up?
- Saturation metrics. Does each resource have a saturation measure, not a utilization percentage? Can you identify the current bottleneck in under ten seconds?
- Replication state. If the database replicates, can you see lag per replica and whether lag is growing? Is the replication connection status obvious?
- Capacity headroom. Can you see used and free space for storage and transaction logs, with growth rates? Would an operator notice before the filesystem fills?
- Maintenance schedule. Are the last completion time and status of critical maintenance tasks visible? Would you catch a failing or overdue job before it cascades?
- One question per tile. Reread each section of the dashboard. Can you state the answer to one specific question from each tile, or are you squinting at the numbers?
- Thresholds and alerts. Are critical thresholds marked visually? Does the display use color or shape to signal urgency without relying on a legend?
- Absence of noise. Are there metrics on this screen that you would never act on? Remove them; they distract from the signals that matter.
The dashboard that surfaces the decision
The goal of a health screen is not to impress with detail. It is to surface the decision: Do I need to dig deeper? Do I need to scale? Do I need to fix replication? Do I need to run maintenance? Or is the database simply fine?
If the first screen doesn’t answer one of those questions clearly, the reader will open a second dashboard, then a third, and eventually give up and page someone. That person will then run the same investigation on their own production instance, burning time and latency during an incident.
Start with one screen that connects workload to constraint. Add detail only when the data suggests a specific investigation. A hierarchy of dashboards—health overview, replication detail, I/O analysis, maintenance history—works better than a single page that tries to cover every metric at once.
The engineering cost of a thoughtful dashboard layout is small. The cost of an unhelpful dashboard is paid in minutes lost during an incident, and in the trust eroded when an operator stops trusting the monitoring tool and starts guessing. Design the first screen to be worth opening.