KatInterview

Design an Enterprise Healthcare Record Ingestion Engine

System DesignModel answer
HardModel answerSystem Designsystem-designetlevent-driven

Last updated

Architect a resilient, HIPAA-compliant ETL pipeline capable of ingesting 500 million daily sensitive records with strict partner fault isolation and replayability.

You are asked to design an enterprise-grade record processing and ingestion framework for a medical data network. The platform collects daily updates across hundreds of external healthcare facilities (e.g., hospitals, clinics, labs).

The system must ingest 500 million patient updates per day while addressing four core operational challenges:

  1. Data Quality & Schema Drift: External updates frequently contain bad formatting, duplicated entries, or out-of-order state mutations.
  2. Security & Regulatory Compliance: Datasets contain Protected Health Information (PHI/PII). All records must be encrypted at rest and in transit with complete audit trail immutability under HIPAA guidelines.
  3. Partner Fault Isolation: A corrupt feed or bug in one provider's format must never degrade pipeline availability or throughput for other clinical providers.
  4. Lineage & Audit Replay: The architecture must guarantee end-to-end lineage tracking and allow re-processing of raw historical inputs when parser definitions or business rules are revised.

Pipeline Requirements & Target Scale

  • Average Ingestion Rate: ~5,800 records/sec.
  • Peak Load: Up to 20,000 records/sec during heavy batch windows.
  • End-to-End SLA: Maximum end-to-end processing latency under 5 minutes from upload to searchability.
  • Data Lifecycle: Raw payloads must remain queryable/replayable for 7 years; refined database records are updated daily via point-in-time upserts.

Design the end-to-end platform from client ingress to the structured storage layer, detailing the component architecture, stream routing, duplicate/ordering control, fault isolation boundaries, and compliance mechanisms.

Hints

Hint 1

Calculate throughput and bandwidth constraints first. Does throughput or data integrity dictate the architectural pattern?

Hint 2

Separate raw immutable ingestion from business validation logic. How does writing raw payloads directly to an immutable object layer unlock historical replay capabilities?

Hint 3

To prevent high-volume hospital partners from starving smaller providers during backfills, design a dedicated topic partition and worker bulkhead model based on partner tiers.