← Back to With systems
Behind the numbers

How the numbers happened

Three problems from building a large-scale data delivery platform, one that loads scheduled datasets into customers' cloud storage and data warehouses: what broke, what I found, and what I changed. Written without company-specific names or details.

  1. Taming a scheduler thundering herd p99: 9+ h → under 5 h
  2. Did the customer get their data? SLA misses: −78%
  3. Load once, deliver twice Projected ~$636K/year
p99 landing time: 9+ h → under 5 h

Taming a scheduler thundering herd

The problem

Spark workloads processing about 350 TB a day were landing late. The p99 landing time was over 9 hours, and runs launched at peak hours were far slower than the same runs launched off-peak.

What I found

I lined up Spark and YARN metrics, queue dashboards and application logs by launch hour. The jobs weren't simply short on compute. They were flooding the scheduler with bursts of executor requests at nearly 4x the queue's capacity. At peak, executor allocation went from minutes to over an hour, and preemptions forced repeated retries, which made the bursts worse.

What I changed

The tradeoff

A small, deliberate increase in compute cost in exchange for predictable landing times.

The result

p99 landing time dropped from 9+ hours to under 5.

The fix was the shape of the requests, not just the amount of capacity.

SLA misses: −78%

From "did the job run?" to "did the customer get their data?"

The problem

Monitoring was run-level and dataset-wide. It could tell us a job had run, but not whether a specific customer's data had landed within their SLA. Some issues were first noticed by customers or account teams rather than by us.

Phase 1: respond faster

As lead DRI for a reliability lockdown, I started with response: SLA-attribution dashboards and tighter on-call and acknowledgment workflows. SLA misses caused by our platform fell 78%.

Phase 2: measure what the customer sees

Next, monitoring moved from infrastructure to customer-level outcomes:

Paging without the noise

More signals shouldn't mean more pages. Alerts are deduplicated and carry blast-radius context, so one upstream outage produces one actionable page instead of one per affected dataset.

Knowing a pipeline ran isn't enough. The question is whether the customer got their data on time.

Projected ~$636K/year

Load once, deliver twice

The problem

The platform delivers scheduled datasets into customers' Snowflake accounts. Every destination ran the full physical path on its own: build a manifest, prepare and partition the data in Hadoop, stage files in S3, COPY them into Snowflake, then audit and publish.

One large customer had two destinations with exactly the same contract: the same tables, schema and run date, for the same ten active accounts. So every run did the same preparation and the same load twice.

Before
Destination AManifestPartitionStageCOPYAuditPublish
Destination BManifestPartitionStageCOPYAuditPublish
After
Shared, onceManifestPartitionStageCOPY→A: audit, publishB: clone, audit, publish
duplicated physical workshared physical workstays separate per destination

What I found

Each destination's identity was tied to both the physical work and the customer-facing delivery. Only the delivery has to stay separate: each destination needs its own database objects, permissions, audit and share. The preparation and load don't.

The design

The tradeoff

Fanning out through shared views instead of clones would also save storage, about $30K more a year. Clones were the proposed route; views remain an alternative.

The result

Estimated savings of about $636K a year (about $53K a month: roughly $43K in warehouse compute and $10K in Hadoop preparation). A hackathon prototype of the shared path used about 29% fewer transfer compute credits than separate loads.

Share the physical work. Keep every customer's delivery independent.