Skip to content
Emon.
All work

Case study 04

Rust imaging pipeline at national scale

Built the ingest, storage and routing backbone of a national radiology platform in Rust: 375 active sites, mixed equipment, flaky links, and nothing allowed to drop.

studies in Sep 2026
70,651
studies in Sep 2026
growth in 6 months
7×
growth in 6 months
p95 operation latency
234 ms
p95 operation latency

Problem

A national radiology platform had to receive, store, route and serve medical images from hundreds of imaging sites. The sites run mixed equipment on unreliable links, and every byte is sensitive patient data.

Constraints

  • Speak both the legacy DIMSE protocol suite and modern DICOMweb.
  • Sites lose connectivity, so nothing may be dropped in transit.
  • Every byte is patient data: audit everything, keep identities out of downstream datasets.
  • Small team, so operations had to stay cheap and boring.

What I built and led

  • A PACS server in Rust from scratch (95 releases): C-STORE/FIND/GET/MOVE/ECHO, WADO-RS/URI, QIDO-RS and STOW-RS, S3/MinIO object storage, a Redis cache behind a circuit breaker, Prometheus metrics and audit logging.
  • A site-side Rust router with a persistent store-and-forward queue (details in the desktop case).
  • A de-identification data hub (Rust/Axum) with a 5-zone S3 pipeline from quarantine to delivery, fed by a Go exporter, so imaging data can feed AI training without exposing identity.
  • A Go study prefetcher and a one-binary Go deployer that brings up the whole stack with automatic DNS.

Architecture

Modalities send to an on-site router that queues, routes and compresses studies, then forwards them to the central PACS. Images land in object storage with a Redis cache; viewers and reporting consume events over RabbitMQ. A separate export path strips identity before data leaves for research and AI datasets.

Impact

  • 375 active sites sending studies in the last 30 days
  • 70,651 studies in Sep 2026, up from ~10k in Mar: 7× in 6 months
  • ~62k images and 25.6 GB ingested per day; 6.3M images (4.5 TB) indexed
  • PACS operation latency p50 52 ms, p95 234 ms
  • C-STORE failure rate of 0.58% over 3.46M DICOM operations in 30 days
  • Median 8.1 minutes from study arrival to finalised report
  • 95 + 35 releases shipped without a dedicated ops team

Production figures, October 2026.

Transfers to: Any high-throughput protocol server, store-and-forward edge system or regulated data pipeline: fintech, IoT, logistics.

Incident & what changed

On a multi-site radiology platform, images kept arriving but studies stopped reaching radiologists' worklist for two hours, and two server reboots didn't help.

Working from logs after the fact, I traced it to a nightly cleanup job scanning a 10 GB table without an index. A healthcheck mistook the busy workers for dead ones, and our own watchdog then restarted them in an endless loop, sending the job back to the beginning each time.

I shipped an index, a bounded and resumable rewrite of the job, a healthcheck fix and a rolling-window restart breaker in the watchdog. I also added worklist-lag and lock-wait alerts, which caught the next lock convoy within 10 minutes.

Stack

  • Rust
  • Tauri
  • Axum
  • Go
  • PostgreSQL
  • Redis
  • RabbitMQ
  • S3 / MinIO
  • Prometheus
  • Django