For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /docs/infrastructure/providers/azure/cost-estimation.md.

Azure Cost Estimation

No fees from tsdevstack

tsdevstack is free and open source. All costs on this page are paid directly to Microsoft Azure. There is no bill from tsdevstack and there never will be.

These are estimates based on published Azure pricing as of July 2026 in a US region (East US). Actual costs depend on your region, traffic, and any pricing changes by Microsoft. Always verify with the official pricing pages linked at the bottom.

2026 pricing pressure

The AI buildout is squeezing server hardware supply, and that is expected to reach cloud list prices in the second half of 2026. As of July 2026 the Azure rates on this page are unchanged, including Container Apps consumption at $0.000024/vCPU-second and $0.000003/GiB-second.

Server memory contract prices rose sharply through the first half of 2026, and there is typically a 6 to 9 month lag before that shows up in cloud pricing, with forecasts pointing to roughly 5-10% general increases. The most exposed lines here are PostgreSQL Flexible Server and Managed Redis, which are priced off provisioned memory, followed by App Service plans. Front Door base fees are the least exposed. If you are budgeting past Q3 2026, add a 10% buffer on the database and cache lines.


What Gets Deployed

A typical tsdevstack project (3 NestJS backends + 1 Next.js frontend) creates these billable resources on Azure:

ResourceAzure ServiceDefault Configuration
Kong gatewayApp Service (dedicated plan)B1 plan, always_on: true; a trace collector runs next to Kong on the same plan, with no extra charge
FrontendApp Service (shared plan)B1 plan, always_on: true
Backend services (x3)Container Apps (Consumption)0.5 vCPU, 1 GiB memory, configurable min instances
SPA (react-app)Blob Storage + Front DoorStatic container, no compute
DatabasePostgreSQL Flexible ServerB_Standard_B1ms, 32 GB disk
CacheAzure Managed RedisBalanced_B0, 1 GB
Edge / CDN / WAF / SSLFront DoorStandard or Premium tier
SecretsKey VaultRBAC mode
DNSAzure DNS1 zone
Kong private endpoint (with Next.js apps)Private Link + private DNS zone1 endpoint, the Next.js servers' path to Kong
Container imagesAzure Container RegistryBasic tier
TracesApplication Insights (Log Analytics)Every request (tracing.sampleRate 1)
DashboardAzure Monitor workbook1 per environment, free

You can override CPU, memory, instance counts, database tier, Redis tier, disk size, App Service SKU, and Front Door tier in infrastructure.json. See Service Configuration for all available options.


Standard vs Premium

The biggest cost decision on Azure is the Front Door tier:

StandardPremium
Monthly base~$35~$412.50
Origin protectionAccess Restrictions + FDID headerPrivate Link (no public access)
WAF~79 custom rulesDRS 2.1 + Bot Manager + ~35 custom rules
Cost difference—+$377.50/month

All scenarios below show Standard pricing. Add ~$377.50/month for Premium. (Base fees verified against the Azure Retail Prices API, July 2026.)


Scenario 1 — Development (Scale-to-Zero, Standard)

Backend services set to minInstances: 0 in infrastructure.json (the default is 1). Their messages wait in Redis until a request starts them, which is fine for testing. Kong and Next.js always on via App Service. Assumed traffic: ~1,000 requests/day (testing only).

ResourceConfigurationHow it's calculatedEst. monthly
Kong (App Service)B1 plan, always onDedicated App Service plan~$13
Frontend (App Service)B1 plan, always onShared App Service plan~$13
Backend services ×30.5 vCPU, 1 GiB, min=0Consumption billing — free grant covers idle~$0-3
SPA bucketBlob Storage + Front DoorStorage + minimal egress~$1
PostgreSQL Flexible ServerB_Standard_B1ms, 32 GB1 vCore burstable + storage~$14
Managed RedisBalanced B0, 1 GBEntry-level tier, two nodes (high availability)~$26
Front Door (Standard)CDN + WAF + SSL + routingBase fee + requests + data transfer~$35
ACR BasicContainer Registry10 GB included storage~$5
DNS, Key Vault, LogsMinimal—~$1-3
Kong private endpointNext.js servers to Kong$0.01/hour + $0.01/GB processed + $0.50 DNS zone~$8
Traces~240k spans, ~0.24 GBWithin the 5 GB free each month$0
Total (Standard)~$116-121
Total (Premium)+$377.50 for Front Door Premium~$494-499

