KatInterview

Diagnosing and Resolving a Full-Disk Service Outage

System DesignModel answer
MediumModel answerSystem Designincident-responselinuxdisk-usage

Last updated

A production service returns 500 errors for all requests due to local disk exhaustion; walk through triage, mitigation, root cause analysis, and prevention.

Scenario

You are the on-call engineer for a high-traffic consumer application. Your monitoring dashboard fires a critical alert: the Profile Lookup Service is returning HTTP 500 for every single request. The service is deployed on a fleet of Linux VMs behind a load balancer.

When you SSH into one of the failing machines and inspect the application logs, you find this error repeated on every line:

IOError: [Errno 28] No space left on device

What Is Expected

Walk through your end-to-end approach to this incident, covering four areas:

  1. Immediate Triage: How do you confirm what resource is exhausted and identify the root cause across the fleet?
  2. Mitigation: What actions do you take to restore service quickly without destroying important data or making the outage worse?
  3. Root Cause Analysis: How do you determine what generated the excessive data so the problem does not recur?
  4. Prevention: What monitoring, architectural, or process changes do you recommend to avoid a repeat?

Considerations

  • The service relies on local disk for application logs and an internal cache layer.
  • Weigh the trade-offs between deleting files and expanding storage.
  • Explain how to safely inspect the file system without worsening the situation on an already-struggling host.

Hints

Hint 1

100% failure across every host suggests a fleet-wide common cause, not a single bad machine. Check for a correlated deploy or config change before diving into one host.

Hint 2

errno 28 can mean either no free disk blocks or no free inodes. A huge number of tiny cache files can exhaust inodes while block usage still looks fine.

Hint 3

Deleting a file that a process still holds open does not reclaim space. Use truncation or restart the process instead.