Back to Case Studies
healthcareweb

DICOM Routing Platform

Enterprise medical imaging platform built for US telemedicine providers to route DICOM data from distributed clinics. Processes 100GB+ daily with zero downtime using microservices architecture (FastAPI, Redis Streams, HAProxy). Ensures HIPAA compliance, provides audit trails for healthcare regulations, and scales seamlessly from single-clinic to multi-site deployments. Features real-time monitoring dashboard and handles concurrent connections from dozens of imaging devices.

20255 min read
DICOM Routing Platform dashboard displaying medical imaging data flow, real-time monitoring of 100GB+ daily DICOM transfers, and microservices health status

The Challenge

A US telemedicine platform needed to handle 100GB+ of medical imaging data daily across distributed clinics. Their MVP was dying under real-world load - async FastAPI was being misused for heavy I/O operations, causing the server to choke on file uploads and concurrent requests.

This was a B2B SaaS platform serving telemedicine providers. Some customers had single small clinics with a few devices, while others operated distributed networks with dozens of imaging machines running 24/7. The unpredictable load and need for HIPAA compliance made scaling the existing setup impossible.

Key Constraints

  • Must handle 100GB+ daily medical imaging data with zero data loss
  • Support both single-clinic and multi-site distributed deployments
  • HIPAA compliance required - full audit trails and data security
  • Must work on varied infrastructure (some clinics had weak/old hardware)
  • Required Python for licensing reasons (couldn't switch languages)
  • Need extensibility for future AI processing nodes

Our Approach

Rebuilt from scratch using microservices architecture with FastStream and Redis Streams. Separated concerns into independent nodes: SCP receiver, SCU sender, S3 uploader, routing logic. Each node handles one responsibility and communicates via Redis Streams for auditability.

Key Technical Decisions

  • FastStream over Celery - more natural with FastAPI's async patterns, easier to scale
  • Redis Streams over basic queues - message history crucial for healthcare audit trails
  • HAProxy load balancing - proven technology for distributing DICOM connections
  • Docker deployment - easier than Kubernetes for varied clinic infrastructure
  • Coordination class in Redis - prevents race conditions across distributed workers
  • MinIO + S3 for storage - flexible cloud/on-premise options for different clinic needs

Timeline: 4 months (400-500 hours) from architecture design to production deployment

Implementation

Architecture Design & Planning

Multiple weekly calls with client to understand requirements. Proposed microservices approach with node-based extensibility. Got carte blanche on technical decisions.

2-3 weeks

Core Routing Engine

Built foundational nodes: DICOM SCP receiver, file storage, basic routing logic. Started with synthetic test data, then 1000+ real DICOM files from various sources.

4-6 weeks

Microservices Expansion

Added SCU sender, S3 uploader, metadata extraction, coordination logic. Implemented race condition handling and worker synchronization via Redis.

6-8 weeks

UI Development

Started as 'basic UI', evolved into full dashboard with Grafana-style graphs, logs, configuration screens, animations, progress bars, file management. Built with Ant Design.

4-5 weeks

Load Testing & Optimization

Wrote scripts to blast DICOM files in 20 parallel threads. System stable at 5 concurrent requests per SCP node, tested up to 20 parallel streams. Proved HAProxy scaling works.

2-3 weeks

Deployment & Production

Fought Windows deployment issues, convinced client to use Ubuntu. Deployed to first clinic successfully. Now expanding to multi-tenant SaaS model.

3-4 weeks

System Architecture

DICOM Platform microservices architecture with FastAPI nodes, Redis Streams message queue, HAProxy load balancer, and S3 storage for medical imaging data

Built 7 independent microservices communicating via Redis Streams. Each node (SCP receiver, SCU sender, S3 uploader, router, metadata extractor) handles specific responsibility. Coordination class in Redis prevents race conditions when multiple workers process same DICOM study. HAProxy distributes incoming connections across SCP nodes for horizontal scaling. Docker deployment with careful resource management for clinics with weak hardware. Full monitoring stack with detailed logging for debugging distributed systems. Tested with real hospital data including edge cases and legacy DICOM formats.

Technology Stack

ReactTypeScriptAnt DesignFastAPIFastStreampydicompynetdicomPostgreSQLRedis StreamsHAProxyDockerMinIOS3PrometheusGrafanaCustom Logging

Results & Impact

100GB+Daily Data

Medical imaging data processed daily across distributed nodes

7Microservices

Independent nodes for receiving, routing, storing, and uploading

5+Concurrent Connections

Per SCP node, tested up to 20 parallel streams successfully

155Python Modules

Modular codebase enabling rapid feature additions

  • Handles 100GB+ daily DICOM data with zero downtime
  • System deployed in production US telemedicine clinic
  • Stable performance at 5+ concurrent DICOM connections per node
  • Extensible architecture - can add AI processing or custom storage without touching core
  • Client expanding to multi-tenant SaaS offering for more clinics
  • Full audit trail via Redis Streams for HIPAA compliance

What We Learned

  • Microservices aren't free - flexibility comes at cost of deployment complexity and resource overhead
  • Healthcare IT is conservative - they want modern software on old hardware without upgrades
  • Redis Streams are underrated - perfect middle ground between basic queues and Kafka for medical systems
  • FastStream > Celery for FastAPI - less configuration, more natural async patterns, easier scaling
  • 'Simple UI' always grows - plan for feature creep from day one
  • DICOM is a beast - 3000+ pages of spec, legacy formats, vendor quirks. You learn by doing.
  • Extensible node-based architecture pays off - client keeps adding features, answer is always 'yes, add a node'

Have a similar project in mind?

Let's discuss how we can help you build it

More Case Studies

Speech Coach AI platform dashboard showing real-time speech analysis with pace tracking, filler word detection, and emotional tone visualization

Speech Coach

AI-powered speech coaching platform that democratizes public speaking improvement. Built with Next.js and LLM APIs, the platform analyzes speech in real-time, providing instant feedback on pace, clarity, filler words, and emotional tone. Serving 10K+ users who need affordable, 24/7 access to personalized coaching—replacing expensive $100-300/hour human coaches with AI that scales.

AI Education Platform interface showing Jupyter notebook environment with GPU resource monitoring, medical dataset access, and student workspace management for 40 concurrent users

AI Education Platform

Government-funded platform for healthcare AI training in Korea, replacing expensive cloud services with on-premise GPU infrastructure. Built with NestJS and FastAPI to manage 40 concurrent students across 4 Tesla V100 GPUs partitioned via NVIDIA MIG. Features isolated Jupyter environments, unlimited GPU access for medical dataset training, custom Prometheus monitoring for GPU utilization, and role-based access to shared/private datasets. Solved the challenge of providing secure, cost-effective AI education at scale.

Orthanc PACS dashboard showing DICOM studies list, patient metadata, and system monitoring with CloudWatch metrics

Orthanc PACS Deployment

Production DICOM PACS system deployed on AWS for healthcare startup. Orthanc + S3 + PostgreSQL architecture handling 1500+ DXA bone density scans with VPN-only access, automated backups, and CloudWatch monitoring. Deployed in 3 weeks with defense-in-depth security.

PACS platform study list interface showing advanced filtering, batch operations, and real-time study management with pagination and search

PACS Platform Modernization

Complete modernization of legacy PACS system handling 21TB of medical imaging data. Custom Next.js platform with Orthanc backend, PostgreSQL indexing, and Redis caching. Improved performance from 3-4 studies/second to 100 studies in under 2 seconds. Multi-site deployment with role-based access control and OHIF viewer integration.