Multi-Cloud Backend Cost & Performance — Engineering Case Study
Ayu Health · Series A · by Yatharth Lakhera
Cross-cloud cost + performance sprint at Ayu Health (Series A) — AWS spend down ~40%, Document AI down ~95%, 10x throughput on the hottest queries, shipped in ~30 days with zero production downtime.
The challenge
Ayu Health was burning through AWS credits fast — past a certain point the company would flip from 'free AWS' to real cash burn at a rate that materially shortened runway. I'd flagged the cost shape to the CTO earlier (servers visibly under-utilized, a whole heavy service just for PDF invoicing), but bandwidth wasn't allocated until credits were nearly gone. In parallel, a Document AI experiment on GCP (no architecture review) racked up a bill that made the CTO blink. Operating context: ~5k req/min, ~1 TB MySQL primary, 10–15 services on AWS, deploys every 2–3 hours, ~50 engineers committing.
The build
Cross-cloud cost + performance sprint, ~30 days, zero production downtime. On AWS: right-sized an under-utilized fleet (most servers <40% util), ran a live RDS downgrade migration (AWS offers no in-place downsize), killed a heavy PDF-invoice server by replacing server-side rendering with a mobile deep-link flow, indexed the top-10 hot queries, and added a read replica so analytics stopped hammering the primary. On GCP: routed Document AI through an OCR-first page-targeting trick (full story in the Insurance SaaS case study).
Impact
- AWS monthly spend down ~40%, sustained
- GCP Document AI spend down ~95% (~₹4L → ~₹30k/month) — see Insurance SaaS
- 10x throughput on the top-10 worst queries (indexes + analytics offload)
- P95 under 500ms, Apdex = 1 across services
- Delivered in ~30 days, zero production downtime
Technologies: AWS, GCP, Java, Spring Boot, Node.js, MySQL, Redis, Elasticsearch, RDS, New Relic
Yatharth Lakhera — full portfolio