KatInterview

Design a Crash Artifact Ingestion and Triage Pipeline

System DesignModel answer
HardModel answerSystem Designdistributed-systemsstoragereliability

Last updated

Design a distributed system that collects, deduplicates, stores, and analyzes large binary crash files from a massive microservice fleet across regions.

Design a Crash Artifact Ingestion and Triage Pipeline

Your company runs a fleet of roughly 100,000 microservices spread across multiple geographic regions. When a service process crashes, the operating system writes a memory snapshot to disk — a file that can range anywhere from 100 MB to 10 GB. These files are essential for diagnosing production incidents, but their volume, size, and sensitivity make them difficult to manage at scale.

Design a system that handles the full lifecycle of these crash artifacts: from the moment a process dies on a production host all the way through storage, grouping, and developer-facing triage.

Functional Requirements

  • Collection: Transfer crash files from production hosts to centralized storage without disrupting the host's ability to recover and restart services.
  • Grouping: Cluster crashes that share the same root cause so developers see one actionable item rather than thousands of duplicate alerts.
  • Analysis: Extract human-readable stack traces from binary files and identify the function or module responsible for the crash.
  • Retention: Establish a data lifecycle policy that balances storage cost against the need to revisit historical crashes.

Non-Functional Requirements

  • Host safety: The collection process must not consume enough CPU, memory, or disk to destabilize the host it runs on.
  • Burst tolerance: During a bad deployment, thousands of hosts may crash within minutes. The system must absorb this without falling over or ingesting redundant data at full scale.
  • Security: These files contain raw process memory, which may include credentials, tokens, or personal data. Treat them accordingly.

What to cover

Describe a high-level architecture in prose or structured text (no actual diagram tool needed). Include:

  • How the agent on each host behaves before and during an upload
  • The API surface for the ingestion service
  • How you tier storage for different artifact sizes
  • Your deduplication and grouping strategy
  • How the system stays stable during a thundering-herd burst
  • How you prioritize which crashes to analyze first
  • Your retention and security approach

Hints

Hint 1

The biggest scaling lever is deciding what not to upload. Once you have a fingerprint from the crashing host, the server already knows whether it has seen this crash before — use that to gate whether a full dump is worth transferring at all.

Hint 2

Separate the control plane (small metadata messages) from the data plane (multi-gigabyte binary transfers). The ingestion API should issue upload credentials and then get out of the way; it should never proxy the binary bytes itself.

Hint 3

Think in layers for the thundering-herd problem: client-side sampling before the upload even starts, server-side token buckets for backpressure, and priority queues so analysis workers drain the most important work first when they are behind.