Microservices Interview Prep
5 min read Quiz at the end
Microservices interview: saga, circuit breaker, CQRS, service mesh, outbox, distributed tracing, bulkhead.
Microservices Interview Topics
- Microservices vs Monolith -- monolith simpler to start; microservices for independent scaling and deployment
- Database per service -- no shared DB; services own their data; enables independent schema evolution
- Saga pattern -- distributed transactions with compensating rollbacks; choreography vs orchestration
- Circuit breaker -- CLOSED/OPEN/HALF-OPEN; stops cascading failures after N consecutive failures
- Outbox pattern -- write event to DB in same transaction; worker publishes reliably to Kafka
- CQRS -- separate read and write models for independent optimisation and scaling
- Service mesh -- sidecar (Envoy) handles mTLS, retries, tracing without code changes
- Strangler Fig -- extract services from monolith incrementally via gateway routing
- Bulkhead -- isolate thread pools; slow service cannot consume all shared resources
- Four Golden Signals -- latency, traffic, errors, saturation; monitor per service