Cloud Cost Management Across a Fragmented Azure Estate
Uniphar grew from a pharmacy co-op founded in 1967 to a business spanning 160+ countries and 200+ multinational partners. Much of that growth came through acquisitions, leaving a patchwork of IT systems at different cloud maturity stages. When the company moved to Azure, management needed per-project cost visibility: not just total cloud spend, but costs split across initiatives so accounting could track monthly budgets. Built-in Azure cost tools lacked the granularity for shared infrastructure, so the team built their own.
Hierarchical Workflows Mirror Azure’s Resource Structure
The solution mirrors Azure’s own hierarchy. A tenant workflow spawns one subscription workflow per subscription. Each subscription workflow kicks off resource group workflows, plus specialized ones for AKS (scanning pod CPU and memory metrics to compute a cost score) and VDI (mapping sessions and group membership to cost centers). When all child workflows complete, they fan back in and the numbers flow to a cost center actor. The actor’s transactional contract prevents race conditions across parallel writers and keeps auditable state for billing queries.
Checkpointing Saves a Killed Workflow Mid-Run
Alice shut down the application mid-run. The workflow was mid-way through scanning Azure subscriptions when the process stopped. After fixing authentication and restarting, the application picked up exactly where it left off. Dapr’s workflow engine writes an append-only log to a state store as each activity completes. On restart, it replays that log to the last checkpoint, then continues forward. The finished run produced a CSV report emailed to accounting, showing costs per cost center for the previous month.
Lessons from Production and What Dapr Powers Next
Initially Uniphar ran child workflows sequentially. As subscriptions and resource groups multiplied, unbounded parallelism made execution unpredictable. They switched to parallel subscriptions with sequential resources within each. Dapr beat other .NET frameworks for its configurability and language agnosticism. Uniphar has since applied Dapr to two more production systems: a key rotation tool that triggers on schedule or on demand after a suspected credential exposure, and Frontgate, a mission-critical SFTP-to-SAP file transfer pipeline. An employee onboarding agent is next.
Key Takeaways
- Dapr workflows checkpoint each activity to a state store, resuming from where the process crashed.
- Uniphar’s fan-out architecture spans tenant, subscription, and resource group levels on Azure.
- Running subscriptions in parallel while keeping resources within each subscription sequential gives predictable execution.
About the Speaker(s)
Alice Gibbons is a Customer Success Engineer at Diagrid, the company behind the open source Dapr project. She helps customers with app modernization through architecture design sessions, demos, and hands-on proof of concepts.
Vaclav (Oisin) Haken is a DevOps and Senior .NET Engineer at Uniphar with over 30 years of global IT experience across diverse industries. He works on DevOps and platform engineering, focused on solving complex problems and driving continuous improvement.