India’s Leading Domain & Web Hosting Provider
E-grocery platform moves 410 EC2 instances to Graviton and cuts compute cost 33%
Online grocer in 14 cities, 2.6 lakh orders a day, Java and Node.js services on EC2 · AWS Mumbai (ap-south-1) · 21 weeks
As-is situation
The grocer ran 640 EC2 instances across catalogue, cart, slotting and warehouse services, almost all on m5 and c5 families chosen during a 2021 migration. Fleet average CPU was 11% and p95 was 34%. Autoscaling groups held minimums sized for the 7-9 a.m. slot-booking rush all day. EC2 cost ₹96 lakh a month. Memory data existed for only 90 instances, so platform engineers refused to act on 380 open Compute Optimizer recommendations, arguing the JVM services were memory-bound and CPU numbers were misleading.
- Only 14% of instances reported memory, blocking any evidence-based downsizing.
- Autoscaling minimums kept 2.4x the overnight requirement running for 15 hours a day.
- 92% of the fleet sat on previous-generation x86 families.
Approach, tools and architecture
NTSPL rolled out the CloudWatch agent through Systems Manager and collected 70 days of memory data, which showed only the search cluster was genuinely memory-bound. Java and Node.js services were rebuilt as multi-architecture images and canaried on m7g and c7g for a week each. 410 instances moved to Graviton, 140 moved down one size on current-generation x86, and search moved to r7g. Autoscaling minimums were cut to overnight levels with scheduled scale-out at 6:30 a.m. All changes went through Terraform pull requests in nine weekly batches.
Implementation approach
Measured results
Operational improvements
- Every service now builds arm64 and amd64 images, so future instance choices are not locked to one architecture.
- Memory telemetry on every instance ended the CPU-only debate that had stalled earlier optimisation.
Cost considerations
Agent telemetry added about ₹1.2 lakh a month in CloudWatch custom metrics, trimmed later by dropping per-process metrics. Two weeks of CI engineering for multi-architecture builds was the main one-time cost. The planned Savings Plan was reduced by ₹14 lakh a month after rightsizing.
Return on investment
₹32 lakh a month of compute savings, plus a smaller and better-fitting Savings Plan, repaid the engineering and telemetry cost within the first month after the final batch. Checkout latency was unchanged within measurement noise.