Skip to main content

Question Bank

How to use this page
  • Answer out loud in 2–3 minutes, then check against the linked page
  • Track your confidence per question (red / amber / green) in your own sheet and revisit reds every few days
  • Use the practice sets at the bottom to build a weekly routine

TL;DR​

  • 166 questions across 12 tracks, each linked to the page that answers it.
  • Difficulty: ★ fundamentals every candidate must know · ★★ senior-level, expect follow-ups · ★★★ architect-level depth or a full design.
  • A strong answer has a shape: definition → mechanism → trade-off → bank/e-commerce example → failure mode.
  • Do not memorise answers; practise reasoning. Interviewers change one constraint and watch what you do.

The shape of a good answer​

PartExample for "Why use a transactional outbox?"
DefinitionWrite the business change and the event to publish in the same DB transaction
MechanismA relay (poller or CDC) reads the outbox table and publishes to the broker, marking rows sent
Trade-offGuarantees no lost events, but delivery is at-least-once and slightly delayed; consumers must be idempotent
ExampleTransfer committed → TransferCompleted event → notification service sends the balance alert
Failure modeRelay crashes after publishing but before marking → duplicate event → consumer dedups by event ID

System design — building blocks​

System design building blocks (14 questions)
IDQuestionLevelRead
SD-01Estimate QPS, storage and cache size for a service with 50M DAU creating 2 items per day each.★Back-of-the-Envelope
SD-02How do you scale a single-server web app to 10M users, step by step?★Scaling from Zero to Millions
SD-03L4 vs L7 load balancing: when do you pick each, and what algorithms would you use?★Load Balancing
SD-04Compare cache-aside, write-through and write-behind. Which one for product prices, and why?★★Caching
SD-05A hot key expires during a flash sale and the DB melts. Explain and prevent the stampede.★★Caching
SD-06What can and cannot be cached at a CDN for an e-commerce site? How do you invalidate?★CDN & Edge
SD-07When do you shard, and how do you choose a shard key for orders? What breaks?★★Database Replication & Sharding
SD-08Explain consistent hashing and why virtual nodes help.★★Consistent Hashing
SD-09Kafka vs RabbitMQ vs SQS for order events: ordering, replay, routing, operations.★★Message Queues & Event Streaming
SD-10Design a distributed rate limiter for a public payment API. Which algorithm and where is state?★★Rate Limiting
SD-11Snowflake vs UUIDv7 vs database sequence for order IDs.★★Unique ID Generation
SD-12REST vs gRPC vs GraphQL for a mobile banking backend vs internal service calls.★API Design
SD-13How does an inverted index work, and how do you keep it in sync with the catalog database?★★Search & Inverted Indexes
SD-14Lambda vs Kappa architecture for daily settlement reports plus a real-time dashboard.★★★Batch & Stream Processing

System design — full designs​

Full system designs (9 questions)
IDQuestionLevelRead
SD-15Design a URL shortener. How long is the code, and 301 or 302?★URL Shortener
SD-16Design a notification system that never delays OTPs during a marketing blast.★★Notification System
SD-17Design a chat system. How do you guarantee ordering and no message loss across reconnects?★★★Chat System
SD-18Fan-out on write vs read for a feed where some shops have 5M followers.★★News Feed
SD-19Design search autocomplete with a daily rebuild and real-time trending queries.★★Search Autocomplete
SD-20Design a hotel reservation system that prevents double booking under concurrency.★★Hotel Reservation
SD-21Design an S3-like object store: metadata, durability, replication vs erasure coding.★★★S3-like Object Storage
SD-22Design a real-time leaderboard for 10M players.★★Gaming Leaderboard
SD-23Design a distributed email service: storage, search, spam, sync.★★★Distributed Email

Distributed systems​