Cold starts after scale-to-zero: 2-5 seconds. Container Apps use KEDA HTTP scaling — no wake-up mechanisms needed.


Scenario 2 — Production (Always-On, Single Instance, Standard)

All services with minInstances: 1 (the default). Assumed traffic: ~100,000 requests/day (3M/month).

ResourceConfigurationHow it's calculatedEst. monthly
Kong (App Service)B1 plan, always on—~$13
Frontend (App Service)B1 plan, always on—~$13
Backend services ×30.5 vCPU, 1 GiB, min=1 each3.9M vCPU-sec at idle rate + 7.5M GiB-sec, less free grant~$39
SPA bucketBlob Storage + Front DoorStorage + egress~$1
PostgreSQL Flexible ServerB_Standard_B1ms, 32 GB—~$14
Managed RedisBalanced B0, two nodes—~$26
Front Door (Standard)Moderate traffic$35 base + 3M × $0.011/10k~$38-45
ACR, DNS, Key Vault, LogsMinimal—~$6-8
Kong private endpointNext.js servers to Kong$0.01/hour + $0.01/GB processed + $0.50 DNS zone~$8
Traces~24M spans, ~24 GB at sampleRate 1~$2.30/GB (the free 5 GB goes to logs)~$55
Total (Standard)~$213-222
Total (Premium)+$377.50 for Front Door Premium~$591-600
Total (Standard) with sampleRate 0.1Traces ~$6~$164-173
Tip

Container Apps idle billing keeps this moderate: a minInstances: 1 replica with no requests bills vCPU at $0.000003/sec instead of the active $0.000024/sec, and the first 180,000 vCPU-seconds and 360,000 GiB-seconds a month are free. Kong and Next.js run one instance each on B1. Autoscale needs a Standard plan (S1, ~$69 per instance) with maxInstances above minInstances; see Azure App Service plans.


Scenario 3 — Production Under Load (3 Instances, 24/7, Standard)

Services auto-scale to 3 replicas on average. App Service runs S1 with autoscale (minInstances: 1, maxInstances above it). Kong and the frontend are assumed to average one instance each; every extra instance adds ~$69. Assumed traffic: ~10M requests/day (300M/month).

ResourceConfigurationHow it's calculatedEst. monthly
Kong (App Service)S1 plan, autoscale, avg 1 instance (assumed)$69 per instance~$69
Frontend (App Service)S1 plan, autoscale, avg 1 instance (assumed)$69 per instance~$69
Backend services ×30.5 vCPU, 1 GiB, avg 3 each11.8M vCPU-sec mostly at active rate + 23.7M GiB-sec~$250
Front Door (Standard)High traffic$35 base + 300M × $0.011/10k~$250-380
SPA bucketBlob Storage + Front DoorStorage + egress at volume~$5-15
PostgreSQL Flexible ServerGP_Standard_D2s_v3, 32 GBUpgraded for load (General Purpose)~$100-130
Managed RedisBalanced B1, two nodesUpgraded for load~$51
ACR, DNS, Key Vault, Logs——~$8-12
Kong private endpointNext.js servers to Kong$7.30 + $0.01/GB processed (assumed under 200 GB) + $0.50 DNS zone~$8-10
Traces~2.4 billion spans, ~2,400 GB at sampleRate 1~$2.30/GB~$5,520
Total (Standard)~$6,330-6,506
Total (Premium)+$377.50 for Front Door Premium~$6,708-6,884
Total (Standard) with sampleRate 0.01Traces ~$55~$865-1,041
The Container Apps idle discount disappears under load

At moderate traffic these replicas bill at $0.000003/vCPU-sec. Once they are serving continuously they bill at $0.000024/vCPU-sec, the same active rate as Cloud Run, which is why this line jumps from ~$39 to ~$250. Front Door's $0.011 per 10,000 requests is the other dominant line at this volume. Earlier versions of this page listed these at ~$15-40 and ~$45-65, which was far too low.

