Mohit Shrivastava logoMOHIT SHRIVASTAVAtechnology leader · builder · operatormohit@portfolio ~/careerdownload-cv
TERMINAL · mohit@portfolio ~/career
mohit@portfolio ~/careergit checkout infra
Infra & performance

Speed, reliability and cloud cost — treated as one problem.

For platforms where page speed, uptime and the monthly cloud bill are business metrics — and someone needs to own all three at once.

RM45–60KRM12–15K
cloud bill / month
≈ −75% while traffic grew 184%
~700ms<10ms
hot-path reads
CMS out of the read path
50–100%~30%
database load
stable through breaking news
97%
cache hit rate
Cloudflare edge strategy
RM400K+
saved per year
the CFO line
why me, for this
$ cat infra.md

Most teams treat performance, reliability and cost as three different jobs. They're one job. At FMT I cut the cloud bill from ~RM45–60K to ~RM12–15K a month while traffic grew 184% and load times fell from 5.2s to 1.3s — because the same discipline drives all three: understand what every layer is actually doing, then remove the waste.

The concrete work: a Cloudflare strategy running at 97% cache hit rate; database load brought from a constant 50–100% down to ~30% through query repair and indexing; a GraphQL gateway that reads straight from MySQL replicas in under 10ms because PHP didn't deserve to be in the hot path; and rendering choices (ISR, cache-aware pages) made from CPU evidence, not fashion.

I read infrastructure the way a CFO reads a P&L. Every service must justify its existence; every millisecond and every ringgit gets traced to a cause. That's how a platform gets faster, steadier and cheaper at the same time.

the turnaround, in one diff
$ diff fmt-infrastructure: Oct 2023 → today
-Every article read boots PHP + 30 plugins — ~700ms when healthy
-Pagination scanning 1.4M rows per query (SQL_CALC_FOUND_ROWS)
-Database pinned at 50–100% — sections vanish under load
-RM45–60K/month and climbing
+Hot path reads straight from MySQL replicas — under 10ms
+Lean LIMIT/OFFSET · indexes repaired · queries rewritten
+Database at ~30% through breaking-news spikes
+RM12–15K/month — RM400K+ a year back in the budget
the business outcome

The bill is an engineering metric.

Most teams treat the cloud bill as finance's problem and performance as engineering's problem. They're the same problem: waste. At FMT I cut the cloud bill from RM45–60K to RM12–15K a month — while traffic grew 184% and load times fell from 5.2s to 1.3s. Not by negotiating discounts, but by understanding what every layer actually does: cache discipline at the edge, query repair in the database, and removing an entire runtime from the hot path.

FMT cloud bill — peak monthsRM45–60K/mo
After the cache rework — traffic up 184%RM12–15K/mo
problems I've already solved
“The cloud bill grows faster than the audience.”
Trace every ringgit to a cause — oversized layers, lazy queries, cache misses, vendor sprawl — then remove the waste.
RM45–60K → RM12–15K/month · RM400K+/yr
“The site falls over exactly at peak.”
Edge and database engineered together: 97% cache hit, repaired queries, connection hygiene, load tested against real spikes.
DB 50–100% → ~30% · stable through breaking news
“Pages are slow and it's costing us traffic.”
Core Web Vitals as an engineering target — rendering strategy chosen from CPU evidence, cache-aware pages, asset discipline.
5.2s → 1.3s · green CWV · visibility recovered
“One legacy service bottlenecks everything.”
Decouple the hot path: build a thin, stateless read layer beside the legacy system — and switch over with rollback in hand.
~700ms → <10ms · cutover by one env var
“We're paying enterprise prices for solved problems.”
Use what open platforms already do brilliantly; build the thin layer on top; keep the exit door open.
RM0/month video infrastructure · ~RM500K/yr avoided
“Nobody can tell me why it's slow.”
Profile, don't guess — read the CPU, the query plans and the cache rates until the system confesses.
Every fix above started as a measurement
first 90 days on your platform
Days 1–30
Measure everything
Spend by service, cache hit rates, query plans, Core Web Vitals, failure modes. The platform tells you where the waste is — if you actually look. Findings land in business language with ringgit attached.
Days 31–60
Cut waste, fix hot paths
The high-leverage moves first: cache strategy, the worst queries, the oversized layers. At FMT this phase changed both the bill and the stability story in the same month.
Days 61–90
Lock the baseline
A cost and performance baseline the platform is held to — dashboards, budgets per layer, and a roadmap where every line knows what it costs and what it earns.
signals
The CFO lens
RM400K+/year saved at FMT — growth and cost-cutting in the same motion.
Edge strategy
Cloudflare at 97% cache hit · firewall, bot management and purge discipline.
Database surgery
50–100% load → ~30% · query repair, indexing, replica reads, connection hygiene.
Hot-path engineering
~700ms → <10ms reads by removing an entire runtime from the request path.
Delete-first architecture
Every service must justify its existence. I'd rather remove a layer than add a clever one.
Performance is revenue
5.2s → 1.3s wasn't a vanity metric — it moved search visibility, ads and reader retention.
case studies on this branch
related projectsfull archive →
CMS-Decoupled GraphQL Gatewayfeatured
FMT · 2025 · Solo
Reads straight from MySQL replicas, bypassing WordPress — ~700ms → <10ms.
Node.jsTypeScriptgraphql-yogaMySQLCloud Run
Free Malaysia Todayfeatured
FMT · 2023–present · Team
National bilingual news platform at 8.5M+ users — modernized end to end.
Next.jsGraphQLCloudflareGCPKubernetesMySQL
YouTube-native Video CMSfeatured
FMT · 2025 · Solo
33K+ videos, 2M+ daily views, RM0/month — YouTube as the database.
Next.jsMongoDBCloudflareYouTube APIWebSub
stack on this branch
CloudflareGCPKubernetesDockerMySQLRedisNode.jsNext.js / ISRCore Web VitalsCI/CD
Available — serving notice · open to interviews now

Need the platform faster, steadier and cheaper?

Speed, reliability and cost aren't three problems — they're one problem. If yours is going the wrong way, I've already fixed it at national scale.