Distributed systems (18 questions)
IDQuestionLevelRead
DS-01Explain CAP, and why PACELC is more useful for real design decisions.★CAP & PACELC
DS-02Linearizability vs serializability vs eventual consistency — with a banking example of each.★★★Consistency Models
DS-03What is read-your-writes consistency and how do you provide it with read replicas?★★Consistency Models
DS-04Leader-follower vs multi-leader vs leaderless replication: trade-offs and use cases.★★Replication
DS-05Explain Raft leader election and log replication in two minutes.★★★Consensus & Raft
DS-06Why can't you order events across services by wall-clock timestamps?★★Time, Clocks & Ordering
DS-07Lamport clocks vs vector clocks: what does each tell you?★★★Time, Clocks & Ordering
DS-082PC vs TCC vs Saga for moving money between two systems you don't fully control.★★★Distributed Transactions
DS-09Orchestrated vs choreographed sagas: how do you choose, and how do compensations fail?★★Distributed Transactions
DS-10What problem does the transactional outbox solve? Outbox polling vs CDC.★★Transactional Outbox & CDC
DS-11Make a payment API idempotent. Where is the key stored, and what about concurrent duplicates?★★Idempotency & Exactly-Once
DS-12Is exactly-once delivery possible? What does Kafka's exactly-once actually guarantee?★★★Idempotency & Exactly-Once
DS-13What is wrong with a Redis SET NX + TTL lock, and what are fencing tokens?★★★Distributed Locks & Leases
DS-14How do timeouts, retries with jitter, circuit breakers and bulkheads work together?★★Resilience Patterns
DS-15Define SLI, SLO, SLA and error budget for a transfer API.★Observability & SLOs
DS-16Logs vs metrics vs traces. How do you trace one payment across six services?★★Observability & SLOs
DS-17OAuth 2.0 + OIDC: which flow for a mobile banking app and why?★★Security for Architects
DS-18mTLS, secrets management, encryption at rest: your minimum bar for a payment service.★★Security for Architects

Architecture​

Architecture (16 questions)
IDQuestionLevelRead
AR-01What does a Solution Architect do that a senior engineer does not?★Role of the Architect
AR-02Run a trade-off analysis between availability and consistency for a wallet balance.★★Quality Attributes
AR-03Turn "the system must be fast and secure" into measurable quality attribute scenarios.★★Quality Attributes
AR-04Modular monolith vs microservices for a 10-person team building a lending product.★★Architecture Styles
AR-05Event-driven vs request-driven integration: when does each fit?★★Architecture Styles
AR-06API gateway vs BFF vs service mesh: what problem does each solve?★★Microservices Patterns
AR-07With database-per-service, how do you do reporting and cross-service queries?★★Microservices Patterns
AR-08CQRS and event sourcing: when are they worth the complexity in a bank?★★★Event-Driven Architecture
AR-09How do you discover bounded contexts in an e-commerce domain?★★Domain-Driven Design
AR-10What is the aggregate boundary for an order with payments and shipments?★★★Domain-Driven Design
AR-11Explain hexagonal architecture and how it improves testability.★Clean & Hexagonal Architecture
AR-12What goes into an ADR? What are the four C4 levels?★Documenting Architecture
AR-13Blue-green vs canary vs rolling deployments for a payment service.★★Cloud-Native & Deployment
AR-14Define RTO and RPO; design active-passive multi-region DR for core payments.★★★High Availability & DR
AR-15Strangler fig migration off a legacy core: how do you keep data consistent during transition?★★★Legacy Modernization & Migration
AR-16Estimate the monthly infrastructure cost of a service and name its top cost drivers.★★Capacity Planning & Cost

Banking​

Banking (14 questions)
IDQuestionLevelRead
BK-01Ledger balance vs available balance: what are holds and how do they expire?★Core Banking Concepts
BK-02What happens during end-of-day processing in a core banking system, and why does it matter for 24/7 channels?★★Core Banking Concepts
BK-03Design a double-entry ledger schema. Why are entries immutable and how do you correct mistakes?★★Double-Entry Ledger Design
BK-04How do you read balances fast without losing correctness (running balance, snapshots)?★★★Double-Entry Ledger Design
BK-05Card flow: authorisation, capture, clearing and settlement — who talks to whom?★★Payments & Card Flows
BK-06What are tokenisation and 3-D Secure, and how do they shrink PCI DSS scope?★★Payments & Card Flows
BK-07Reconcile internal records with a switch settlement file. How do you handle breaks?★★Reconciliation & Settlement
BK-08What does PCI DSS require from systems that store, process or transmit card data?★★Compliance
BK-09KYC vs AML: which systems do they require at onboarding and during monitoring?★★Compliance
BK-10Add real-time fraud scoring to the payment path within a 100 ms budget.★★★Real-time Fraud Detection Pipeline
BK-11Design an interbank instant transfer. What happens when the switch times out?★★★Bank Transfer System
BK-12Design merchant QR payment. Static vs dynamic QR — what changes?★★QR & Instant Payment
BK-13Design a digital wallet with top-up, P2P transfer and withdrawal.★★★Digital Wallet
BK-14Design pay-in and pay-out with an external PSP, including reconciliation.★★★Payment System

