An Azure service that provides an event-driven serverless compute platform.
Your results are inconsistent with the documented Flex Consumption billing model for one HTTP function, one on-demand instance, and no always-ready instances, so open an Azure billing support request with the metric exports and request-level telemetry rather than treating this as expected concurrency behavior.
For a continuously active 2,048-MB instance, the documented calculation is:
2 GB × 3,600 seconds = 7,200 GB-s per hour
Microsoft uses that exact one-instance calculation in its Flex Consumption pricing example. Concurrent requests on the same active instance do not multiply the instance-memory charge. The 1,000-ms minimum applies to an active execution period, including concurrent executions, rather than separately multiplying every overlapping request by one second.^1^^2^
Your approximately 93,500 GB-s result therefore represents about 13 continuously active 2-GB instance-hours:
93,500 ÷ 7,200 ≈ 13.0
That cannot be reconciled with the documented one-instance model merely by setting HTTP concurrency to either 1 or 16.
Capture the billing discrepancy
- In the Azure portal, open Function App → Monitoring → Metrics.
- Select the exact UTC test interval.
- Add these metrics using Sum:
- On Demand Function Execution Units
- On Demand Function Execution Count
- Always Ready Function Execution Units
- Always Ready Units
- Export the chart data to CSV.
- Convert execution units to billed GB-seconds:
On Demand Function Execution Units ÷ 1,024,000
On Demand Function Execution Units is defined as fixed instance memory multiplied by total active execution time in MB-ms; dividing by 1,024,000 produces the On Demand Execution Time meter in GB-s.^3^
- Add Automatic Scaling Instance Count separately. This metric is emitted every 30 seconds and can aggregate all instances used during that interval, so an average such as 1.1–1.3 is not a reliable proof of simultaneous instance count. Use the smallest available time grain and the documented aggregation guidance.^3^
- Export Application Insights request data for the same UTC interval, including:
- timestamp
- duration
- operation/request ID
- cloud role instance
- success and result code
Process IDs alone do not establish how many billable Functions instances existed; include them as supplementary evidence, not as the primary instance identifier.
Verify the scope of the configured limit
The Flex maximum is applied to on-demand instances per function scale group, not to the combined app total. All HTTP triggers belong to the same HTTP scale group, while always-ready instances are outside this maximum.^4^
For your stated single HTTP function and zero always-ready instances, that distinction should not account for a 13× result. Nevertheless, attach evidence of the effective live configuration:
az functionapp scale config show \
--resource-group <RESOURCE_GROUP> \
--name <APP_NAME>
The case should show that the test interval had:
-
maximumInstanceCount = 1 - HTTP
perInstanceConcurrency = 1for the final test - no always-ready HTTP instances
- only the tested HTTP function receiving traffic
Open the support request
Create an Azure billing support request and include:
- subscription and function-app resource identifiers
- exact UTC start and end times for each run
- region, runtime, memory size, and deployment/version identifier
- effective scale and concurrency configuration
- exported metric CSV files
- Cost Management export showing the meter and quantity
- request telemetry and load-generator totals
- the expected-versus-observed table
- this concise discrepancy:
With one HTTP scale group,
maximumInstanceCount=1, no always-ready instances, and 2,048 MB configured memory, the documented continuous one-hour maximum is 7,200 GB-s. Azure Monitor and Cost Management both report approximately 93,500 GB-s for the same interval. Please reconcile the per-instance execution-unit records with the scale records and investigate the On Demand Execution Time meter.
There is a similar public report involving Flex Consumption exceeding a configured instance limit, but it has no accepted resolution and does not establish this as a publicly acknowledged platform defect.^5^
Until Microsoft reconciles the meter, the observed $20+/hour should not be considered documented or predictable behavior. Moving this CPU-bound workload to Premium may provide more predictable fixed capacity, as your test indicates, but it does not explain or validate the Flex charge.
References
- Estimating consumption-based costs in Azure Functions | Microsoft Learn
- Clarification on Flex Consumption Billing: Minimum 1000ms rule for Sequential vs. Concurrent requests - Microsoft Q&A
- Monitoring data reference for Azure Functions | Microsoft Learn
- Event-driven scaling in Azure Functions (flex-consumption-plan)
- Flex Consumption scales beyond maximumInstanceCount (31 instances with a limit of 20) - Microsoft Q&A