Set a sample rate before production traffic

Azure bills traces as Log Analytics data, at ~$2.30 per GB. At the default tracing.sampleRate of 1, traces are the largest line from moderate traffic on. Keep 1 in 10 traces at ~100k requests/day and 1 in 100 at ~10M requests/day ("tracing": { "sampleRate": 0.01 }). See Traces and Dashboards.

At this scale, consider Azure Reservations for App Service and PostgreSQL (up to 40% savings with 1-year commitment).


What Drives the Cost

#Cost driverWhy
1Front Door tierStandard ($35) vs Premium ($412.50). The single biggest cost variable.
2App Service plansBilled per instance: B1 ~$13, S1 ~$69 a month. Two plans (Kong, Next.js), at least one instance each.
3PostgreSQL tierBurstable B1ms ($14) vs General Purpose D2s ($100+). Pick based on load.
4Managed RedisRuns two nodes (high availability, Azure's default, recommended for production), billed at twice the one-node price Azure lists: B0 ~$26, B1 ~$51.
5Container AppsVery cheap on Consumption plan. Not a major cost driver.
6Traces~$2.30 per GB of spans after 5 GB free. Large from moderate traffic on; tracing.sampleRate sets it.

How to Reduce Costs

  • Use Standard Front Door unless you need Private Link or managed WAF rulesets — saves $377.50/month
  • Stay on B1 App Service for development, one instance per plan. Move to S1 only when you need autoscale, and keep maxInstances at what you are willing to pay for
  • Set minInstances: 0 on Container Apps in development: accept 2-5s cold starts and messages that wait for the next request. See minInstances
  • Use B_Standard_B1ms for development databases — upgrade only when needed
  • Azure Reservations — 1-year commitment saves up to 40% on App Service and PostgreSQL
  • Lower tracing.sampleRate in production: 0.1 keeps 1 trace in 10 and cuts the trace bill by 90%

Override any default in .tsdevstack/infrastructure.json:

{
  "version": "1.0.0",
  "prod": {
    "auth-service": {
      "cpu": "0.5",
      "memory": "1Gi",
      "minInstances": 1,
      "maxInstances": 3
    },
    "database": {
      "tier": "GP_Standard_D2s_v3",
      "diskSize": 64
    },
    "redis": {
      "tier": "Balanced_B1"
    },
    "appService": {
      "kongSku": "S1",
      "nextjsSku": "S1"
    },
    "kong": { "minInstances": 1, "maxInstances": 3 },
    "tracing": { "sampleRate": 0.01 }
  }
}

See Service Configuration for all available options.


Traces and Dashboards

The trace lines above assume ~8 spans per request (Kong, the service, its database queries) and ~1 KB per span. Both are estimates: a request that calls more services or runs more queries makes more spans.

ItemPriceNotes
Traces (Application Insights, in the Log Analytics workspace)~$2.30 per GB ingestedThe first 5 GB each month are free per billing account, shared with logs
Dashboard (workbook)FreeIts log panels run workspace queries, free on the Analytics plan
Slow queries (Query Store)FreeOn General Purpose and Memory Optimized tiers; off on Burstable (Microsoft's advice)
Enhanced Postgres metricsFreeOn for every tier
Reading and following logs (infra:logs, --follow)Free

tracing.sampleRate sets the share of traces kept, and the trace bill with it. See Traces and Dashboards.

Storage Access Logs

With storage buckets, every read, write and delete of their files is logged: the storage account's blob logs, in the environment's Log Analytics workspace (StorageBlobLogs).

ItemPriceNotes
Access logs (Log Analytics)~$2.30 per GB ingestedThe first 5 GB each month are free per billing account, shared with traces and other logs

Example: ~1.5 KB per access (our estimate). A million reads and writes make about 1.5 GB: about $3.50 past the free 5 GB. Every file counts: a page that shows 20 images from a bucket makes 20 reads.


Azure Pricing References