E-commerce​

E-commerce (13 questions)
IDQuestionLevelRead
EC-01What are the main bounded contexts of an e-commerce platform and how do they integrate?★E-commerce Platform Overview
EC-02Model a catalog with category-specific attributes: relational, document or EAV?★★Product Catalog & Search
EC-03Keep the search index consistent with price and stock changes.★★Product Catalog & Search
EC-04Guest vs logged-in carts: storage, merging, expiry.★Cart & Checkout
EC-05Checkout as a saga across order, payment and inventory. What compensates what?★★★Cart & Checkout
EC-06Prevent overselling: reserve with TTL at checkout vs decrement at payment.★★Inventory & Flash Sales
EC-07Design a flash sale for 100k units with 2M users in the first minute.★★★Flash Sale System
EC-08Design the order state machine. How do you make transitions idempotent?★★Order Management
EC-09One cart, three sellers, two warehouses: split, ship, return partially.★★★E-commerce Order Platform
EC-10Promotion engine: stacking rules, budget caps, and the same price at cart and checkout.★★★Pricing & Promotions
EC-11What changes for COD orders in payment, reconciliation and fraud?★★E-commerce Order Platform
EC-12A followed-shops feed that always shows live price and stock.★★News Feed
EC-13Autocomplete for Vietnamese queries typed with and without diacritics.★★Search Autocomplete

Databases​

Databases (15 questions)
IDQuestionLevelRead
DB-01Normalise to 3NF, then tell me when you would denormalise.★Relational Modeling
DB-02How does a B-tree index work? How do you order columns in a composite index?★★Indexing
DB-03Covering indexes and index-only scans; why might the planner ignore your index?★★Indexing
DB-04Isolation levels and their anomalies: dirty read, non-repeatable read, phantom, write skew.★★Transactions & Isolation
DB-05Prevent lost updates on a balance: SELECT FOR UPDATE vs optimistic version vs atomic UPDATE.★★Locking & Concurrency
DB-06How do deadlocks happen in a transfer between two accounts, and how do you prevent them?★★Locking & Concurrency
DB-07Read an EXPLAIN ANALYZE plan: nested loop vs hash join vs merge join.★★Query Optimization
DB-08Store money: NUMERIC vs integer minor units vs float. What about VND?★Schema Patterns
DB-09Audit trail and multi-tenancy patterns: trade-offs of each.★★Schema Patterns
DB-10B-tree vs LSM-tree: read, write and space amplification.★★★Storage Engines
DB-11Model "latest 50 transactions per account" in Cassandra or DynamoDB.★★NoSQL Data Modeling
DB-12Partition a 2 TB transactions table in Postgres by date. What are the pitfalls?★★Partitioning & Sharding in Practice
DB-13MVCC, VACUUM and bloat in PostgreSQL: what goes wrong with long transactions?★★★PostgreSQL Deep Dive
DB-14Redis persistence (RDB vs AOF), eviction policies, and when Redis must not be your source of truth.★★Redis Deep Dive
DB-15Add a NOT NULL column to a 500M-row table without downtime.★★★Zero-Downtime Migrations

Networking​

Networking (10 questions)
IDQuestionLevelRead
NW-01Walk the TCP/IP layers for one HTTPS request.★OSI & TCP/IP
NW-02TCP handshake, TIME_WAIT, and why connection pooling matters for a DB-heavy service.★★TCP & UDP
NW-03HTTP/1.1 vs HTTP/2 vs HTTP/3: where does head-of-line blocking happen in each?★★HTTP Evolution
NW-04TLS 1.3 handshake. Where do you terminate TLS, and when do you need mTLS?★★TLS & HTTPS
NW-05How does DNS resolution work? What are the risks of DNS-based failover?★DNS
NW-06Reverse proxy vs load balancer vs API gateway.★Proxies, LBs & API Gateways
NW-07Polling vs long polling vs WebSocket vs SSE for live order tracking.★Polling, WebSocket & SSE
NW-08gRPC over HTTP/2: streams, deadlines, and why L4 load balancing is a problem.★★RPC & gRPC
NW-09What happens when you type a URL and press Enter?★What Happens When You Type a URL
NW-10A service sees intermittent 5-second latency spikes to its DB. Debug the network path.★★★Network Troubleshooting

Operating systems​

