Skip to content

Commit ec9559e

Browse files
more-rasikaRasika MoreCopilotJames Xian
authored
docs: add Azure hosting cost estimates (#50)
Co-authored-by: Rasika More <rasikamore@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: James Xian <jamesxian@microsoft.com> Copilot-Session: f2de8eef-55e5-4c40-b86f-1c869c3e4331
1 parent 6024a74 commit ec9559e

1 file changed

Lines changed: 110 additions & 6 deletions

File tree

‎docs/COST-CALCULATOR.md‎

Lines changed: 110 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
# Estimate SMS provider costs
1+
# Estimate telecom-provider and Azure hosting costs
22

33
Estimate SMS and voice traffic before onboarding a provider. The report groups recent
4-
authentication steps by calling code. Apply provider rates to estimate a budget.
4+
authentication steps by calling code. Apply provider rates to estimate a telecom budget.
5+
This guide also describes the Azure resources to include when
6+
estimating the separate cost of hosting the provider integration.
7+
8+
The guide separates the estimate into two parts:
9+
10+
1. Telecom-provider costs based on estimated SMS and voice requests.
11+
2. Azure hosting costs for running and monitoring the provider integration.
12+
13+
## 1. Estimate telecom-provider costs
514

615
> [!IMPORTANT]
716
> This is not a billing report. Confirm retries, fallback, message segments, destinations, taxes,
@@ -19,7 +28,7 @@ The report uses `authenticationDetails`, which is currently available through th
1928
Review the beta API and script before each planning exercise. The script matches masked trailing
2029
digits to registered phone methods to derive the calling code.
2130

22-
## Prerequisites
31+
### Prerequisites
2332

2433
Run the script in PowerShell 7 from a secured administrator workstation. The signed-in
2534
account must be allowed to consent to or use these Microsoft Graph delegated permissions:
@@ -37,7 +46,7 @@ aggregated calling codes, methods, and counts, not full phone numbers. Protect t
3746
Create `C:\temp` before running the script, or change the `Export-Csv` path to an
3847
approved folder.
3948

40-
## Generate the activity report
49+
### Generate the activity report
4150

4251
The script installs the required modules, finds SMS and voice authentication steps, matches masked
4352
details to registered phone methods, and groups the result. Set `$start` and `$end` first.
@@ -173,7 +182,7 @@ recent sign-ins are returned first. Only sign-in events that occurred within the
173182
Microsoft Entra ID default retention period are available."** Selecting an earlier
174183
`$start` date does not make events outside the available retention period accessible.
175184

176-
## Convert activity into a cost estimate
185+
### Convert activity into a cost estimate
177186

178187
The exported report contains one row per calling code and authentication method. It counts
179188
each SMS or voice authentication step as one estimated request:
@@ -196,7 +205,7 @@ rows when rates differ by destination, sender type, route, or message category.
196205
contingency for growth, retries, fallback behavior, and seasonal peaks.
197206

198207
<a id="confirm-the-final-estimate-with-your-provider"></a>
199-
## Confirm provider rates
208+
### Confirm provider rates
200209

201210
Confirm the following with the provider:
202211

@@ -210,3 +219,98 @@ Confirm the following with the provider:
210219
After deployment, compare the estimate with provider billing and approved operational
211220
telemetry. Do not treat this report as proof of message submission, acceptance, delivery,
212221
or the amount that the provider will invoice.
222+
223+
## 2. Estimate Azure hosting costs
224+
225+
Telecom-provider charges and Azure hosting charges are separate. Estimate the Azure
226+
resources required to receive an authentication request, call the provider, and return
227+
the result. Use the [Azure Pricing Calculator](https://azure.microsoft.com/pricing/calculator/)
228+
to confirm current prices for your deployment region and agreement. Prices, free grants,
229+
and service capabilities can change, so do not use an old estimate as an approved budget.
230+
231+
### Get a quick planning estimate
232+
233+
If you need a rough estimate rather than a detailed calculation, select the deployment
234+
profile that meets your availability requirements and use the closest monthly request
235+
volume in the following table.
236+
237+
| Deployment profile | 50,000 requests/month | 1 million requests/month | 10 million requests/month |
238+
| --- | ---: | ---: | ---: |
239+
| Flex Consumption on demand | Less than $1 | About $21 | About $303 |
240+
| Flex Consumption with one Always Ready instance | About $22 | About $43 | About $326 |
241+
| Zone-redundant Flex Consumption | About $43 | About $64 | About $347 |
242+
| Premium EP1 | About $158 | About $163 | About $290 |
243+
| Zone-redundant Premium EP1 | About $473 | About $478 | About $606 |
244+
| Two-region, zone-redundant Flex Consumption | About $86 | About $105 | About $380 |
245+
246+
These illustrative monthly estimates use East US retail assumptions in USD, 2 GB of
247+
Function memory, a 0.5-second average execution, 5 KB of operational logging per request,
248+
and a 5% retry allowance. They assume applicable free grants are available and exclude
249+
telecom-provider charges, taxes, support plans, and customer-specific discounts. Actual
250+
costs can vary by region, agreement, traffic pattern, telemetry retention, and service
251+
pricing.
252+
253+
Use the table for early planning only. For an approved budget, enter your expected volume
254+
and required deployment profile in the Azure Pricing Calculator. If your volume falls
255+
between columns, use the next higher column for a conservative estimate; do not scale the
256+
table values linearly because some profiles include fixed baseline capacity.
257+
258+
### Build a detailed estimate
259+
260+
Include these resources:
261+
262+
| Azure resource | Use in the provider integration | Primary cost drivers |
263+
| --- | --- | --- |
264+
| Azure Functions hosting | Runs the routing function that validates the request, applies your policies, calls the provider, and returns the result. | Hosting plan, authentication volume, execution duration, memory, Always Ready instances, Premium instances, and deployment regions. |
265+
| Function App | Hosts the application and its HTTPS endpoint. | There is no separate base charge; compute is charged through the selected Functions hosting plan. |
266+
| Application Insights and Log Analytics | Provides operational monitoring, request diagnostics, provider latency, failure data, and troubleshooting telemetry. | Telemetry volume and retention. |
267+
| Storage account | Stores Function host information and the deployment package. | Stored capacity, transactions, and LRS versus ZRS replication. Zone-redundant deployments require ZRS storage. |
268+
| Key Vault | Protects provider credentials, secrets, and the encryption certificate. | Secret and certificate operations. This is normally a small cost because credentials are cached. |
269+
| Outbound bandwidth | Carries API requests and responses between Azure Functions and the provider. | Outbound data after the applicable Azure allowance. This is usually small for provider API payloads. |
270+
| Traffic Manager or equivalent global routing | Routes traffic in an optional multi-region disaster-recovery deployment. | DNS queries or requests, depending on the selected routing service. |
271+
272+
Collect these inputs before creating your estimate:
273+
274+
- Monthly SMS and voice authentication requests, including authentication, enrollment,
275+
recovery, and test traffic.
276+
- Average Function execution duration, including provider API latency.
277+
- Expected retry and failover allowance.
278+
- Function memory allocation and operational logging generated per request.
279+
- Required region, availability-zone resilience, and regional disaster recovery.
280+
- Your Azure pricing, discounts, free grants, taxes, and currency.
281+
282+
Use adjusted request volume consistently across the estimate:
283+
284+
```text
285+
Adjusted monthly requests = monthly authentication requests x retry/failover multiplier
286+
Execution GB-seconds = adjusted monthly requests x execution seconds x memory in GB
287+
Monitoring data in GB = adjusted monthly requests x logging KB per request / 1,048,576
288+
Estimated Azure total = Functions + monitoring + storage + Key Vault
289+
+ outbound bandwidth + optional global routing
290+
```
291+
292+
Apply the current service rates and free grants from the Azure Pricing Calculator rather
293+
than embedding fixed rates in the estimate. Employee count is not a suitable substitute
294+
for request volume. Peak traffic determines required capacity, while monthly request
295+
volume, execution duration, and telemetry volume drive much of the consumption cost.
296+
297+
Compare the deployment profiles that meet your latency and resiliency requirements:
298+
299+
| Deployment profile | When to consider it |
300+
| --- | --- |
301+
| Flex Consumption on demand | Pilot, evaluation, intermittent use, or production only after cold-start latency is validated. |
302+
| Flex Consumption with Always Ready | Standard production when low authentication latency is required. |
303+
| Zone-redundant Flex Consumption | Production authentication that must continue through an availability-zone failure. Budget for the minimum required Always Ready instances and ZRS storage. |
304+
| Premium | Continuously allocated capacity or Premium-specific capabilities. Validate the required instance count. |
305+
| Zone-redundant Premium | Mission-critical Premium deployment. Confirm the minimum instance count enforced by the selected deployment method. |
306+
| Two-region deployment | Recovery from a complete Azure-region outage. Include a second deployment, global routing, replicated configuration, and recovery testing. |
307+
308+
Select a profile from latency and resiliency requirements, not organization size alone.
309+
The total authentication response budget includes Function startup, integration
310+
processing, provider latency, retries, and response handling. Always Ready reduces only
311+
the Function cold-start portion. Zone redundancy protects against a datacenter-zone
312+
failure within one region; it does not provide regional disaster recovery.
313+
314+
For a multi-region design, also account for globally unique idempotency, provider-aware
315+
failover, shared fraud and spend limits, and an emergency stop. Autoscaling Azure compute
316+
must not create unlimited telecom spend.

0 commit comments

Comments
 (0)