Loading…
Scale, consistency, messaging, sagas, consensus
Distributed systems questions test how you reason about failure, latency, consistency, and coordination at scale. This hub bundles system-design fundamentals, microservices patterns, and event-driven messaging so you can cover the whole surface — CAP and quorum, sagas and idempotency, Kafka and message ordering, circuit breakers and back-pressure — with interview-ready answers and real scenarios.
How to use this hub
3 modules cover distributed systems end-to-end. Open the first module, use Open question 1 on its landing page, and use Next at the bottom of each answer to stay in order.
Revision sheet
~12 min · 5 sections · save as PDF
System design interview questions are the differentiator for senior and staff Java backend roles — capacity estimation, the building blocks (load balancers, caches, queues, databases, CDNs), data partitioning, replication and consistency, rate limiting, idempotency at scale, designing for high availability, and the trade-offs that show up in every system-design round (latency vs throughput, consistency vs availability). This page covers the fundamentals; for full case studies (URL shortener, Twitter feed, distributed cache) see the System Design Problems page.
Always answer in 5 steps — never skip a step.
Cite CAP + PACELC when consistency is on the line.
The interview surface for this module breaks into these focus areas:
"At
I'd start with a load balancer in front of stateless app servers, a primary DB with read replicas, Redis for hot reads, Kafka for async work. The bottleneck will be — the deep dive lives there."
Revision sheet
~12 min · 5 sections · save as PDF
Microservices interview questions test architectural judgement, not just framework knowledge — service decomposition, API gateway patterns, service discovery, client- vs server-side load balancing, circuit breaker / retry / bulkhead / time limiter (Resilience4j), saga and outbox patterns, distributed tracing (correlation IDs, OpenTelemetry, Zipkin), config management (Spring Cloud Config), service mesh (sidecars, Istio basics), and the migration patterns from monolith to microservices (strangler fig). Pair this with the REST API and Messaging/Kafka pages for the full microservices interview surface.
Microservices = independent deployability + bounded contexts, paid for in operational complexity.
The interview surface for this module breaks into these focus areas:
"I'd start with a modular monolith, split out the service when
appears, communicate sync via and async via with the outbox pattern, wrap calls in Resilience4j circuit-breakers, and stand up tracing on day one."
Revision sheet
~12 min · 5 sections · save as PDF
Kafka and event-driven architecture interview questions cover the messaging system that powers most modern Java backends — Kafka architecture (brokers, topics, partitions, consumer groups, ISR), delivery semantics (at-most-once, at-least-once, exactly-once), idempotent consumers, the outbox pattern, schema evolution, Kafka Streams vs Flink vs Spark Streaming, the saga pattern with choreography, CQRS and event sourcing, and Spring Kafka / Spring Cloud Stream. For RabbitMQ-specific questions (exchange types, routing, DLX), see the dedicated RabbitMQ page.
Three big questions for any event system:
Kafka = log; RabbitMQ = router; SQS = simple queue. Pick by fit-for-purpose, not hype.
The interview surface for this module breaks into these focus areas:
"I'd publish events via the outbox so the DB write and broker write are atomic, partition the topic by
for ordering, run consumers as idempotent (`UPSERT` keyed by event id), and watch for consumer-lag + rebalance frequency in observability."