System Design Atlas

Verify identity evidence and eligibility

08 / 10Worked example

Bottlenecks and trade-offs

Which observed bottleneck justifies which extension?

With 1,000 orders per day, the load remains small; the effort arises at the integration boundaries. The following decisions therefore first mention the situation from which they arise, then the requirement, the choice, the accepted disadvantage and the condition for re-evaluation. Additional infrastructure will be tied to an observed bottleneck.

Starting point The critical sequence is defined. Real usage must show where throughput or waiting time reaches a limit.

Assumptions for the example case

Example design: an operator, a verification provider and a specified purpose of use. Identity and other evidence shall be assessed separately. Login, sessions, and rights across multiple applications are not part of this case. Figures and target values are design assumptions; no real people are checked.

Targeted diagnosis of a growing backlog

From observed symptom to the smallest measure

  1. Symptompending items are ageingp95-age of open trials increases
  2. MeasurementSeparation of residuesProvider time, work time, clarification time
  3. CauseDefine the boundaryQuota, error, personnel or assignment
  4. ActionTargeted ExtensionParallelism, buffer or manipulation
  1. 1Quantify
  2. 2Localize
  3. 3Reasoned

Accepted trade-offMore buffer increases waiting time and operating effort.

ReassessExtend only at measured backlog or provider limit.

Trade-off: Additional infrastructure follows an observed bottleneck.

From the symptom, the diagnostic pathway leads to a well-founded extension via measurement and cause.

Initial choices and how to test them

Data management

A relational SQL data store as the authoritative record

At use time, the domain application asks whether a valid, unrevoked decision exists for this person, purpose and time. This query spans individual verification requests. It joins request I-17 with attempts V-17, evidence references N-17 and decision D-17. When provider event E-17 arrives, the worker must apply the new decision, request state and inbox-row completion together.

The usage query filters by person, purpose and validity across request boundaries, which suits relationships and indexes. Completing the decision and inbox row together requires a transaction across two records. This prevents both a stored decision with an open inbox row that creates another decision on retry, and a completed inbox row without a stored decision that could permit approval without evidence.

Alternative considered
A document store holding each entire request as one document was considered because a verification request forms a natural document. It is not selected here: the usage query starts from person and purpose rather than the request, and the inbox row is outside the request document. Completing it together with the decision would require a write across two documents.
Trade-off
Schemas and migrations require maintenance; each new state and evidence field changes the schema. Evidence data remains outside these tables with its own retention and deletion periods. Verify the choice by delivering E-17 twice and expecting exactly one decision, then forcing a failure between decision storage and inbox completion and expecting neither effect to remain.
Reassess
Reassess when usage queries dominate database load or retained data outgrows the store. First inspect queries, indexes and archiving before adding another storage system.
Capture

Provider-hosted evidence capture

Identity-document images and selfies are highly sensitive. The operator wants to avoid receiving, storing and deleting them in its application. The verification provider offers a complete capture flow that the person opens directly.

Image data never reaches our application. The operator stores evidence reference N-17 and the verification result rather than the document itself. This reduces the number of systems whose retention, deletion and access controls must be demonstrated.

Alternative considered
A provider SDK in our frontend was considered because it gives control over guidance, text and error messages. This design excludes it because image data would then pass through our application and extend its retention and deletion obligations.
Trade-off
The operator cannot change the order, text or error messages of the capture flow. A provider outage leaves no alternative path: without intervention, new requests remain in `created` and silently reach `expired`. The design therefore needs a visible capture-unavailability signal and a deadline that routes such requests to review before they expire.
Reassess
Reassess the SDK when measured capture drop-offs reduce completion rates or a requirement calls for custom guidance. Include the expanded deletion obligations in that decision.
Cache

Read the current decision directly at every use

Verification runs once per request, while its result is assessed at every use. The usage query is therefore the system’s most frequent read. Its result depends on validity and revocation, which may change at any time.

Revocation must take effect immediately. At 1,000 requests per day, the read load is comfortably within the capacity assumed for one database. Reading directly prevents a revoked decision from remaining valid until a cached entry expires.

Alternative considered
A short-lived cache per person and purpose was considered because the query is easy to cache. It is initially excluded: any cache lifetime creates a window before revocation takes effect, without a measured read-load problem to justify that cost.
Trade-off
This requires more database reads than caching. Verify the choice by revoking a decision and immediately making the usage query: it must return `nicht erfüllt`.
Reassess
Reassess when measured read load strains the database. A later cache needs a key containing person and purpose, plus invalidation that immediately accounts for revocation and expiry.
Queue

Inbox and outbox tables in the relational SQL data store

The verification provider reports its result as event E-17. Work between receipt and the domain decision must take effect exactly once, including after a restart. At an assumed four provider events per request, this means around 4,000 events per day.

The event and domain state can share a transaction. A redelivered event is recognized by its unique key and takes effect once. An additional broker would still require the same association between the event and request state.

Alternative considered
A dedicated message broker was considered for its built-in delivery and retries. At 4,000 events per day, it is not selected: the application would still need to ensure exactly-once effects in its own data store while operating a second system.
Trade-off
The worker polls the inbox instead of receiving pushed events. Locks and retries require bounded, monitored worker execution. Verify the choice by delivering an event repeatedly: the request state must change only once.
Reassess
Reassess a dedicated broker when unprocessed inbox rows age or multiple independent consumers need the same events. Continue protecting exactly-once effects in the authoritative domain data.

Rejected Options with Their Reason

Distribution of multiple database nodes
With 1,000 orders and around 4,000 provider events per day, the throughput is far below what a single node carries. A distribution would carry the transaction, which makes decision D-17 and the inbox closing jointly effective, across nodes, thus weakening the very commitment that this case needs.
A graph store for evidence relationships
This case has shallow relationships: request I-17 has attempts, each attempt has evidence, and the request leads to a decision. No query traverses an unknown number of intermediate relationships, so this design has no demonstrated need for a graph data store.
Automatic switch to a second verification provider
A joint adapter contract prepares the change. An automatic failover remains open because two providers can evaluate the same proof differently: the same person could receive a different result depending on the provider, and the assignment of a delayed feedback E-17 to the correct attempt V-17 would no longer be clear. Before implementation, comparability of evidence, cost control and attempt assignment must be clarified.

Try it yourself

Choose a symptom like old pending cases. Record the measured value, possible cause, measure and accepted disadvantage.

A hint for your attempt

A component is not yet a diagnosis. Separate provider time, worker backlog, and human case-resolution time.

Compare with a possible solution
Technical backlog
As the age of `pending` orders increases and the worker backlog grows measurably, limited parallelism can help. Test condition: Provider quota and SQL latency remain within their limits; otherwise, more parallelism aggravates the error. Check: p95 age, worker backlog and provider error separately. Accepted disadvantage: more simultaneous database accesses, blocking conflicts and operational expenses.
Casework backlog
With 50 manual cases per day, the specialist queue requires responsible people and a deadline. Measurement: oldest case and turnaround time; cause may be insufficient staffing. Action: Provide capacity and representation. Disadvantage: ongoing personnel costs and additional coordination effort. Until clarification, `needs_review` remains visible and receives an escalation if the deadline is exceeded.

Apply to your project

Which measurement would trigger a concrete scaling decision in your project?

The selected signals and limits are connected in step 9 to form an operating plan.