Volume 13 · Chapter 4 — Mock Interviews and Rapid-Fire Revision

Mock Interview: Architecture, Resilience and Operations

Goutham Mayaluri 7 min read AWSCloudResilience

4.1 Introduction

This mock interview covers system architecture, resilience and disaster recovery, delivery, and operations - the higher-level design and operational judgment a senior interview probes most. These questions reward structured, trade-off-aware reasoning over recall, so focus on how the model answers frame decisions and name their costs.

Mock Interview

When would you choose microservices over a monolith, and how do you keep them consistent?

I choose microservices when the independence they provide - independent deployment and scaling, team autonomy, and fault isolation - genuinely matters, typically at larger scale with multiple teams and parts that evolve or scale separately, because that independence outweighs the cost of becoming a distributed system: network failures, eventual consistency, harder debugging, and operational overhead. For smaller systems or a single team, a well-structured monolith is simpler and better, and a modular monolith is a strong middle ground. Keeping microservices consistent is the hard part, because each owns its data so there’s no single ACID transaction across them: I use ACID within a service, accept eventual consistency across services (designing the UX to tolerate the brief window), and coordinate multi-step cross-service operations with a saga - a sequence of local transactions with compensating actions to undo on failure. I propagate events reliably with the outbox pattern so state and events can’t diverge, and make consumers idempotent for safe redelivery. So I adopt microservices deliberately where independence pays for its cost, and maintain correctness with ACID-within-service plus sagas, outbox, and idempotency across services.

Mock Interview

How do you make service-to-service calls resilient to dependency failures?

With a set of patterns that assume dependencies will fail and prevent one failure from cascading. Timeouts bound how long I wait so a slow dependency fails fast instead of blocking and exhausting threads - the foundation. Retries with exponential backoff and jitter handle transient failures, but limited and only for idempotent operations, so I don’t create a retry storm that worsens the outage. A circuit breaker detects a high failure rate and stops calling the failing dependency, failing fast to a fallback, which protects my service and gives the dependency room to recover - preventing cascading failure. Bulkheads isolate resource pools so one struggling dependency can’t exhaust the whole service. And graceful degradation lets the system lose functionality partially rather than entirely - the core flow survives when a non-critical dependency is down. So for a bank, I wrap critical downstream calls in timeouts, careful retries, and circuit breakers, with bulkheads and fallbacks, so a single dependency’s bad day degrades the platform rather than collapsing it - resilience is architecture, not hope.

Mock Interview

Explain RTO, RPO, and how you'd design disaster recovery for a bank.

RTO is the maximum acceptable downtime - how fast you must recover - and RPO is the maximum acceptable data loss - how recent the recovered data must be; together they set the recovery requirement and drive the strategy, because lower RTO/RPO costs more. I’d classify systems by criticality and match each to the cheapest strategy meeting its objectives along the spectrum: backup and restore (cheapest, slowest), pilot light, warm standby, and multi-site active-active (costliest, near-instant). A bank’s core transaction and ledger systems demand recovery in minutes with minimal loss, so they warrant warm standby or active-active across two Regions - in the same country for residency - with the database continuously replicated and Route 53 health checks failing traffic over automatically; less-critical systems use pilot light or backup-restore at lower cost. The hardest part is cross-Region data replication, which sets the RPO: synchronous means no loss but high write latency, asynchronous is fast but risks losing recent writes, so I’d typically accept a small RPO with async replication. And I’d test failover regularly, because untested DR fails when needed. So RTO/RPO quantify the requirement, and I match the cheapest strategy per system, with tested Region failover for the critical ones.

Mock Interview

How do you deploy changes to critical systems safely and frequently?

Because change is the leading cause of outages, I make deployment controlled and reversible so I can deploy often without fear. I build through a CI/CD pipeline: every change is automatically built and tested with quality and security gates, and only a passing change becomes an immutable versioned artifact, which I build once and promote through environments so production runs exactly what was tested. I deploy to production with a safe strategy - canary (expose a small subset first, gated on health metrics) or blue-green (switch traffic between two environments for instant rollback) - so a bad change affects few or no users and rolls back fast, with an approval gate before production for control. I put risky features behind feature flags so I can turn them on gradually and off instantly without a redeploy. And because artifacts are immutable and versioned, rollback is just redeploying the previous version. Frequent small releases are lower-risk than big ones because each change is easy to diagnose and revert. So safe deployment - health-gated canary/blue-green, immutable promoted artifacts, feature flags, fast rollback - is what lets a bank deploy frequently to critical systems with low risk.

Mock Interview

Walk me through diagnosing a sudden latency spike in production.

First, if customers are impacted, I mitigate before full diagnosis - restoring service is the priority, and asking “what changed?” often points to a recent deploy I can roll back as the fastest fix. Then I diagnose with the three pillars in sequence. Metrics to detect and scope: confirm it’s latency, see when it started and how widespread, and which service. Traces to localize: for the slow requests, the trace and service map show which service or downstream call is the slow segment - narrowing it from “the system is slow” to a specific component, and revealing whether the service itself or a dependency is the cause. Logs to explain: query the affected requests by correlation ID to see exactly what’s happening - for example a specific slow database query. I correlate with recent changes and dependency health throughout, and stay hypothesis-driven - form a specific hypothesis like “the new deploy introduced a slow query” and test it against the evidence rather than guessing. Common causes are a slow query or saturated database, a slow dependency, resource saturation, or under-capacity - each with a matching fix. So: mitigate if needed, then metrics to scope, traces to localize, logs to explain, correlate with changes and dependencies, and test a hypothesis - a methodical path from symptom to root cause.

Mock Interview

Design the high-level architecture for processing payments, and name the key trade-off.

I’d clarify first - volume, peak, latency and consistency needs, compliance - then design around the fact that correctness for money dominates. Requests enter via CloudFront and a WAF, an API gateway authenticates and rate-limits, and a stateless payment service across multiple AZs performs the money movement as a single ACID transaction on a Multi-AZ relational ledger, then confirms to the customer. Every request carries an idempotency key so retries apply exactly once, and the authoritative balance is read from the ledger, never a cache. Downstream effects - notification, fraud, analytics - are handled asynchronously: the service publishes a “PaymentMade” event that fans out via SNS to per-service SQS queues, with the outbox pattern and idempotent consumers. It scales statelessly across AZs with read replicas and a cache for reads, and resilience patterns protect external calls. The key trade-off I’d name is synchronous strong consistency where money moves - because correctness is non-negotiable - versus asynchronous eventual consistency for the surrounding effects, since that work can happen slightly later and decoupling means a slow fraud service never blocks a payment. That deliberate boundary between the correctness-critical path and the scalable, decoupled rest is the defining decision.

4.7 Chapter Revision Notes

  • Microservices when independence justifies distributed complexity; maintain consistency with ACID-within-service, sagas, outbox, and idempotency.
  • Resilience: timeouts (foundation), bounded idempotent retries with backoff/jitter, circuit breakers, bulkheads, graceful degradation.
  • RTO/RPO drive the DR strategy; match the cheapest that meets each system’s objectives; cross-Region replication sets RPO; test failover.
  • Safe deployment: CI/CD with gates, build-once-promote, canary/blue-green health-gated with fast rollback, feature flags.
  • Diagnose: mitigate first, then metrics-to-scope, traces-to-localize, logs-to-explain, correlate with changes/dependencies, test a hypothesis.