Interview concept

M7 Architecture Review And Technical Strategy

Asked of: Software Engineer

Last updated

Architecture review infographic showing a resilient money-movement system: idempotent API, authoritative services, transactional outbox, event bus, saga workers, reconciliation, and observability.

What's being tested

An architecture review tests whether you can turn ambiguous requirements into a reliable, evolvable system design and explain the tradeoffs behind it. The interviewer is probing for judgment across API boundaries, data consistency, failure handling, observability, security, and operational complexity—not just whether you can name `Kafka` or a database. Coinbase cares because financial systems must preserve correctness under retries, partial failures, traffic spikes, and adversarial conditions while remaining understandable enough to operate safely.

Core knowledge

  • Requirement clarification comes first: establish throughput, latency targets, availability, durability, consistency, recovery-point objective (RPO), recovery-time objective (RTO), geographic scope, and correctness invariants. Separate hard requirements from assumptions you can revisit.

  • Bounded contexts keep ownership clear. Define which service is authoritative for balances, orders, transfers, or identity, and expose state through versioned APIs rather than allowing multiple services to write the same records.

  • Consistency choices must follow the invariant. Strong consistency may be required when preventing double-spend or duplicate settlement; eventual consistency is usually acceptable for read models, notifications, and analytics. State the anomaly you are willing to tolerate.

  • Idempotency is essential for money-moving operations. Accept a client-supplied idempotency key, persist the request and final outcome atomically, and return the original result on retry. A timeout must not cause the client to submit an untracked second operation.

  • Transactions and the outbox pattern solve different parts of distributed writes. Commit the business state and an outbox event in one `Postgres` transaction, then publish asynchronously with retries; consumers use event IDs or deduplication keys because delivery is at-least-once.

  • Sagas coordinate multi-service workflows without pretending a distributed transaction exists. Each step has a compensating action, explicit states such as PENDING, COMPLETED, and FAILED, and reconciliation for cases where compensation is impossible or delayed.

  • Partitioning and ordering require a deliberate key. Partition events by account, wallet, or operation ID when per-entity ordering matters; avoid a single global partition that creates a bottleneck. Ordering is normally guaranteed only within a partition, not across topics.

  • Backpressure and load shedding protect dependencies. Use bounded queues, rate limits, circuit breakers, exponential backoff with jitter, and bulkheads. A queue improves resilience but does not remove capacity limits; monitor age and depth, not merely enqueue success.

  • Availability math exposes unrealistic designs. Independent services with availabilities A1A_1 and A2A_2 have sequential availability approximately A1A2A_1A_2; redundant parallel components provide 1−(1−A1)(1−A2)1-(1-A_1)(1-A_2), assuming failure independence. Call out correlated-zone failures.

  • Data modeling should encode invariants, not rely only on application checks. For a ledger, use append-only entries, immutable transaction IDs, explicit debit/credit semantics, and reconciliation such that total debits equal total credits. Avoid floating-point currency calculations; use integer minor units or exact decimal types.

  • Observability needs three layers: structured logs for individual operations, metrics such as `p95`, `p99`, error rate, queue age, and reconciliation lag, and distributed traces using a correlation ID. Define alerts around customer impact and correctness, not only CPU utilization.

  • Security and safe rollout belong in the design. Apply least-privilege service identities, encryption in transit and at rest, audit trails, secret rotation, request authentication, and authorization at the resource boundary. Use feature flags, canaries, schema compatibility, and rapid rollback for migrations.

Worked example — “Architecture Review: Reliable Crypto Transfer Service”

No interview question was supplied, so this representative architecture-review prompt shows the expected reasoning structure. In the first 30 seconds, clarify whether the service initiates blockchain withdrawals or only internal transfers, required confirmation semantics, supported assets, expected throughput, latency, custody boundaries, and whether duplicate submission is financially dangerous. State the invariant explicitly: a transfer must have one durable business outcome, and the ledger must remain balanced even if workers, networks, or clients retry. Organize the answer around the API and idempotency contract, the ledger and state machine, asynchronous execution and blockchain integration, and observability/reconciliation. I would persist a transfer request, immutable ledger entries, and an outbox event in one `Postgres` transaction, then let workers process the external broadcast with an idempotent operation record. The key tradeoff is strong synchronous confirmation versus asynchronous acceptance: return PENDING quickly for availability, while exposing clear status and reserving funds before external settlement. I would explicitly discuss reorgs, fee changes, stuck transactions, provider outages, and the distinction between broadcast success and final blockchain confirmation. If I had more time, I would design the reconciliation job, multi-region failover behavior, key-management boundary, and migration plan for adding a new asset.

A second angle

The same reasoning applies to an order-placement service, but the critical invariant shifts from ledger balance to preventing unauthorized or duplicate execution. Clarify whether orders can be amended, how exchange availability is represented, and whether the client needs synchronous acceptance or final fill confirmation. An order state machine, idempotency key, reservation model, and event-driven execution pipeline remain central, but market-data freshness and partial fills become first-class failure cases. The design should separate accepted order intent from execution reports and make recovery safe when an exchange acknowledgement is lost.

Common pitfalls

Pitfall: Saying “use exactly-once processing” as if it were a property provided end to end. Most systems provide at-least-once delivery; achieve effectively-once business effects with durable operation IDs, unique constraints, idempotent handlers, and reconciliation.

A common analytical mistake is choosing technology before identifying invariants. “Use `Kafka` and microservices” is not an architecture; explain what must be atomic, what may be delayed, where state lives, and what happens during each partial failure.

Pitfall: Treating a retry as harmless for a financial mutation. Retries without idempotency can double-reserve funds, create duplicate withdrawals, or produce conflicting status records.

A communication mistake is presenting a perfect diagram without stating assumptions or alternatives. Strong candidates narrate the critical path, label synchronous versus asynchronous edges, identify the source of truth, and name one rejected design with its cost.

Pitfall: Ignoring operations after the happy path. A design without dashboards, replay procedures, reconciliation, dead-letter handling, schema evolution, and rollback is incomplete even if its request flow looks correct.

Connections

Expect pivots to distributed transactions, event sourcing and CQRS, database replication and failover, API versioning, rate limiting, and threat modeling. The interviewer may also ask how you would test failure modes with contract tests, property-based tests, fault injection, or controlled production canaries.

Further reading

  • Designing Data-Intensive Applications — Martin Kleppmann’s treatment of consistency, replication, streams, transactions, and distributed-system tradeoffs.

  • Microservices Patterns — Chris Richardson’s practical coverage of sagas, transactional outbox, idempotency, and service boundaries.

  • The SRE Book — Google’s framework for SLOs, error budgets, monitoring, incident response, and safe operations.

Related concepts