Azure Microservices Architecture: Hidden Costs of Service Communication
Understand API Management tiers, Service Bus, AKS, Private Endpoints and Application Insights as part of the full cost of service boundaries.
1. The scenario: a small service split requires enterprise platform tiers
A team separates a customer portal into eight APIs. Each receives a dedicated App Service plan, an API Management instance, Service Bus integration and private connectivity. The business expects more independent releases, but the new minimum platform footprint costs more than the original application.
Those components can be justified by security, isolation and delivery needs. The problem is evaluating each API in isolation while ignoring shared capacity, tier dependencies and per-operation amplification.
Worked examples use illustrative USD assumptions and a 730-hour month. They are not current regional quotes and exclude discounts, taxes and service-specific allowances unless stated.
2. How it works: follow the request and the message
API Management can enforce authentication, rate limits, policies and API lifecycle controls. It is not mandatory for every service-to-service call. A private HTTP call between workloads is not automatically a separately billed API Management request.
APIM’s classic, v2 and Consumption tiers have different capacity, network and request-inclusion models. A private networking requirement can affect tier eligibility. Use the current APIM pricing matrix for the chosen feature set; do not assume all tiers are a simple per-call fee.
Service Bus decouples publishers and consumers. Sending, receiving and completing messages, retries, payload size and fan-out can all affect work and the applicable billing units. Standard combines its pricing model with operation allowances; Premium uses dedicated messaging units with its own capacity model. Service Bus pricing defines the selected tier rather than one universal “message price.”
3. Cost components: service boundaries need a platform budget
| Layer | What must be counted |
|---|---|
| Hosting | App Service plans, AKS nodes or Container Apps resources |
| API boundary | APIM units, eligible included requests and overage |
| Messaging | Selected Service Bus tier, units/operations and replication features |
| Private access | Private Endpoints, DNS and eligible network processing |
| Dependencies | Databases, caches, secrets and connection management |
| Telemetry | Application Insights, Log Analytics, queries and retention |
Several apps can share an appropriately sized dedicated App Service plan. Billing is primarily for the plan’s instances, not one identical VM charge per app. Shared apps also compete for capacity and have related scaling behavior. App Service plan guidance explains the resource boundary.
AKS adds node pools, cluster management tier, disks and network dependencies. A microservice does not become economical merely by placing its container in a shared cluster.
4. Where things go wrong
Creating a plan or APIM deployment for every small service repeats the fixed floor. Sharing can reduce it, but security, regional isolation, policy ownership and blast radius must be evaluated. The cheapest shared plan can be the wrong trust boundary.
Synchronous fan-out increases downstream requests and connection pressure. Retries should fit an end-to-end deadline, use bounded attempts and jitter, and preserve idempotency. A timeout does not prove the previous operation did not succeed.
A Service Bus topic with five subscriptions creates downstream delivery work for five consumers. Dead-letter queues need explicit processing and retention handling. Replaying the same failed event indefinitely can consume compute and telemetry without producing a successful business operation.
Private Endpoint configuration does not disable every public access path automatically. Validate service public-network settings and DNS. An endpoint that is unused because clients still resolve a public path adds cost without achieving its goal.
Instrumenting every boundary can create duplicate spans or logs when both automatic and manual exporters are enabled. Sampling one telemetry type does not necessarily sample all logs. Preserve trace correlation and reliable service-level aggregates.
5. Real-world example: shared capacity versus repeated capacity
Assume eight small APIs each get a dedicated plan costing $80/month. A tested shared deployment can run those APIs on two appropriately sized plan instances costing $160/month in total. These are assumed architecture prices, not Azure SKU quotes.
| Monthly component | Separate-plan design | Shared-plan candidate |
|---|---|---|
| Application hosting | 8 × $80 = $640 | $160 |
| Required shared APIM capacity | $220 | $220 |
| Selected messaging configuration | $75 | $75 |
| Private connectivity and DNS | $90 | $60 |
| Telemetry | $150 | $80 |
| Total | $1,175 | $595 |
The modeled difference is $580/month, conditional on performance and isolation tests. APIM and messaging remain because both designs still need their features. A change in APIM tier or messaging capacity must be modeled separately.
For a logical workflow with one million small messages, suppose send, receive and completion create three million chargeable operation units under the selected Standard pricing rules. At a hypothetical $0.50/million and ignoring allowances/base fees, that component is $1.50. Do not reuse this calculation for Premium messaging-unit billing, large payloads or a fan-out workload without recomputing the units.
6. Alternatives and their tradeoffs
A modular monolith on App Service can preserve code ownership while reducing deployment and network boundaries. Extract services that need independent scaling, isolation or release cadence rather than every small code module.
Container Apps can fit event-driven containers and may scale suitable Consumption workloads to zero. Minimum replicas, continuous background work, selected networking features and Dedicated profiles change the bill. It is not automatically a zero-baseline platform.
AKS can provide advanced scheduling, Kubernetes APIs and platform consistency when the organization can justify the operating model. Keep a platform cost allocation and a clear reason for each separate cluster or node pool.
7. Practical recommendations
Draw one successful transaction and one timeout/retry sequence. Count APIM traversals, message delivery work, dependency calls and telemetry bytes.
Document the feature that requires each paid tier. Load-test shared plans for CPU, memory, connection limits and noisy neighbors. Record separate costs for fixed capacity and marginal operations.
Review unused APIM instances, plan capacity and endpoints with their owners. Track cost per successful order and deployment independence together; a cheaper architecture that prevents required team delivery may lose business value elsewhere.
8. CloudVectra perspective: allocate the common platform
CloudVectra cost insights supports review of hosting, messaging, networking and monitoring in one financial context. Cost Centers can represent application teams and shared platform ownership.
Use documented allocation inputs such as reserved capacity, requests or message volume, with native telemetry providing those measurements. Anomaly detection helps focus investigation after traffic or deployment changes; it does not replace dependency tracing or message diagnostics.
Continue the architecture series
- Previous: Azure Architecture Mistakes: When High Availability Increases Your Bill
- Next: Azure Network Architecture Mistakes: Hub-and-Spoke, Firewall and Private Link Costs
- Compare the AWS architecture
- Browse Cloud Architecture & Governance