Operating systems (8 questions)
IDQuestionLevelRead
OS-01Process vs thread vs goroutine: memory, scheduling, cost of switching.★Processes & Threads
OS-02What does a context switch cost, and how does the Linux scheduler share CPU?★★CPU Scheduling
OS-03Virtual memory and page faults; why does a container get OOM-killed?★★Memory Management
OS-04Mutex vs semaphore vs condition variable; define a race condition precisely.★Concurrency & Synchronization
OS-05Blocking I/O vs epoll vs io_uring. Where does Go's netpoller fit?★★★I/O Models
OS-06What does fsync guarantee, and how does a database survive a power loss?★★File Systems & Durable Storage
OS-07Namespaces and cgroups: what a container really is.★★Linux Containers
OS-08A Go service is at 100% CPU. Walk through your Linux investigation.★★Linux Performance Analysis

Go​

Go (14 questions)
IDQuestionLevelRead
GO-01Slices: len, cap, and the append aliasing bug.★Go Fundamentals
GO-02Implicit interfaces, "accept interfaces, return structs", and the nil-interface gotcha.★★Interfaces & Composition
GO-03Error wrapping with %w, errors.Is vs errors.As, sentinel vs typed errors.★Error Handling
GO-04When do generics help, and when is an interface the better tool?★★Generics
GO-05Unbuffered vs buffered channels. Who should close a channel?★★Goroutines & Channels
GO-06How do goroutine leaks happen, and how do you detect and prevent them?★★Common Pitfalls
GO-07context.Context: cancellation, deadlines, values — rules of correct use.★sync, atomic & context
GO-08sync.Mutex vs RWMutex vs atomic vs channels: how do you choose?★★sync, atomic & context
GO-09Build a bounded worker pool with error propagation and cancellation.★★Concurrency Patterns
GO-10Escape analysis and GC tuning with GOGC and GOMEMLIMIT.★★★Memory, GC & Escape Analysis
GO-11Table-driven tests, benchmarks and the race detector.★Testing & Benchmarking
GO-12Lay out a Go service with hexagonal architecture. Where do interfaces live?★★Project Layout
GO-13Graceful shutdown, health checks and server timeouts in an HTTP service.★★Building Production Services
GO-14Use pprof to find a CPU or memory hotspot in production.★★Profiling & Performance

Clean code​

Clean code (8 questions)
IDQuestionLevelRead
CC-01What makes a function clean? Naming, size, side effects, abstraction level.★Clean Code Principles
CC-02SOLID in Go: which principles translate directly and which change shape?★★SOLID in Go
CC-03Strategy, decorator, adapter: one Go example of each in a payment service.★★Design Patterns That Matter
CC-04Name five code smells and the refactoring for each.★Code Smells & Refactoring
CC-05Test pyramid vs testing trophy; where do contract tests fit between services?★★Testing Strategy
CC-06Test code that depends on time, randomness or an external payment provider.★★Testing Strategy
CC-07What do you check when reviewing a change that moves money?★★Code Review & Engineering Standards
CC-08Introduce engineering standards across six teams without slowing them down.★★★Code Review & Engineering Standards

AI & LLM systems​

AI & LLM systems (15 questions)
IDQuestionLevelRead
AI-01Explain tokens, the context window and temperature, and how each affects cost, latency and reliability.★LLM Fundamentals
AI-02Prompting, RAG or fine-tuning for a bank's internal policy assistant? Justify the choice.★★LLM Fundamentals
AI-03How do you make LLM output safe to parse and act on in a Go service?★★Prompt Engineering & Structured Output
AI-04Design retrieval for a RAG assistant over 50,000 policy documents with per-role access control.★★★RAG & Vector Search
AI-05pgvector or a dedicated vector database? What drives the choice?★★RAG & Vector Search
AI-06Workflow or agent? Give an e-commerce example of each and the trade-off.★★Agents, Tool Use & MCP
AI-07What is MCP, and what are the risks of connecting an agent to internal systems?★★Agents, Tool Use & MCP
AI-08What does an LLM gateway do? How do you keep LLM cost and latency under control during a flash sale?★★★LLM Application Architecture
AI-09How do you know a prompt or model change did not make your assistant worse?★★Evaluating & Observing LLM Systems
AI-10Explain indirect prompt injection with a banking example, and the defences that actually work.★★★LLM Security, Privacy & Governance
AI-11Design an AI assistant in a bank app that explains transactions and opens card disputes.★★★Case Study: AI Banking Assistant
AI-12Walk through how you take a feature from requirement to production with AI coding agents.★★AI-Assisted Development Lifecycle
AI-13How do you stop AI-written tests from simply mirroring the implementation?★★TDD & Testing with AI
AI-14Which review and CI guardrails do you add when much of the code is AI-generated?★★Reviewing AI Code & CI Guardrails
AI-15Introduce AI coding tools in a bank's engineering org. How do you measure whether it worked?★★★Big Tech Practices & Team Adoption

