Skip to content
Vishesh Gubrani
All consulting services

Cut runaway cloud and video infrastructure bills without breaking playback

Teams serving courses, telehealth, or user video often watch AWS MediaConvert, CloudFront egress, or metered video APIs eat gross margin as libraries grow. I audit where bytes and compute are actually going and migrate high-egress pipelines onto infrastructure you control.

When teams bring me in

  • CloudFront egress or Mux/managed-video bills growing faster than revenue.
  • Your API server proxies uploads or stalls on heavy FFmpeg/GPU media jobs.
  • You need signed playback and viewer analytics (watch time, drop-off) without vendor lock-in.
  • Zero visibility into what a single video or tenant costs to transcode and serve.

How I solve it

  • Eliminate egress and API byte proxying

    Move object storage and delivery to zero-egress Cloudflare R2 with browser-direct windowed multipart uploads, so your API only mints short-lived tokens and never touches raw media bytes.

  • Move encoding to pay-per-second serverless GPUs

    Replace always-on instances or expensive managed transcoders with Modal serverless GPU functions and decoupled QStash queues that scale independently under real traffic.

  • Keep access control and analytics fast at the edge

    Verify short-lived JWT playback tokens in a Cloudflare Worker in front of R2 and stream engagement telemetry into ClickHouse without hitting Postgres on every segment.

What you get

  • 1-week line-by-line cost breakdown comparing current AWS/managed spend against target architecture.
  • Zero-downtime migration plan covering dual-bucket routing, CORS, and object verification.
  • Production implementation: direct multipart uploads, GPU transcoding pipeline, edge playback checks, and ClickHouse metrics.

Proof and engineering notes

Case studies

Technical write-up

Frequently asked questions

How much can moving off AWS MediaConvert and CloudFront actually save?
On a production edtech and healthcare video platform, migrating video processing and delivery from AWS MediaConvert and CloudFront to Cloudflare R2 and Modal serverless GPUs cut monthly spend by 80%, from $5,000 down to $1,000/month (roughly $48,000/year).
Can we migrate existing video libraries without downtime?
Yes. Existing manifests and objects remain served through a fallback path while new uploads target R2 and historical assets backfill asynchronously in batches with verification checks.
When should a team NOT move off a managed service like Mux?
If your monthly video bill is under a few hundred dollars or you require studio-grade hardware DRM (Widevine/FairPlay), a managed provider is usually cheaper in engineering time. The audit tells you honestly before you spend a dollar migrating.
How do you prevent duplicate GPU transcoding jobs on timeouts?
Jobs are claimed atomically in Postgres with conditional state updates, an attempt ID, and a timed lease before dispatching to the GPU worker, so network timeouts never silently start a second paid encode.

Other ways I help

  • AI workflow integration

    Bolt schema-checked LLM workflows into your existing Postgres, Node, or Python stack with deterministic gates, real evals, and daily spend caps.

  • Backend & distributed systems

    Turn vague requirements into reliable backend architecture: Postgres, ClickHouse analytics, idempotent queues, Redis Streams, and Terraform CI/CD.