All writing
    Case Study

    How We Reduced Infrastructure Costs by $2M+ at Heap

    Building a framework that reduced infrastructure costs by more than $2 million annually — without compromising performance or product value.

    October 19, 20255 min
    How We Reduced Infrastructure Costs by $2M+ at Heap

    Acquisitions bring opportunity — and scrutiny. Within weeks of being acquired, every system, service, and dollar at Heap came under review. Overnight, our infrastructure spend became a focal point.

    Our new parent company's stack was optimized for digital experience analytics — not for a behavioral data platform like ours, which required far more flexibility. The critique wasn't wrong. Heap's architecture was designed for completeness and adaptability, not cost efficiency.

    The challenge was to prove that flexibility and efficiency weren't opposites. Over the following months, we built a framework that reduced our infrastructure costs by more than $2 million annually — without compromising performance or product value.

    The Challenge: Preserving Flexibility Under Financial Pressure

    Comparisons to our parent company's infrastructure ignored key differences in purpose and complexity. Heap's system had to support:

    • Real-time data ingestion with unbounded custom properties
    • Behavioral analytics across up to 3+ years of history
    • Dynamic querying that allowed full retroactive analysis
    • Session replay capabilities inherited through acquisition

    Meanwhile, pressure came from multiple directions:

    • Engineering leaders expecting lower costs per event
    • Finance teams targeting immediate margin improvements
    • Customer teams demanding zero degradation in experience
    • Product leaders committed to preserving flexibility

    Copying the parent company's approach wasn't viable. We needed a strategy to retain what made Heap powerful — while attacking inefficiencies with precision.

    The Strategy: High-Confidence Prioritization

    We avoided risky, all-or-nothing re-architectures. Instead, we built a high-confidence optimization pipeline — a structured process for identifying, sequencing, and executing cost-saving initiatives with measurable ROI.

    High-Confidence Optimization Framework

    The High-Confidence Optimization Framework

    Cloud Cost Alignment

    We converted unused compute reservations into flexible savings plans, consolidated enterprise discounts, and unified billing across business units. This delivered high-impact savings with minimal engineering effort and increased future flexibility.

    Legacy System Decommissioning

    Through a detailed audit, we mapped every legacy system and identified safe candidates for shutdown — redundant clusters, old data pipelines, and inactive storage layers. Each removal required customer impact analysis and migration planning, but collectively drove recurring savings.

    Configuration and Runtime Optimization

    We fine-tuned configurations across storage, compute, and message queues — improving I/O efficiency, upgrading runtimes for better throughput, and right-sizing clusters. These changes provided quick, measurable gains.

    Tooling and Observability Consolidation

    Our parent company used open-source observability; we relied on commercial tools. We created a migration path aligning monitoring standards without losing visibility. Similarly, we merged session replay systems from a prior acquisition, eliminating overlap.

    Execution Framework: Making Cost Discipline Repeatable

    The breakthrough wasn't just technical — it was operational rigor. We institutionalized cost management as an engineering habit through structure, cadence, and accountability.

    Weekly COGS Reviews

    We ran recurring, cross-functional reviews analyzing cost per metric, system, and business outcome. Progress was tracked weekly — maintaining focus and momentum across long-term and quick-win initiatives.

    Systematic Initiative Tracking

    Every optimization effort, from small configuration changes to major migrations, was logged and prioritized by impact, risk, and timeline. This eliminated duplication, highlighted patterns, and allowed resource allocation by confidence level.

    Confidence-Based Sequencing

    We front-loaded high-confidence, low-risk projects to build momentum and trust across teams. Once early wins were visible, we expanded into more complex initiatives such as system decommissioning and tooling migrations.

    Risk–Impact Evaluation

    Each proposal was vetted on three axes: engineering risk, dollar impact, and execution timeline. This ensured every change was defensible both technically and financially.

    Defending Product Value

    The hardest part wasn't cutting cost — it was doing so without eroding differentiation. Heap's value came from its architectural flexibility — the ability to retroactively analyze any behavior, across massive datasets, instantly.

    The core insight was separating necessary complexity (driven by product design) from incidental complexity (driven by history).

    The former was optimized, not removed; the latter was eliminated.

    This reframing shifted the conversation from "Why is this so expensive?" to "How can we deliver this efficiently?" — turning cost optimization into a shared engineering problem rather than a finance directive.

    Results: Financial and Cultural Wins

    $2M+ — Annual savings achieved

    Zero — Product degradation

    • $2M+ in annualized infrastructure savings — achieved through disciplined, high-confidence work
    • Zero product degradation — customer experience and flexibility preserved
    • Stronger cross-functional trust — finance, engineering, and product aligned on sustainable cost discipline
    • A repeatable framework — scalable to other teams and future acquisitions

    The Takeaway

    Post-acquisition cost pressure is inevitable. The question isn't whether you'll face it — it's whether you'll navigate it with precision or panic.

    The key is building systems that distinguish necessary complexity from incidental waste — and then attacking the latter with discipline, not drama.

    Stay in the loop

    New articles, frameworks, and the occasional behind-the-scenes story. No spam, unsubscribe anytime.