India’s Leading Domain & Web Hosting Provider
HR-tech SaaS measures cloud cost per tenant across payroll, attendance and hiring modules
Multi-tenant HRMS serving 3,200 Indian employers, from 50-person firms to 40,000-employee enterprises · AWS Mumbai (ap-south-1), DR in Hyderabad (ap-south-2) · 12 weeks
As-is situation
The company priced its SaaS per employee per month, regardless of module usage. Its AWS bill was ₹46 lakh a month across shared RDS PostgreSQL clusters, Lambda payroll runs and an OpenSearch cluster for hiring. Leadership suspected that a few large enterprise tenants with heavy month-end payroll runs and frequent statutory report regeneration were unprofitable, but could not prove it. Allocation was by account only: production, non-production and DR. No tenant or module tags existed, and shared databases served all tenants.
- No module or tenant dimension in billing; 100% of production cost was a single number.
- Shared RDS clusters and OpenSearch represented 58% of production cost.
- Month-end payroll spikes from large tenants were suspected but unmeasured.
Approach, tools and architecture
NTSPL added module tags to all resources through Terraform defaults and tag policies, separating payroll, attendance and hiring. Tenant-level allocation for shared services used application telemetry: RDS cost split by per-tenant query time from pg_stat_statements sampling, Lambda payroll cost by tenant invocation duration from structured logs, and OpenSearch by per-tenant index storage and query count. AWS Cost Categories handled module-level splits; tenant-level drivers were joined to CUR 2.0 in Athena. Amazon Quick Sight showed cost per tenant against revenue per tenant.
Implementation approach
Measured results
Operational improvements
- Report regeneration is now cached per payroll cycle, cutting a cost driver the allocation exposed.
- Enterprise contract renewals include module-level usage tiers informed by cost per tenant.
Cost considerations
Telemetry export and Athena queries add about ₹35,000 a month. Sampling pg_stat_statements rather than full query logging kept database overhead under 1% CPU. Tenant allocation uses drivers, so it is an estimate, validated within 6% against load tests.
Return on investment
Caching report regeneration saved ₹4.8 lakh a month, and repricing 37 low-margin enterprise tenants at renewal is projected to add ₹1.2 crore of annual revenue. Both followed directly from the allocation model, repaying the 12-week programme several times over.