Microservices interview questions
100 Backend Engineering practice questions. Read what a strong answer covers, then practise it out loud against the clock.
Practise Microservices questionsBeginner
- Backward-compatible changes between services
- Choosing the first service to extract
- Conway's law and team ownership
- Correlation IDs across services
- Customers receive duplicate confirmation emails
- Database per service
- Event-driven communication basics
- Eventual consistency between services
- Every feature requires deploying five services together
- Externalised configuration
- Graceful degradation and fallbacks
- Hard to debug a request across services
- Hard-coded service addresses
- How services find each other (service discovery)
- Idempotent message consumers
- Independent deployability
- Liveness vs readiness probes
- Monolith vs microservices
- One slow service slows everything
- Retries with exponential backoff and jitter
- Service crashes when a dependency is not ready
- Should sending a welcome email be a direct call?
- Stateless services
- Synchronous vs asynchronous communication
- The circuit breaker pattern
- The modular monolith
- The twelve-factor app
- Too many tiny services
- Two services share one database
- User does not see their update right away
- What microservices are
- When not to use microservices
- Why timeouts matter between services
- Works in staging, fails in production
Intermediate
- A bad message blocks the queue
- A page makes dozens of internal calls
- A report needs data from four services
- Anti-corruption layer
- API composition vs read models
- Backend for frontend in a microservices setup
- Blue-green and canary deployments
- Bounded contexts for service boundaries
- Canary shows a higher error rate
- Choreography vs orchestration
- Consumers break after an event change
- Defining service boundaries for a new product
- Distributed tracing with OpenTelemetry
- Errors during rolling deployments
- Event published but database update rolled back
- Event sourcing basics
- Events processed out of order
- Evolving event schemas safely
- Local development with many services
- Mobile app makes too many calls per screen
- Moving a table out of a shared database
- One of three dependencies fails
- Payment fails after stock is reserved
- Responsibilities of an API gateway in microservices
- Retry storm after a short outage
- Service mesh
- Should we adopt a service mesh?
- The bulkhead pattern
- The saga pattern
- The sidecar pattern
- The strangler fig pattern
- The transactional outbox pattern
- Timeouts in a call chain don't line up
Experienced
- Active-active microservices across regions
- Cascading failure across many services
- Cell-based architecture for microservices
- Change data capture for service integration
- Compensation fails halfway through a saga
- Duplicate events after a CDC connector restart
- Durable workflow engines
- Event notification vs event-carried state transfer
- Event-sourced entities get slow to load
- High p99 latency with fan-out
- How dependencies affect availability
- Keeping the ledger consistent with a payment provider
- Merging services back together
- One large customer degrades service for everyone
- Outbox relay falls behind
- Ownership and on-call for 100 services
- Planning a multi-year monolith migration
- Platform engineering for microservices
- Preventing overselling across services
- Priority-based load shedding across services
- Protecting business invariants without distributed transactions
- Read-your-writes across services
- Region failover overwhelms the remaining region
- Replaying events to repair corrupted data
- Retry amplification across layers
- Rolling out a breaking change to 40 internal consumers
- Rolling out mTLS without downtime
- Shared libraries vs duplication
- Shared library forces lockstep upgrades
- The myth of exactly-once delivery
- User service is a bottleneck for everyone
- Verifying a new service before cutover
- Workflow waiting days for human approval