Behavioral​

Behavioral (12 questions)
IDQuestionLevelRead
BH-01Tell me about a time you disagreed with a technical decision. What happened?★★Behavioral Stories
BH-02Describe a production incident you led from detection to post-mortem.★★Behavioral Stories
BH-03Describe a legacy migration you planned. How did you de-risk the cut-over?★★★Behavioral Stories
BH-04How did you get stakeholders to accept a design they initially opposed?★★Behavioral Stories
BH-05Tell me about a trade-off you made under deadline pressure. Would you make it again?★★Behavioral Stories
BH-06How have you mentored an engineer into a more senior role?★Behavioral Stories
BH-07Describe a security or compliance issue you raised. What did it cost to fix?★★Behavioral Stories
BH-08Tell me about a time you reduced infrastructure or vendor cost significantly.★★Behavioral Stories
BH-09Describe a decision of yours that turned out wrong.★★Behavioral Stories
BH-10Explain a complex technical risk to a non-technical executive.★★Role of the Architect
BH-11A team keeps ignoring the architecture guidelines. What do you do?★★★Role of the Architect
BH-12Why do you want to be an architect, and why here?★SA Interview Guide

Practice sets​

SetQuestionsWhen
Fundamentals warm-upSD-01, SD-03, SD-04, SD-12, DS-01, DS-15, DB-01, DB-08, NW-09, OS-01, GO-07, CC-01Month 1–2, one set per week
Bank SADS-08, DS-10, DS-11, AR-14, AR-15, BK-01, BK-03, BK-05, BK-07, BK-08, BK-11, DB-05, DB-06, BH-07Two weeks before a bank interview
E-commerce System ArchitectSD-05, SD-07, SD-09, SD-18, DS-09, AR-04, AR-09, EC-05, EC-06, EC-07, EC-10, DB-10, NW-08, GO-09Two weeks before an e-commerce interview
Architect depthDS-02, DS-12, DS-13, AR-02, AR-08, AR-10, AR-16, DB-13, DB-15, OS-05, BH-03, BH-11Month 5–6 and onward
AI-era architectAI-02, AI-04, AI-08, AI-10, AI-11, AI-12, AI-15Month 5–6, or before any role that mentions AI/LLM

Combine with timed full designs from the Mock Interview Checklist.

Self-check: sample strong answers​

DS-11 — Make a payment API idempotent.

The client sends an Idempotency-Key per logical payment. The server stores (merchant, key) → request hash, status, response in the same database as the payment, inserting the key with a unique constraint in the same transaction that creates the payment intent. A concurrent duplicate hits the unique constraint and waits for or returns the first result; a later duplicate returns the stored response; a duplicate with a different body is rejected (422). Keys expire after a defined window (e.g. 24–72 h). The trade-off: an extra write per request and a retention policy; the alternative — dedup in Redis only — can lose keys on failover and double-charge.

DB-05 — Prevent lost updates on a balance.

Three options. (1) Atomic conditional update: UPDATE accounts SET balance = balance - 100 WHERE id = 1 AND balance >= 100 — simplest, no read-modify-write race. (2) Pessimistic: SELECT … FOR UPDATE then update in one transaction — needed when business logic between read and write is complex; lock accounts in a consistent order to avoid deadlocks. (3) Optimistic: a version column, UPDATE … WHERE version = 7, retry on zero rows — good under low contention, bad for hot accounts. In a real ledger you append entries and derive balances, but the same concurrency control applies to the balance row you check.

AR-04 — Modular monolith vs microservices for a 10-person lending team.

Start with a modular monolith: one deployable with strict module boundaries (loan application, underwriting, disbursement, repayment), separate schemas per module and in-process interfaces. Ten people cannot run a dozen services with their own on-call, pipelines and data consistency problems, and a lending product's main risks are domain correctness and compliance, not independent scaling. Draw module seams so a part with a different scaling or release cadence — e.g. a scoring engine calling external bureaus — can be extracted later. Revisit when teams grow past two or three, or when deployment coupling becomes the bottleneck.

Finished this page?

Do the self-check first. Marking it complete schedules spaced reviews (1, 3, 7, 14, 30… days).