Getting Started
Architecture
NServiceBus
Transports
Persistence
Hosting
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Modernization
Samples

Azure Table Persistence capacity planning

Azure Table Persistence supports two underlying storage services, each with a distinct pricing model:

Operations per message

The tables below show the number of storage operations performed by the persistence for each message processing scenario. Use these counts together with the expected message throughput to estimate the total daily transactions or the required provisioned RUs.

Without Outbox

Incoming message scenarioRead operationsWrite operationsTotal per message
No Saga000
Saga (new)112
Saga (update)112
Saga (complete)112
  • Read: One GetEntity call to load the saga.
  • Write: One entity group transaction containing the saga insert, update, or delete.

With Outbox

Incoming message scenarioRead operationsWrite operationsTotal per message
No Saga123
Saga (new)235
Saga (update)235
Saga (complete)235
  • Reads: One GetEntity for the outbox deduplication check, and one for the saga load.
  • Writes: The outbox record insert and saga operation are committed together in one entity group transaction (counted as two individual write transactions). After outgoing messages are dispatched, a separate write updates the outbox record to mark it as dispatched.

Item size estimation

The following sizes can be used as a starting point for storage capacity estimates. Actual sizes depend on the saga data model and the size of outgoing message bodies and headers.

Record typeEstimated base size
Outbox record (pending dispatch)~300 bytes + outgoing message bodies and headers
Outbox record (dispatched)~200 bytes (operations payload is cleared after dispatch)
Saga record~300 bytes + saga data

For Azure Cosmos DB Table API, item size directly affects RU consumption. See request unit considerations for details.

Outbox storage growth

Unlike Azure Cosmos DB, Azure Table storage has no native time-to-live (TTL) mechanism. Dispatched outbox records are updated to clear the operations payload but are not automatically deleted from the table.

The number of outbox records retained at steady state is proportional to message throughput and the outbox deduplication period:

Retained outbox records ≈ Message throughput (per second) × Deduplication period (seconds)

With the default seven-day deduplication period (604,800 seconds), an endpoint processing ten messages/second accumulates approximately six million outbox records. A cleanup process should be scheduled to delete outbox records older than the configured deduplication period.

Monitoring

Azure Table storage

Azure Monitor Storage Metrics provides per-table transaction counts observable from the Azure portal. Use these metrics to validate estimated operation counts against real traffic and to detect unexpected growth.

Azure Cosmos DB Table API

The Azure Cosmos DB Diagnostic Settings can route diagnostic logs to an Azure Log Analytics workspace, where they can be queried to observe RU consumption per operation. The Cosmos DB capacity calculator can also be used with the operation counts from the tables above to estimate the required provisioned throughput.

Capacity planning approach

  1. Measure saga and outbox item sizes in a test environment.
  2. Apply the formulas above to calculate Request Units.
  3. Multiply by expected message throughput (messages per second) to estimate costs.
  4. Account for retries due to optimistic concurrency conflicts or transient throttling — each retry adds one full set of operations.

Related Articles