Skip to main content

Capacity Planning: A Transparent Thought Experiment

All inputs in this page are invented workload assumptions for architecture analysis, not production measurements, user counts, forecasts, quotes or proven SLAs.

Workload envelope​

VariableAssumptionDerivation
Firms100Illustration of an initial multitenant service
Named users per firm101,000 total named seats
Active engagements per firm202,000 active engagements
Journal lines per engagement100,000Example review population
Aggregate journal lines200,000,000100 × 20 × 100,000
Average original export per engagement40 MB80 GB original files for one dataset per engagement
Logical normalized data per journal line400 bytes80 GB before indexes, replicas, transaction logs and backups
Peak concentration25% of engagements submitted in a ten-day deadline window500 submissions / ten days

The illustrative 400 bytes/row is a planning placeholder, not a measurement of PostgreSQL physical storage. Multiple source versions, indexes, journal metadata, retention and backups could substantially increase capacity requirements.

Average is not peak​

For 500 submissions of 100,000 lines over ten eight-hour working days:

500 × 100,000 / (10 × 8 × 3,600) ≈ 174 lines/second averaged across working hours.

That number is not a worker throughput target or evidence that one processor will suffice. Arrivals are bursty: concurrent uploads, 200 MB files, retries, tax deadlines, mapping review and large rule runs can cause much higher instantaneous demand.

Do not infer a cloud bill or service instance count from row counts alone; first benchmark representative formats and workloads.

Architecture implications​

ConcernProposed v1 responseTest that would challenge it
Bursty uploadsObject-storage direct upload using restricted presigned operations; asynchronous parse jobsConcurrent large uploads, aborted uploads, malware quarantine
Rule-run CPU/memoryBounded worker concurrency; chunked or columnar processing; run-specific limits100k, 1m and 10m-row representative datasets
BackpressureQueue depth, job-age alarms and per-tenant fairnessOne firm's backlog cannot indefinitely starve others
Database growthVersioned snapshots, table/index lifecycle, measured query plansCross-tenant isolation and p95 searches under large datasets
Retry behaviorIdempotency keys, outbox and job deduplicationKill worker before and after commit; no double findings or charges
Evidence retentionObject versioning, retention controls, verified backup/restoreRecover a signed-off evidence package from backup
User experienceFast acknowledgement for uploads; background status reportingLarge imports do not block interactive engagement access

Explicit quality scenarios (goals, not accomplishments)​

  • Isolation: a valid staff token from firm A must never return firm B's resources, even when IDs or tenant headers are forged.
  • Correctness: accepted journal-line count and source controls must reconcile or the dependent check remains incomplete.
  • Recovery: a worker crash after persistence and before publish cannot lose the audit event or duplicate a finding.
  • Consistency: new source or mapping versions must invalidate dependent runs before partner approval.
  • Performance: define p95 and maximum job-age targets after tests on real-size synthetic fixtures, identifying hardware, dataset type and concurrency.
  • Continuity: choose explicit RPO/RTO values only after interviewing target customers; demonstrate recovery before promising them.

Cost drivers to revisit​

File versions and retention, PostgreSQL index size and backups, CPU time for repeated full checks, malware scanning, outbound evidence transfer and observability. Record the trade-off between incremental processing and full deterministic reruns using measured workload data before optimizing.

Triggers for changing the architecture​

Scale workers first; profile database/index bottlenecks second. Consider separating the ingestion or rule-processing deployable only if measured resource contention, isolation obligations or deployment cadence justifies the added operational burden. Splitting services is not the goal.

Links: solution architecture, alternatives, acceptance matrix.