Capacity, Performance and Cost Architecture

Designing for measured workload: average and peak throughput, storage growth, backlog after an outage, bottlenecks, capacity planning and total cost of ownership.

  • Intermediate to advanced
  • About 16 minutes
  • Includes an exercise and a knowledge check

The concept Design for measured workload, not impressive numbers

A common mistake is choosing technology from a vague statement such as We need millions of transactions. Millions a month and millions a minute are completely different systems. Turn the customer’s workload into estimates by asking:

  • How many payments arrive daily, and what is the peak arrival rate?
  • Do they arrive continuously or in batches? How large are settlement files?
  • How many users investigate exceptions?
  • How quickly must reconciliation complete, and what delay is acceptable?
  • How long must data stay available?

Do the math Average and peak throughput

On the left, a historical photo of a highway at evening rush hour, the outbound lanes packed with cars. On the right, the illustrative Apex workload: 1,200,000 a day divided by 86,400 seconds is about 13.9 events a second on average; times a peak factor of 8 is about 111 events a second, shown as a bar eight times taller. Both numbers are starting estimates, to check against real arrival patterns, provider behavior, settlement batches, retries and seasonal demand.
A road is sized for rush hour, not the daily average. So is a platform.
EstimateCalculationResult
Average throughput1,200,000 ÷ 86,400 seconds≈ 13.9 events a second
Peak throughput (assumed factor 8)13.9 × 8≈ 111 events a second

The 1,200,000 a day and the peak factor of 8 are illustrative. Validate them against actual arrival patterns, provider behavior, settlement batches, retries and seasonal demand.

Data grows Storage growth and backlog

Two worked estimates. Storage growth: 1,200,000 records at about 2 KB is 2.4 GB a day of normalized data and about 876 GB a year, before indexes, audit records, raw payloads, backups and replicas, database overhead and reporting copies. Backlog after a two-hour outage: 13.9 a second times 7,200 seconds is 100,000 events waiting; clearing them in one hour needs about 27.8 a second, plus 13.9 still arriving, about 41.7 a second, three times the average. At peak the backlog can be up to eight times larger.
Can the system catch up after an outage without causing a second one? Illustrative numbers.
EstimateCalculationResult
Daily normalized data1,200,000 × 2 KB2.4 GB a day
Annual normalized data2.4 GB × 365≈ 876 GB a year
Backlog after a 2-hour outage (average rate)13.9 × 7,200 seconds100,000 events
Recovery rate to clear it in 1 hour100,000 ÷ 3,600, plus 13.9 still arriving≈ 41.7 events a second

A real design also counts indexes, audit records, raw source payloads, backups, replicas, database overhead, compression, retention policy and reporting copies. Large source files may belong in object storage rather than the application database, subject to security and retention requirements.

Where it slows down Bottlenecks and capacity planning

Likely bottlenecks: database connection exhaustion, missing or poor indexes, large batch transactions, slow external APIs, consumer delays, too many synchronous calls, hot partition keys, expensive matching queries and large settlement files. Performance tests must reproduce realistic patterns. For each important component, estimate average and peak throughput, concurrent requests, latency, queue capacity, storage growth, database connections, recovery throughput and scaling limits.

What it costs Cost architecture

Cost areaQuestions
ComputeWhat runtime and peak capacity are required?
DatabaseWhat storage, throughput, backup and replication are needed?
MessagingWhat event volume and retention?
Object storageHow much source data must be kept?
ObservabilityHow much logging and tracing data will be generated?
NetworkingWhat data transfer and connectivity costs apply?
RecoveryWhat extra infrastructure does disaster recovery need?

Practice Estimate capacity and cost

Practical exercise

Exercise 10: capacity and cost assessment

Use the illustrative Apex workload, or a customer-approved one. Keep assumptions and verified data clearly apart.

  1. Average and peak throughput.
  2. Daily and annual storage growth.
  3. The queue backlog during an outage, and the recovery throughput needed.
  4. The main performance bottlenecks and cost drivers.
Show sample answers for a 45-minute outage
  • Backlog at the average rate: 13.9 × 2,700 seconds = 37,500 events (1,200,000 a day is 50,000 an hour).
  • Clear it in 30 minutes: 37,500 ÷ 1,800 ≈ 20.8 a second, plus 13.9 still arriving, about 34.7 a second.
  • At peak (factor 8): up to about 300,000 events waiting; ask whether outages at peak must be planned for.
  • Labels: 1,200,000 a day, factor 8 and 2 KB are assumptions until Apex confirms them.

3 questions

Check your understanding

1. 1,200,000 events a day is about how many a second on average?
2. Why is average throughput not enough for sizing?
3. What should total cost of ownership include?
Answer every question to submit.

What you can do now

  • Turn a workload into average and peak throughput.
  • Estimate storage growth and the backlog after an outage.
  • Find likely bottlenecks and plan capacity.
  • Compare designs on total cost of ownership.