Azure API Management + Nodinite: Reduce Logging Costs and TCO
Logging Azure API Management (APIM) traffic to Nodinite isn't free in Azure. The Blob Storage Policy and Event Hub Policy stage every request and response in your subscription before the Pickup Service moves them to Nodinite, and Azure bills for that staging and for the network traffic. At the same time, many APIM environments already pay to log the same calls to Application Insights and Log Analytics.
This page shows what the Nodinite logging adds to your Azure bill, with examples by API volume and payload size, and where you can save by not storing the same payloads twice. The general Blob Storage and Event Hub cost model, shared with Serilog and Logic Apps, is on Azure Costs for Blob Storage and Event Hub; this page covers what is specific to APIM.
In short: Nodinite can reduce your Azure logging costs when it replaces duplicate ingestion and long-term retention of complete API request and response payloads in Application Insights and Log Analytics. Your actual savings depend on your workload, payload sizes, retention, Azure pricing agreement and region, network topology, and on the Nodinite license and SQL Server costs, which the examples below don't include.
Note
All prices are illustrative list prices (USD, pay-as-you-go, a US region), not quotes, and the tables compare Azure costs only. Prices differ by region and change over time. Use the Azure pricing calculator with your own volumes, region, and agreement.
Understanding the architecture difference
Without a plan, the same API call is often stored in three places, each with its own price per GB:
request telemetry + bodies"] APIM --> LA["fa:fa-table Log Analytics
gateway resource logs"] APIM --> STG["fa:fa-boxes-stacked Blob Storage or Event Hub"] STG --> NOD["fa:fa-database Nodinite
payloads, long-term history"] style APIM fill:#2678BD style AI fill:#E47528 style LA fill:#E47528 style STG fill:#3F827B style NOD fill:#93d16d
Diagram: Three logging paths from one APIM instance. Orange paths bill per GB ingested and retained; green is the Nodinite path, billed per operation or throughput, with long-term storage on your own Nodinite databases.
The cost-saving idea is the same as for Logic Apps run history: let each tool do what it's best at, and store payloads once. Application Insights and Log Analytics remain useful for performance and platform troubleshooting, but they don't need to keep request and response bodies if Nodinite does.
What APIM logging to Nodinite adds
| Cost driver | What happens | Effect on cost |
|---|---|---|
| Two Log Events per API call | The inbound fragment logs the request and the outbound fragment logs the response; the on-error fragment adds a third on failures | Double the number of Blob operations or Event Hub events compared with API calls |
| Base64-encoded bodies | The policies base64-encode the body, which adds about one third to the size, plus headers as context properties | More bytes in Event Hub throughput and over the network |
| Event Hub 200 KB limit | APIM's log-to-eventhub drops events over 200 KB; after base64 this means bodies of roughly 145 KB or less |
Larger bodies need the Blob Storage Policy |
| No extra billed API calls | On the Consumption tier, APIM bills per incoming API call. The outbound send-request (Blob Storage) and log-to-eventhub (Event Hub) calls made by the logging policies aren't billed as API calls |
No APIM cost per logged call on Consumption; the cost is in the staging resource |
| Gateway capacity | Reading bodies with preserveContent and encoding them uses gateway memory and CPU |
On the classic and v2 tiers, at high throughput with large bodies, watch the Capacity metric before you add units |
| Network restrictions | Microsoft is retiring trusted service connectivity, which affects private Blob and Event Hub access from APIM | Some alternatives require a higher APIM tier or private endpoints; see Network Restrictions & Alternative Solutions |
Illustrative cost examples
Some teams log API traffic to Azure Monitor instead of Nodinite, for example through the APIM Application Insights diagnostic settings, the trace policy, or a policy that sends records to Log Analytics through Event Hub or the Logs Ingestion API. The examples below price the same calls and the same payloads for each option, so you can compare them in one table. Workspace-based Application Insights stores its data in Log Analytics, so the Log Analytics rows cover it too.
Assumptions
- Nodinite options: two Log Events per API call (request and response), each sized payload × 4/3 (base64) + 2 KB of headers and context
- Blob Storage: Hot, LRS, soft delete off, no versioning or malware scanning. Each Log Event costs one write, one read, and its share of list operations, and the Pickup Service deletes the blob after pickup, so stored capacity stays near zero. Other storage settings or transaction patterns change these figures
- Event Hub: Standard, 1-day retention. Throughput units (TUs) are sized for four times the average ingress, with at least 1 TU: TUs = max(1, ⌈4 × average MB/s⌉), where one TU accepts 1 MB/s or 1,000 events/s. Each TU costs about $0.03 an hour, plus $0.028 per million ingress events
- egress: internet list price, first 100 GB a month free, then $0.087/GB up to 10 TB, $0.083/GB for the next 40 TB, $0.07/GB for the next 100 TB, and $0.05/GB above that. It applies to both Nodinite options and to the full staged volume in the next table: request and response bodies, base64, and context. It is $0 when the Pickup Service runs in the same Azure region; between Azure regions the lower inter-region transfer price applies instead
- Log Analytics options: raw payload, 2 × (payload + 1 KB of telemetry) per API call, first 5 GB free each month
- Log Analytics, 31-day retention: Analytics table plan at the pay-as-you-go price of $2.30/GB, within the included retention. No commitment-tier discount is applied, so at high volume these rows are an upper bound (see the caveats below)
- Log Analytics, 1-year retention: the same, plus interactive retention at $0.10/GB per month for months 2 to 12. Once you've kept data for a full year, you pay retention on 11 months of data every month
- Log Analytics Basic, 1-year long-term retention: Basic table plan at $0.50/GB plus long-term retention at $0.02/GB per month (see the caveats below)
Monthly data volume
| API calls/month | 2 KB payload | 10 KB payload | 50 KB payload | 140 KB payload | 1 MB payload |
|---|---|---|---|---|---|
| 1 million | ~9 GB | ~31 GB | ~137 GB | ~377 GB | ~2.7 TB |
| 10 million | ~93 GB | ~307 GB | ~1.4 TB | ~3.8 TB | ~27 TB |
| 100 million | ~933 GB | ~3.1 TB | ~13.7 TB | ~37.7 TB | ~273 TB |
Volume sent to Nodinite staging, including base64. The Log Analytics options ingest about a quarter less, because they store raw text.
Yearly Azure cost by option
Every figure is the Azure cost for a full year at the monthly call volume in the first column: 12 monthly bills, once retention is full (from the second year on). In the first year, the 1-year retention rows are lower, typically by 15–20%, because the stored history is still building up.
| API calls/month | Option | 2 KB payload | 10 KB payload | 50 KB payload | 140 KB payload | 1 MB payload |
|---|---|---|---|---|---|---|
| 1 million | Nodinite via Blob Storage | ~$130 | ~$130 | ~$130 | ~$130 | ~$130 |
| 1 million | Nodinite via Event Hub | ~$260 | ~$260 | ~$260 | ~$260 | Not possible |
| 1 million | + egress if Nodinite is outside the Azure region | $0 | $0 | ~$40 | ~$290 | ~$2.7k |
| 1 million | Log Analytics, 31-day retention | ~$30 | ~$470 | ~$2.7k | ~$7.6k | ~$56k |
| 1 million | Log Analytics, 1-year retention | ~$110 | ~$760 | ~$4k | ~$11k | ~$84k |
| 1 million | Log Analytics Basic, 1-year long-term retention | ~$20 | ~$170 | ~$850 | ~$2.4k | ~$18k |
| 10 million | Nodinite via Blob Storage | ~$1.3k | ~$1.3k | ~$1.3k | ~$1.3k | ~$1.3k |
| 10 million | Nodinite via Event Hub | ~$260 | ~$260 | ~$800 | ~$1.6k | Not possible |
| 10 million | + egress if Nodinite is outside the Azure region | $0 | ~$220 | ~$1.3k | ~$3.8k | ~$28k |
| 10 million | Log Analytics, 31-day retention | ~$1.5k | ~$5.9k | ~$28k | ~$78k | ~$566k |
| 10 million | Log Analytics, 1-year retention | ~$2.3k | ~$8.8k | ~$42k | ~$115k | ~$836k |
| 10 million | Log Analytics Basic, 1-year long-term retention | ~$490 | ~$1.9k | ~$8.8k | ~$24k | ~$177k |
| 100 million | Nodinite via Blob Storage | ~$13k | ~$13k | ~$13k | ~$13k | ~$13k |
| 100 million | Nodinite via Event Hub | ~$590 | ~$1.4k | ~$5.9k | Over Standard tier limit | Not possible |
| 100 million | + egress if Nodinite is outside the Azure region | ~$860 | ~$3.1k | ~$14k | ~$38k | ~$208k |
| 100 million | Log Analytics, 31-day retention | ~$16k | ~$61k | ~$281k | ~$778k | ~$5.7M |
| 100 million | Log Analytics, 1-year retention | ~$24k | ~$90k | ~$416k | ~$1.15M | ~$8.4M |
| 100 million | Log Analytics Basic, 1-year long-term retention | ~$5.2k | ~$19k | ~$88k | ~$244k | ~$1.8M |
Reading the table
- Retention is the big difference. A Log Analytics workspace bills you in Azure for every GB, for every month you keep it, on top of the ingestion price. Nodinite only uses Azure as a short staging area: the Blob Storage and Event Hub rows stay the same whether you keep history for a month or ten years. The long-term history lives in your own SQL Server Log Databases, and Message Types retention decides how long each kind of message is kept, for example invoices for 7 years and test messages for 30 days. You store only what matters, as long as it matters.
- The Log Analytics rows grow with every GB. Ingestion is paid once at $2.30/GB, and keeping data for 11 more months adds $1.10/GB. Matching long Nodinite retention, such as 7 years for invoices, would need Log Analytics long-term retention (up to 12 years) on every record of that type.
- The Nodinite Azure cost follows events and throughput. Blob Storage is priced per operation, so under the assumptions above it costs the same for any payload size. Event Hub is priced per throughput unit, which steps up with volume: at 10 million calls, both 2 KB and 10 KB payloads fit in the minimum of 1 TU, which is why those two figures are the same. The table below shows the TUs behind each Event Hub figure. At 100 million calls with 140 KB payloads, Event Hub needs about 59 TUs, more than the 40 a Standard namespace allows, so you'd need Premium, Dedicated, or several namespaces.
- Network egress can be the largest Nodinite line item for APIs with large payloads. Run the Pickup Service in the same Azure region as the staging resource to avoid it.
Event Hub throughput units behind the figures
| API calls/month | 2 KB payload | 10 KB payload | 50 KB payload | 140 KB payload |
|---|---|---|---|---|
| 1 million | 1 TU | 1 TU | 1 TU | 1 TU |
| 10 million | 1 TU | 1 TU | 3 TUs | 6 TUs |
| 100 million | 2 TUs | 5 TUs | 22 TUs | 59 TUs |
Two Log Events per call, spread evenly over a 30-day month, sized for four times the average. Bursty traffic needs more TUs, or auto-inflate, which raises the cost.
For all the other meters and the settings that inflate the bill, such as blob soft delete, Defender for Storage malware scanning, and Event Hub auto-inflate, see Hidden costs that are easy to miss.
Payload limits in the Azure Monitor path
Azure Monitor isn't built for full message bodies:
- the APIM Application Insights diagnostic setting truncates each body at 8,192 bytes
- Application Insights trace messages are limited to 32,768 characters
- larger bodies must be split into several records and joined again when you query them
So, for payloads above about 8 KB, the Log Analytics rows assume a custom policy that splits bodies, which most teams don't build. Nodinite has no such limit with the Blob Storage Policy.
Honest caveats
- What the Nodinite rows leave out: the fixed-price Nodinite license and the SQL Server storage for the Log Databases. At the largest volumes that storage is significant: 100 million calls with 1 MB payloads is about 273 TB a month before Message Types retention and filtering. The 1 MB column shows how each option scales; it isn't a typical setup.
- Commitment tiers lower the Log Analytics price at volume. From 100 GB a day, a commitment tier gives a lower per-GB price in exchange for a 31-day commitment. Most workspaces in the 10 million and 100 million rows would use one, so treat those Log Analytics figures as upper bounds and use the pricing calculator for your tier.
- Very high volumes hit the ingestion rate limit. A workspace accepts about 6 GB a minute from diagnostic settings by default. 100 million calls with 1 MB payloads averages close to 5 GB a minute, so peaks would be dropped unless Microsoft raises the limit through a support request.
- The Basic table plan has trade-offs. It limits queries and alerting, and charges per GB scanned when you query. Data in long-term retention must be restored, or searched with a search job, before you can query it.
- Sampling lowers the Application Insights cost because it drops calls. That's fine for performance telemetry, but it isn't a record of every request and response.
Reduce duplicate Application Insights and Log Analytics costs
This is the APIM equivalent of reducing Logic Apps run-history retention. Both destinations bill per GB ingested (Log Analytics Analytics logs list at about $2.30/GB, with the first 5 GB per month free), and retention beyond the included 31 days costs extra.
Application Insights
APIM's Application Insights integration can log request and response bodies, but truncates them at 8,192 bytes, so it can't replace Nodinite for full payloads anyway. In the APIM diagnostic settings for Application Insights (for all APIs or per API):
- Set Number of payload bytes to log to
0for the frontend and backend request and response when Nodinite logs the bodies. - Remove headers you don't need from the logged headers lists.
- Lower the Sampling percentage for high-volume APIs; Nodinite still logs every call.
- Consider a daily cap on the Application Insights resource as a safety net.
As an illustration, 10 million calls a month with about 2 KB of telemetry per call and no bodies is roughly 20 GB, or about $35 a month in ingestion. For what adding the bodies costs, see the Log Analytics rows in Yearly Azure cost by option.
Log Analytics resource logs
APIM gateway logs (ApiManagementGatewayLogs) add one row per request. Keep them if your platform team uses them, but check:
- whether you need every log category in the diagnostic setting
- whether the table can use a lower-cost table plan for data that is rarely queried
- whether retention can stay at the included period, since Nodinite keeps the long-term history
Log only what you need
Every skipped call saves two writes, two reads, and their bytes. Wrap the policy fragments in a condition to skip calls that don't need business logging, such as health probes:
<inbound>
<choose>
<when condition="@(!context.Request.Url.Path.EndsWith("/health"))">
<include-fragment fragment-id="InboundLoggingPolicyFragment" />
</when>
</choose>
</inbound>
Use the same condition in the outbound section. Also remove headers you never search on from the logged context, and set Message Types on each API so Search Fields and retention policies apply to the events you keep.
Recommended architecture
Azure API Management, Application Insights, and Log Analytics
- Performance, failures, and dependency telemetry, sampled and without bodies
- Platform troubleshooting with short retention
Nodinite
- Every request and response with full payload, through the Blob Storage Policy or Event Hub Policy
- Long-term history in Log Databases, with Message Types retention per business document
- Search Fields on business identifiers, and Log Views for teams without Azure Portal access
Application Insights and Log Analytics serve developers. Nodinite serves developers and the business: the same API calls are searchable by business data in role-based Log Views, next to your Logic Apps and Azure Functions traffic. Read why that matters in Built for developers and the business.
Next Steps
- Azure Costs for Blob Storage and Event Hub — all meters and hidden costs
- Blob Storage Policy
- Event Hub Policy