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
| Estimate | Calculation | Result |
|---|---|---|
| Average throughput | 1,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
| Estimate | Calculation | Result |
|---|---|---|
| Daily normalized data | 1,200,000 × 2 KB | 2.4 GB a day |
| Annual normalized data | 2.4 GB × 365 | ≈ 876 GB a year |
| Backlog after a 2-hour outage (average rate) | 13.9 × 7,200 seconds | 100,000 events |
| Recovery rate to clear it in 1 hour | 100,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 area | Questions |
|---|---|
| Compute | What runtime and peak capacity are required? |
| Database | What storage, throughput, backup and replication are needed? |
| Messaging | What event volume and retention? |
| Object storage | How much source data must be kept? |
| Observability | How much logging and tracing data will be generated? |
| Networking | What data transfer and connectivity costs apply? |
| Recovery | What 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.
- Average and peak throughput.
- Daily and annual storage growth.
- The queue backlog during an outage, and the recovery throughput needed.
- 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
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.