Design an Enterprise Zoom Recording Ingestion and Analysis Pipeline
Medium · System Design · Software Engineer · Other
Prompt
Architect the backend platform for a B2B SaaS product that automatically pulls recorded Zoom calls from customer workspaces, transforms each recording into a speaker-attributed transcript and conversation insights, and serves those outputs to authorized users in your application.
Use the baseline context below and state any clarifying questions or quantitative assumptions you would confirm with the interviewer up front:
- Workspace onboarding: An organization administrator links the company's Zoom account once via delegated authorization; afterward, eligible recorded calls from that workspace should be ingested without manual uploads.
- External platform capabilities: Zoom can send push notifications when cloud recordings finish preparing and exposes authenticated HTTP endpoints to enumerate past calls and download media tracks. External API calls are governed by provider rate quotas whose exact limits should be clarified rather than hardcoded.
- Core outputs: Every ingested call requires speech-to-text transcription with per-speaker attribution, followed by downstream transcript processing such as call summaries, topic extraction, and full-text search indexing. Real-time processing while a call is still underway is excluded from the initial scope.
- Dimensions to clarify: Target turnaround time after a call concludes, expected number of customer organizations, daily call volume, typical and upper-bound call durations, initial launch features, and governance rules around capture exclusions, retention windows, and regional data residency.
Scope & Expectations
- Resilient media ingestion: How the service discovers newly completed recordings, deduplicates repeated or delayed push events, recovers calls when notifications never arrive, manages credentials and external rate quotas, and streams large audio/video tracks into durable storage.
- Checkpointed compute & multi-tenant scheduling: How raw media progresses through transcription and analysis stages across expensive shared compute without repeating completed work on failure, how bursty workloads stay fair across organizations, and how historical archives are reprocessed when ML models are upgraded.
- Storage, isolation, and cascading deletion: Where raw media, relational metadata, transcripts, and search indexes reside, how tenant boundaries and read permissions are enforced on every query, how retention policies and deletion requests erase every derived artifact, and how pipeline health and unit compute costs are monitored.
Step-by-step walkthrough
Clarify requirements, constraints, and scope
At first glance, this system sounds like "download an MP4 and run speech-to-text." In practice, three distributed-systems hazards define the architecture: 1. Unreliable external signals: Conferencing providers emit webhook deliveries that may duplicate, lag by hours, or drop altogether, while enforcing strict quotas on media download endpoints. 2. Expensive shared GPUs: Speech-to-text across thousands of enterprise tenants dominates cloud spend, so transient errors must never re-run completed GPU stages and one tenant's historical backfill must never delay everyone else. 3. Strict multi-tenant privacy & deletion: A single call fans out into ~10 derived artifacts (audio slices, transcripts, summaries, search shards, warehouse rows), and every copy must remain strictly isolated to its tenant and disappear completely upon deletion.
Functional requirements
- One-time admin connection: A customer admin links the company's Zoom workspace via OAuth (delegated token authorization without sharing passwords) and defines capture filters (e.g., ingest only calls with external guests; skip
"Legal"or1:1titles). - Reliable ingestion: Detect finished recordings, respect capture rules before downloading media, fetch audio/video within platform rate limits, and store raw media durably.
- Processing pipeline: Extract audio, run speech-to-text with word timestamps, attribute words to speakers, generate conversation analyses (summaries, topics, action items, talk ratios), and index transcripts for full-text search.
- Serving & lifecycle: Serve playback, transcripts, analyses, and permission-scoped search; support model-upgrade archive reprocessing, historical imports, retention policies, and complete meeting/user/tenant deletion.
Non-functional requirements & assumed scale
- Scale: 3,000 customer organizations (tenants), 250,000 recording users, 1,000,000 recorded meetings/day (average 40 minutes, p99 2 hours, max 6 hours).
- Freshness SLA: Transcript available at p95 <= 15 minutes after Zoom marks a <= 1-hour recording ready; analyses + search within 30 minutes.
- Completeness: Zero eligible recordings silently lost; any missed notification is caught within 1 hour (well before platform-side auto-deletion).
- Tenant isolation, residency & deletion: Zero cross-tenant reads; EU and US tenant data stay strictly in-region; deleted meetings disappear from all read paths immediately and from all primary stores within 7 days (backups age out within 35 days).
- Rate limits: Treated as per-platform, per-category configuration values (asked for rather than hardcoded), paired with adaptive backoff on
429 Too Many Requests.
- One-time admin connection: A customer admin links the company's Zoom workspace via OAuth (delegated token authorization without sharing passwords) and defines capture filters (e.g., ingest only calls with external guests; skip
Back-of-the-envelope numbers
Meetings cluster heavily at
:00and:30of business hours, so we size both daily averages and top-of-hour bursts:Traffic & Platform API Calls Meetings: 1,000,000 / day = ~12 meetings/s average, ~100-150 meetings/s at :00/:30 peaks API calls/meeting: ~4 (1 metadata check + 2-3 file downloads) = ~4M/day (~400k/day for a 10% whale tenant) Reconciliation: 3,000 accounts polled every 30 min = 144,000 list calls/day (cheap!) (Note: polling 250k individual users every 30 min = 12M calls/day -> avoid if account-level exists) Media Bandwidth & Storage (40-min average meeting: ~20 MB audio + ~130 MB video = ~150 MB) Daily media ingress: 1,000,000 x 150 MB = 150 TB/day (~1.74 GB/s average, ~6 GB/s business-hour peak) Annual raw storage: 150 TB x 365 = ~55 PB/year if all video stays hot -> tier cold video after 30 days! Transcripts (text): ~150 words/min x 40 min = 6,000 words (~50 KB compressed JSON) = 50 GB/day Compute (the biggest variable cost!) Daily audio volume: 1,000,000 x 40 min = 40M minutes = ~667,000 audio-hours/day GPU speech-to-text: Assume 1 GPU transcribes + diarizes at 50x real time (72 GPU-s per 1-hr meeting) 667,000 / 50 = ~13,340 GPU-hours/day = ~560 GPUs average, ~1,500+ GPUs at peak LLM analysis tokens: ~8,000 tokens/transcript x 1M = ~8 billion input tokens/day per analysis pass End-to-end latency budget (1-hour meeting, p95 <= 15 min) Fetch 30 MB audio (~5s) -> prepare 16 kHz chunks (~10s) -> 6 x 10-min chunks in parallel on GPUs (~12s) -> speaker attribution (~40s) -> summary/indexing (~45s) = ~2 minutes of active compute, leaving ~13 min headroom for top-of-hour queueing and rate-limit smoothing.Four architectural insights jump right out of these numbers: 1. Fetch audio before video: Audio is 6.5x smaller than video (
20 MBvs.130 MB) and drives the entire transcript/analysis critical path; video transcoding can run in parallel off the critical path. 2. GPUs (~1,500 at peak) dominate cost: Persisting intermediate outputs and splitting long audio into 10-minute chunks ensures a failed step never wastes completed GPU work. 3. Video (~150 TB/day) dominates storage: Moving video to cold storage tiers after 30 days cuts storage bills dramatically while 50 GB/day of transcripts stay hot for years. 4. A single enterprise tenant can generate 10% of total traffic: Rate limits, GPU scheduling, and historical imports must all be isolated per tenant.API design
We separate fast webhook ingestion, admin onboarding/governance, permissioned user reads, and async operational jobs:
1. Platform Webhook Receiver (Zoom -> our edge) POST /v1/webhooks/{platform} Headers: X-Zm-Signature (HMAC-SHA256), X-Zm-Request-Timestamp Action: Verify signature + <= 5 min timestamp skew, append raw event to Kafka, return 200 OK in < 100 ms 2. Tenant Administration GET /v1/connections/{platform}/authorize -> redirect admin to OAuth consent screen GET /v1/connections/{platform}/callback?code=... -> store encrypted tokens, start reconciliation PUT /v1/tenants/{tenant_id}/capture-rules -> {only_external: true, excluded_users: [...], excluded_titles: ["Legal"]} PUT /v1/tenants/{tenant_id}/retention -> {video_days: 365, transcript_days: 730} POST /v1/imports {connection_id, from_date, to_date} -> 202 Accepted {import_id, estimated_meetings} 3. Product User APIs (tenant_id + user ACL always extracted from auth token, never URL params) GET /v1/meetings?from=&to=&participant=&q= -> paginated list / full-text search hits GET /v1/meetings/{meeting_id} -> metadata + per-stage status (READY | PROCESSING | FAILED) GET /v1/meetings/{meeting_id}/transcript -> active transcript version + user speaker/text overlays GET /v1/meetings/{meeting_id}/analysis -> summary, topics, action items, talk ratios GET /v1/meetings/{meeting_id}/playback -> 302 / JSON with 5-minute signed media URL DELETE /v1/meetings/{meeting_id} -> 202 Accepted (hidden from reads immediately!) 4. Internal / Compliance Operations POST /v1/admin/reprocess {scope, stage: "transcribe", version: "asr-v8", priority: "archive"} POST /v1/admin/deletions {scope: "meeting" | "user" | "tenant", target_id} -> {request_id} GET /v1/admin/deletions/{request_id} -> per-store verification progressData model and artifact lineage
We shard relational metadata by
tenant_idwith row-level security (RLS) (database-enforced rules guaranteeing a query scoped to Tenant A can never read Tenant B's rows), store media/stage outputs in regional object storage, and track every derived copy in anartifactslineage table:Relational Metadata DB (PostgreSQL sharded by tenant_id, regional) connections (connection_id PK, tenant_id, platform, platform_account_id, status ACTIVE|BROKEN, secret_token_ref, reconciled_until_ts) meetings (meeting_id PK, tenant_id, platform, platform_occurrence_id, topic, host_user_id, started_at, ended_at, state DISCOVERED|SKIPPED_POLICY|FETCHING|PROCESSING|READY|FAILED|DELETED, UNIQUE (tenant_id, platform, platform_occurrence_id)) recording_files (meeting_id, platform_file_id, role audio|video|speaker_audio|chat, size_bytes, sha256, object_uri, fetch_state, UNIQUE (meeting_id, platform_file_id)) stage_runs (meeting_id, stage, version, status PENDING|RUNNING|SUCCEEDED|FAILED|CANCELLED, attempt, output_uri, gpu_seconds, heartbeat_at, UNIQUE (meeting_id, stage, version)) artifacts (artifact_id PK, tenant_id, meeting_id, store object|search|warehouse|cache, location_key, stage, version, deleted_at) <-- EVERY derived copy registered here! active_versions (scope global|tenant_id, stage, active_version) user_edits (edit_id PK, meeting_id, kind speaker_rename|word_fix, start_ms, end_ms, payload) tombstones (tenant_id, platform, platform_occurrence_id, deleted_at) <-- blocks re-ingestion! Object Storage (regional bucket, per-tenant KMS encryption key) media/{tenant_id}/{meeting_id}/raw/{platform_file_id}.m4a artifacts/{tenant_id}/{meeting_id}/{stage}/{version}/output.json Search Cluster (OpenSearch/Elasticsearch per region, routed by tenant_id) Document per utterance: {tenant_id, meeting_id, segment_id, speaker, text, start_ms, acl_principals, version}Two schema choices prevent classic bugs: - Keying on
platform_occurrence_id(UUID), never the numeric meeting ID: Recurring weekly meetings reuse the same 10-digit Zoom meeting number and join URL, whereas each occurrence gets its own unique UUID. -artifacts+tombstonestables: Registering every written file/index entry inartifactsmakes complete deletion deterministic, and recording(tenant_id, platform, platform_occurrence_id)intombstonesstops reconciliation jobs from ever re-downloading a deleted meeting.End-to-end architecture
Every region (US, EU) runs an independent stack so customer media and transcripts never cross data-residency boundaries:
External Video Platform (Zoom Webhooks & REST API) 1. Push Webhook | ^ 2. Poll list & stream files v | (Redis per-account token buckets) [ Webhook Receivers ] | Verify HMAC + <=5m ts | Append to Kafka -> 200 OK | | | v | [ Kafka Raw Event Log ] | | | v | [ Ingest Coordinator ] <---- [ Reconciler Workers ] Idempotent upsert, Poll last 48h every 30m + tombstone & policy check targeted post-meeting timers | v [ Priority Fetch Queue ] --> [ Streaming Fetch Workers ] (fresh audio > video > Pipe HTTP range stream -> 64 MB historical imports) S3 multipart upload + SHA-256 | v [ Regional Object Storage (Raw) ] | v [ Stage Orchestrator ] ----> Priority + Tenant-Fair Queues / | | \ v v v v [ Prepare Audio ] [ GPU Transcribe + [ LLM Analyzers ] [ Search / Warehouse 16kHz + 10m Speaker Attribute Summary, Topics, Indexer ] chunks (CPU) (GPU Fleet) ] Action Items ] | \ | | / +-----> [ Versioned Artifacts + Lineage DB ] <--------+ | [ Metadata DB ] [ Search Cluster ] [ Analytics Warehouse ] ^ ^ ^ +----- [ Product API + AuthZ ] --------+ <-- End Users ^ [ Deletion Engine ] ----+ (walks `artifacts` + `tombstones`)Deep dive 1: reliable ingestion with webhooks, reconciliation, and rate limits
A resilient ingestion layer never relies on a single external signal. Webhooks deliver in seconds during healthy periods, but if our edge or Zoom's sender suffers an outage longer than Zoom's retry window, push events vanish permanently. Conversely, polling alone burns API quota and adds minutes of lag. Pairing both paths behind one idempotent coordinator gives fast freshness and 100% completeness:
- Fast decoupled webhook receipt: Receivers verify the HMAC (cryptographic message signature computed with a shared secret over
timestamp + body), reject timestamps older than 5 minutes to prevent replay attacks, write the raw payload to Kafka, and return200 OKin < 100 ms without touching Postgres or downloading files. - Reconciliation loop: Every 30 minutes, reconcilers list each active connection's recordings from the past 48 hours (plus a targeted timer that polls a single meeting if
meeting.endedarrived withoutrecording.completedafter2 x duration + 30 min). If > 1% of an account's meetings are discovered first by the reconciler, an alert fires that webhooks are broken for that account. - One idempotent convergence function handles duplicate webhooks, late webhooks, and reconciler passes identically:
def on_recording_discovered(event, connections, tombstones, meetings, files_db, platform_api, fetch_q): """Converge webhook events and reconciliation polls onto one idempotent state transition.""" conn = connections.get_active(event.platform, event.platform_account_id) if conn is None: return # Never re-download a meeting that a user or retention job previously deleted if tombstones.exists(conn.tenant_id, event.platform, event.occurrence_id): return # Atomic INSERT ... ON CONFLICT DO NOTHING keyed on (tenant_id, platform, occurrence_id) meeting = meetings.insert_if_absent(conn.tenant_id, event.platform, event.occurrence_id) if meeting.state in ("SKIPPED_POLICY", "DELETED"): return # Fast skip: 48h reconciliation sees each meeting ~96 times; spend 0 API quota if all files known! if event.file_ids and files_db.all_registered(meeting.meeting_id, event.file_ids): return # Fetch metadata (participants, title, file list) BEFORE downloading any bytes details = platform_api.get_recording_metadata(conn, event.occurrence_id) if not capture_policy_allows(conn.tenant_id, details): meetings.set_state(meeting.meeting_id, "SKIPPED_POLICY") return # Enqueue only newly discovered files, prioritizing 20 MB audio ahead of 130 MB video for f in details.files: if files_db.insert_if_absent(meeting.meeting_id, f.file_id, f.role, f.size_bytes): priority = "FRESH_AUDIO" if f.role in ("audio", "speaker_audio") else "FRESH_VIDEO" fetch_q.enqueue(meeting.meeting_id, f, priority=priority)- Rate limiting, OAuth refresh, and streaming downloads:
- Per-account token buckets + AIMD: Fetch workers acquire a token from a Redis token bucket keyed by
(platform_account_id, api_category). On429 Too Many Requests, workers honorRetry-Afterand apply AIMD (Additive Increase, Multiplicative Decrease — halving the bucket rate immediately on429and nudging it back up slowly on sustained200s). - Single-flight OAuth refresh: Many OAuth providers invalidate the old refresh token the instant a new one is minted. Workers acquire a short per-connection Redis lease before refreshing so two workers never race and break the customer's connection; if an admin revokes access (
invalid_grant), the connection flips toBROKEN, jobs pause (rather than failing), and the customer admin is alerted. - Streaming multipart uploads: A 6-hour meeting video can exceed 1.2 GB. Workers pipe HTTP download streams directly into 64 MB multipart uploads to object storage while updating a running SHA-256 hash — holding <= 64 MB in RAM and resuming from the last completed part via HTTP
Rangeheaders if a connection drops.
- Per-account token buckets + AIMD: Fetch workers acquire a token from a Redis token bucket keyed by
- Fast decoupled webhook receipt: Receivers verify the HMAC (cryptographic message signature computed with a shared secret over
Deep dive 2: staged idempotent GPU pipeline and multi-tenant fairness
Expensive compute stages must checkpoint intermediate outputs so retries never repeat completed work. Because GPU transcription costs orders of magnitude more than audio slicing or search indexing, we break processing into small stages connected via immutable versioned objects in storage — and split long meetings into 10-minute audio chunks with 5 seconds of overlap so a preempted GPU loses at most 12 GPU-seconds of work (
10 min / 50x) while a 6-hour meeting finishes in parallel across 36 GPUs!Raw Audio (20 MB) | v [prepare_audio: CPU, ~10s] 16 kHz Mono + 10-Min Chunk Manifest (persisted) | +---> Chunk 0 [00:00..10:05] ---> GPU Worker ---> chunk_0.json (persisted!) +---> Chunk 1 [10:00..20:05] ---> GPU Worker ---> chunk_1.json (persisted!) +---> ... | v [attribute: stitch overlaps + map speakers via per-speaker tracks or diarization] Versioned Transcript JSON (persisted) | +---> [summary LLM] ---> summary.json + +---> [topics / items] ---> insights.json +---> [index] ---> Search + WarehouseEvery stage worker executes the same idempotent wrapper (safe to retry at any point without duplicate side effects or orphaned files):
def execute_stage_job(job, stage_runs, meetings, artifacts, object_store, orchestrator): """Run one pipeline stage idempotently while guarding against concurrent deletion.""" existing = stage_runs.get(job.meeting_id, job.stage, job.version) if existing is not None and existing.status == "SUCCEEDED": return # Duplicate queue message: output is already persisted if meetings.is_deleted(job.meeting_id): stage_runs.mark_status(job, "CANCELLED") return output_key = f"artifacts/{job.tenant_id}/{job.meeting_id}/{job.stage}/{job.version}/out.json" inputs = load_immutable_inputs(job, object_store) result_bytes = run_compute_kernel(job.stage, job.version, inputs) # Re-check deletion right before writing because GPU stages can run for minutes! if meetings.is_deleted(job.meeting_id): stage_runs.mark_status(job, "CANCELLED") return # Write-ahead lineage: register location BEFORE uploading so no copy is ever untracked artifacts.register(job.tenant_id, job.meeting_id, "object", output_key, job.stage, job.version) object_store.put(output_key, result_bytes) # Conditional DB transition: if two retry workers raced, only the first enqueues dependents won_transition = stage_runs.mark_succeeded_once(job, output_key) if won_transition: orchestrator.enqueue_downstream_stages(job)Speaker attribution hierarchy: When Zoom provides separate per-participant audio tracks, transcribe each track directly for ~100% speaker accuracy; otherwise run speaker diarization (clustering voice segments by vocal characteristics) and align clusters against Zoom's active-speaker timeline and join/leave metadata.
Multi-tenant GPU scheduling, fairness, and autoscaling: - Four priority tiers:
fresh(live SLA meetings) >interactive(user-triggered re-runs) >import(onboarding history) >archive(model-upgrade backfills), reserving 5% of capacity so lower tiers never starve completely. - Weighted fair queuing within each tier: Whenever GPUs pull the next job in a tier, pick the waiting tenant with the lowest recentgpu_seconds_last_10_min / tenant_weight, plus a soft 15% fleet cap per tenant that applies only when other tenants are queued (keeping GPUs 100% utilized when quiet). - Drain-time autoscaling + spot instances: Autoscale onqueued_fresh_audio_minutes / fleet_throughput_per_minute(scale out if > 5 min), pre-warm a 15% GPU buffer ahead of:00/:30business-hour spikes, and runimport/archivechunks on 60–70% cheaper preemptible (spot) GPUs (cloud GPUs reclaimable on short notice, which chunk checkpointing handles seamlessly). - Retries, DLQs & partial results: Transient timeouts/5xx/spot preemptions retry with exponential backoff + jitter; corrupt/silent media fails permanently without wasting retries; repeatedly crashing poison files route to a dead-letter queue (DLQ) (a holding queue for failed jobs awaiting engineer inspection) with alerts. Transcripts publish immediately even if a downstream LLM summary is delayed.Deep dive 3: versioned reprocessing without losing user edits
When the ML team upgrades speech-to-text from
asr-v7toasr-v8(or tunes a summary prompt fromsum-v4tosum-v5), we must never overwrite live data in place:- Coexisting versioned artifacts + atomic read pointer: Because
versionis part of every object key (.../transcribe/asr-v8/out.json) and search document,asr-v8writes alongsideasr-v7. Anactive_versionspointer per(tenant_id, stage)controls which version the API serves, falling back toasr-v7per meeting untilasr-v8finishes. - Selective stage reuse: Upgrading
sum-v5reads existingasr-v8transcripts directly at zero GPU cost; upgradingasr-v8reuses already-prepared 16 kHz audio chunks without re-downloading 150 MB videos. - Preserving human edits: Users rename
"Speaker 1" -> "Priya"and fix product names. Storing edits inuser_editsanchored to[start_ms, end_ms]timestamps (rather than mutating transcript JSON) lets the API overlay user edits cleanly ontoasr-v8transcripts! - Scoped rollout & rollback: Validate offline -> shadow 1% of live traffic -> switch new meetings on canary tenants -> backfill recent/viewed history newest-first on spot GPUs (reprocessing all 2 years = ~730M meetings = ~9.7M GPU-hours, so scoping to the last 6 months + lazy reprocess-on-open saves millions of dollars) -> flip tenant pointer + search version together -> purge old artifacts via
artifactslineage after 30 days.
- Coexisting versioned artifacts + atomic read pointer: Because
Deep dive 4: tenant isolation and deletion that reaches every copy
Defense-in-depth tenant isolation: -
tenant_idis always derived from the verified session token (never request parameters), enforced by Postgres RLS, mandatory search routing/filters, andtenant_id/object prefixes encrypted under per-tenant KMS keys. - Media playback never exposes public buckets;/playbackchecks meeting ACLs and mints a 5-minute signed URL. Automated canary tests continuously attempt cross-tenant reads in CI and production.Lineage-driven cascading deletion: Deleting only the raw MP4 leaves confidential sales conversations sitting in transcripts, summaries, search shards, analytics tables, and caches — and without a tombstone, the 30-minute reconciler will promptly download the meeting all over again! Our deletion workflow closes every gap in strict order:
DELETE /v1/meetings/{id} 1. Mark meetings.state = DELETED -> vanishes from all API, playback, and search reads in < 50 ms! 2. Insert into tombstones -> blocks webhooks & reconciler from ever re-ingesting it 3. Cancel pending/running stage_runs -> running GPU workers re-check is_deleted() before writing 4. Walk `artifacts` lineage table -> delete every registered S3 object, search doc, warehouse row, cache key 5. Scrub PII in relational tables -> wipe topic, participant emails, and user_edits (keep opaque IDs only) 6. Run verification sweep at t + 2h -> catches any race with a worker finishing mid-delete; alert if < 100% by day 7Backups and versioned objects expire automatically within the stated 35-day backup retention window; when an entire enterprise tenant churns, destroying that tenant's KMS key (crypto-shredding — rendering all ciphertext permanently undecryptable by deleting its encryption key) makes every encrypted blob and backup unreadable immediately.
Scaling, monitoring, cost visibility, and failure handling
Observability & unit-cost ledger: - Pipeline health: Track p50/p95/p99 freshness per hop, max fresh-queue age per tenant (proves fairness), reconciler first-discovery rate (> 1% signals broken webhooks),
429throttle rate per account, DLQ depth, empty-transcript anomalies, and open deletion requests approaching 7 days. - Cost ledger: Everystage_runscompletion logs(tenant_id, stage, version, gpu_seconds, llm_tokens, storage_bytes), giving exact gross-margin visibility per customer and pre-flight cost quotes before launching imports or archive backfills.Failure summary & key trade-offs: - Webhook receiver / Kafka outage: Multi-AZ receivers return
5xxso Zoom retries; watermark reconciliation recovers anything missed once healthy. - LLM provider outage: Transcripts and playback still publish within 15 minutes; summary jobs queue independently and fill in once recovered. - Core trade-offs: Combining webhooks + reconciliation trades minor polling quota for 100% completeness; persisting chunk/stage artifacts trades cheap S3 storage and a lineage table for zero wasted GPU retries, selective reprocessing, and provable deletion; regional stacks trade cross-region GPU sharing for strict EU/US data residency.
Intuition & how it works
Think of capturing and analyzing enterprise Zoom recordings like running a regional factory built on three strict guarantees:
1. Two independent intake checks feeding one ledger: A fast doorbell (webhook, an HTTP push notification sent by Zoom when a recording finishes) gives low latency, while a 30-minute mailroom manifest check (reconciliation, periodically listing recent recordings via API) catches anything the doorbell missed — and both converge on a single idempotent database insert (safe to repeat multiple times with the exact same outcome) keyed on the meeting occurrence's unique UUID.
2. Checkpointed assembly stations on shared GPUs: Instead of one monolithic job, small stages (fetch -> prepare_audio -> transcribe 10-min chunks -> attribute speakers -> summarize -> index) save immutable, version-tagged outputs to object storage (cloud blob storage like S3) between every step, so a failed summary or prompt upgrade never re-runs expensive GPU transcription.
3. A master property ledger for deletion: Every stage registers every file, search document, and warehouse row it creates inside an artifacts lineage table, so when a customer deletes a meeting, the deletion engine hides the meeting immediately, plants a tombstone (a tiny marker blocking future re-downloads), and walks the ledger to erase every single derived copy.
Why does the naive "download MP4 inside the webhook, transcribe end-to-end in one FIFO queue, delete the MP4 when asked" design fail? Downloading large files inside a webhook handler causes HTTP timeouts and retry storms, while relying on webhooks alone silently drops meetings whenever an outage outlasts Zoom's retry window. Running 2-hour meetings unchunked in one global FIFO queue repeats 100% of GPU work on any late failure and lets one customer's historical backfill stall everyone else's fresh meetings for days, while deleting only the raw MP4 leaves confidential transcripts searchable and lets the next polling cycle re-import the deleted meeting.
Walk through four concrete events in the lifecycle of a 40-minute customer call (occurrence_id = "uuid-7f3a" in tenant org_88, meeting_id = "call_504"):
1. t = 00:00 Meeting ends & Zoom sends webhook (plus a duplicate webhook 4 seconds later)
- Webhook receiver verifies HMAC signature, appends both events to Kafka, returns 200 OK in 35 ms.
- Ingest Coordinator runs INSERT ON CONFLICT DO NOTHING for "uuid-7f3a": first event checks capture
rules on metadata and enqueues 20 MB audio ahead of 130 MB video; duplicate event is a no-op!
2. t = 00:15 Streaming fetch + parallel GPU chunk transcription
- Fetch worker acquires an account token-bucket permit and streams 20 MB audio to S3.
- Audio splitter creates four 10-minute chunks; 4 GPUs transcribe them in parallel in ~12 seconds,
stitching speaker labels into `artifacts/org_88/call_504/transcribe/asr-v7/out.json` (logged in `artifacts`).
3. t = 01:30 Analyses & search go live (well inside the 15-minute p95 SLA)
- Summary LLM and OpenSearch indexer read `asr-v7/out.json`, register their outputs in `artifacts`,
and flip `meetings.state = READY`.
4. Day 14 Customer clicks "Delete Meeting"
- API sets `state = DELETED` (instant 404 on all reads) + writes "uuid-7f3a" to `tombstones` (so the
30-minute reconciler never re-fetches it), then walks `artifacts` to wipe raw media, chunks,
transcripts, summaries, and OpenSearch segments, followed by a 2-hour verification sweep.
Key trade-offs
- Webhooks + periodic reconciliation vs. either signal alone. Webhooks alone lose recordings during outages exceeding the provider's retry window, whereas polling alone burns API rate limits and delays freshness by 15–30 minutes. Combining both behind one unique
(tenant_id, platform, platform_occurrence_id)key trades modest polling quota (144k account-list calls/day across 3,000 tenants) for fast freshness, 100% completeness, and a built-in webhook-health alarm whenever the reconciler discovers > 1% of recordings first. - Persisted versioned stage artifacts + 10-minute chunks vs. one in-memory pipeline job. Saving intermediate audio chunks, transcripts, and analyses in object storage adds minor storage overhead and requires maintaining an
artifactslineage table, in exchange for bounding spot-GPU preemption loss to ~12 GPU-seconds (10 min / 50x), publishing partial results (transcript ready even if LLM summary lags), and upgrading downstream prompts at zero GPU cost. - Strict priority tiers + weighted fair GPU queuing vs. a single FIFO queue. Separating
fresh>interactive>import>archivequeues and picking the waiting tenant with the lowest recentgpu_seconds / weightguarantees one whale customer's 2-year backfill cannot delay another customer's 15-minute live SLA, while lifting per-tenant caps whenever queues are empty keeps expensive GPUs fully utilized. - Self-hosted GPU fleet vs. third-party speech-to-text APIs. At ~667,000 audio-hours/day, running ~560–1,500 GPUs internally requires custom autoscaling, batching, and model-rollout infrastructure, whereas managed APIs eliminate GPU ops at the cost of much higher per-minute spend at scale, external rate-limit bottlenecks, and stricter enterprise data-processing constraints.
- Physical lineage-based deletion vs. crypto-shredding. Walking
artifactsdeletes a single meeting precisely across object storage, search, and warehouses while leaving the rest of the tenant intact, whereas crypto-shredding (destroying an encryption key so all ciphertext encrypted under it becomes permanently unreadable, including immutable 35-day backups) is instantaneous and airtight at the whole-tenant level when a customer churns.
Common mistakes
- Downloading media synchronously inside the webhook HTTP handler. Slow downloads trigger webhook timeouts, retries, and cascading overload; always verify the HMAC signature, write to a durable log (Kafka), and return
200 OKwithin ~100 ms. - Keying deduplication on the recurring Zoom meeting number or join URL. Weekly recurring meetings share the same meeting ID, causing every week after week 1 to be dropped as a duplicate; always key on
platform_occurrence_id+platform_file_id. - Downloading files before checking tenant capture/exclusion policies. If a tenant excludes
"Legal"or internal-only meetings, downloading the file first violates privacy compliance by persisting forbidden audio onto your servers. - Buffering whole 1–2 GB video recordings in worker RAM or local disk instead of piping HTTP streams straight into 64 MB S3 multipart uploads with
Range-header resume. - Mutating transcript JSON in place when re-running upgraded models or saving user speaker edits. Overwriting outputs breaks rollback and wipes out human speaker renames; keep versioned outputs immutable under
{stage}/{version}/and store user edits as[start_ms, end_ms]overlays. - Deleting only the raw video/audio file on
DELETE(or forgetting a tombstone). Leaves transcripts and summaries exposed in search indexes and analytics tables — and without atombstonesentry, the next 30-minute reconciliation poll immediately re-ingests the deleted meeting! - Letting multiple workers refresh an OAuth token concurrently. Providers that rotate refresh tokens on each use will invalidate one worker's token and break the tenant's connection unless token refresh is serialized behind a per-connection single-flight lease.
Follow-up questions
- What architectural changes are needed to transcribe and analyze calls live while participants are still speaking? Batch webhooks only fire after a meeting ends, so live capture requires either a visible meeting bot joining as a participant or subscribing to the platform's real-time media stream over WebSockets, forwarding 1–2 second audio frames into a dedicated streaming speech-to-text fleet. Unlike batch GPUs sized by daily audio-hours, streaming GPUs must be sized for peak concurrent live meetings using Little's Law (
concurrency = arrival_rate x duration:1,000,000 meetings / 36,000 business-hour seconds ≈ 27.8 starts/s, times2,400 s= ~67,000 simultaneous meetings, requiring ~700–1,350 dedicated GPUs if each serves 50–100 live streams). Stream partial transcripts to browsers within ~1–2 seconds during the call, then run the standard post-meeting batch pipeline afterward to publish the higher-accuracy diarized transcript as the canonical record. - Suppose a newly onboarded enterprise tenant requests a two-year historical backfill of recorded calls. How do you prevent that import from degrading live SLAs for other tenants? First quantify the blast radius:
2,000 reps x 4 meetings/day x 500 working days = 4,000,000 meetings(~2.67M audio-hours = ~53,300 GPU-hours at 50x real time, plus ~600 TB with video or ~80 TB audio-only). Route all historical jobs into the low-priorityimportqueue backed by cheap preemptible (spot) GPUs with a per-tenant share cap sofreshqueues (including that new customer's own live meetings today!) always preempt backfill work. On the ingestion side, spend only spare tokens from that customer's per-account API rate-limit bucket so live fetches never hit429, cap global backfill download bandwidth, process newest meetings first (fetching 20 MB audio before 130 MB video), and surface an ETA + cost estimate from the cost ledger (~11 days on 200 spot GPUs). - When your speech-to-text model moves to a new major version, how do you backfill historical calls safely and cut traffic over without downtime? Benchmark the new model (
asr-v8) offline and shadow-test it on 1% of live meetings, then switch new meetings first via canary tenants while keeping every artifact path versioned (.../transcribe/asr-v8/...) soasr-v7remains untouched for instant pointer-flip rollback. Backfill historical meetings newest-first in thearchivepriority class on spot GPUs — reusing stored 16 kHz audio chunks so raw videos are never re-downloaded — and re-run dependent downstream stages (attribution, summaries, and search documents taggedversion = asr-v8). Flip each tenant'sactive_versionsread pointer and search filter atomically once its backfill completes, re-apply time-anchoreduser_editsoverlays on read so human speaker renames survive, and scope archive depth pragmatically (e.g., last 6 months + lazy reprocess-on-open for older calls rather than burning ~9.7M GPU-hours on untouched 2-year-old calls). - How would you extend the ingestion layer to support an additional conferencing provider whose webhook and REST contracts differ from Zoom? Isolate every provider-specific quirk behind a
PlatformConnectoradapter interface (verify_webhook,parse_events,list_recordings,get_recording_metadata,open_media_stream,refresh_oauth_token) that normalizes external payloads into our canonicalMeetingOccurrence,Participant, andRecordingFileentities beforeon_recording_discoveredruns. Because all keys already namespace by(tenant_id, platform, platform_occurrence_id)and rate limits live in per-platform configuration, the entire downstream fetch queue, GPU transcription DAG, search cluster, and lineage-deletion engine remain 100% unchanged. Capability flags on each connector handle feature differences cleanly — for example, increasing reconciliation frequency if a platform lacks webhooks, or falling back from per-speaker audio tracks to acoustic diarization when only mixed audio is provided.
Follow-up questions
- What architectural changes are needed to transcribe and analyze calls live while participants are still speaking?
- Suppose a newly onboarded enterprise tenant requests a two-year historical backfill of recorded calls. How do you prevent that import from degrading live SLAs for other tenants?
- When your speech-to-text model moves to a new major version, how do you backfill historical calls safely and cut traffic over without downtime?
- How would you extend the ingestion layer to support an additional conferencing provider whose webhook and REST contracts differ from Zoom?
Similar questions
- Design a Multi-Calendar Availability and Scheduling Service
- Communicating Difficult News While Preserving Stakeholder Trust
- Creating Momentum When Scope and Ownership Are Unclear
- Working Through a High-Stakes Disagreement With a Colleague
- Global Live Video Streaming Platform
- Multi-User Collaborative Document Editor