Microservices Interview Questions
Service decomposition & bounded contexts, inter-service communication, API gateways & service discovery, the Saga, CQRS and event-sourcing patterns, service meshes, resilience patterns (circuit breaker, bulkhead), distributed tracing and contract testing.
61 questions
Popular Searches
1. What are microservices and what problems do they solve compared to a monolith?
easyArchitecture Fundamentals 6 mins2. What is the difference between a monolithic and a microservices architecture?
mediumArchitecture Fundamentals 7 mins3. What is service decomposition and how do you decide service boundaries?
hardDesign & Decomposition 8 mins4. What is a bounded context in domain-driven design and how does it map to microservices?
mediumDomain-Driven Design 7 mins5. How do microservices communicate with each other (synchronous vs asynchronous)?
mediumService Communication 7 mins6. What is the difference between REST, gRPC, and message queues for service communication?
hardService Communication 8 mins7. What is an API gateway and what role does it play in microservices?
mediumCommunication 6 mins8. What is service discovery and how do client-side and server-side discovery differ?
mediumCommunication 7 mins9. What is the database-per-service pattern and why is shared database an anti-pattern?
hardData Management 8 mins10. What is the Saga pattern and how does it manage distributed transactions?
hardDistributed Transactions 7 mins11. What is the difference between orchestration and choreography in sagas?
mediumDistributed Transactions 6 mins12. What is eventual consistency and how do microservices handle it?
mediumData Consistency 6 mins13. What is the CAP theorem and how does it apply to microservices?
mediumDistributed Systems 6 mins14. What is the Circuit Breaker pattern and how does it improve resilience?
mediumResilience Patterns 6 mins15. What is the Bulkhead pattern and how does it isolate failures?
mediumResilience Patterns 6 mins16. What is a service mesh and how does it differ from an API gateway?
mediumNetworking 7 mins17. What is the difference between Istio and Linkerd as service meshes?
hardService Mesh 8 mins18. How do you handle distributed tracing and observability in microservices?
mediumObservability 7 mins19. What is the difference between centralized and distributed logging in microservices?
mediumObservability 6 mins20. How do you handle authentication and authorization across microservices?
hardSecurity 7 mins21. What is the difference between JWT and opaque tokens in a microservices context?
mediumSecurity 6 mins22. What is the Strangler Fig pattern for migrating a monolith to microservices?
mediumMigration Patterns 6 mins23. What is the CQRS pattern and when should you use it?
mediumArchitecture Patterns 6 mins24. What is event sourcing and how does it relate to microservices?
hardArchitecture Patterns 7 mins25. How do you handle configuration management across microservices?
mediumConfiguration 6 mins26. What is the sidecar pattern and how is it used in microservices?
mediumDesign Patterns 6 mins27. How do you version microservice APIs without breaking consumers?
hardAPI Design 7 mins28. How do you test microservices (unit, contract, integration, end-to-end)?
mediumTesting 7 mins29. What is contract testing and how does consumer-driven contract testing work?
mediumTesting 7 mins30. What are common microservices anti-patterns and best practices?
hardArchitecture 8 mins31. How do you make a microservice endpoint idempotent, and why is exactly-once delivery a myth?
hardReliability & Messaging 9 mins32. How do you set timeouts and retry policies so a slow dependency does not cascade into an outage?
hardResilience & Operations 10 mins33. How do you run a zero-downtime database schema migration for a microservice?
hardData & Deployment 10 mins34. How do you evolve an event schema without breaking downstream consumers?
hardEvent-Driven Architecture 9 mins35. How do you preserve message ordering while still scaling consumers horizontally?
hardEvent-Driven Architecture 10 mins36. How do you handle a poison message, and what belongs in a dead-letter queue?
mediumReliability & Messaging 9 mins37. Why do rolling deploys still drop requests, and how do graceful shutdown and health probes fix it?
hardResilience & Operations 10 mins38. How do you apply rate limiting and backpressure so an overloaded service degrades instead of collapsing?
hardResilience & Operations 10 mins39. How do you establish workload identity with mutual TLS, and what breaks when certificates rotate?
hardSecurity 10 mins40. How do you run a canary release for a microservice, and when is blue-green the better choice?
hardData & Deployment 10 mins41. Why does a request that fans out to many services time out even though every service looks fast on average, and how do you debug it?
hardPerformance & Debugging 9 mins42. How do you diagnose and size connection pools when a microservice starts failing with pool acquisition timeouts under load?
hardPerformance & Debugging 9 mins43. Which signal should drive autoscaling for a microservice, and why does CPU-based scaling often fail?
hardScaling & Capacity 9 mins44. How do you keep a shared cache correct across microservices, and how do you stop a cache stampede when a hot key expires?
hardPerformance & Caching 10 mins45. How do you run a scheduled job exactly once across many replicas, and why are distributed locks not a safety guarantee?
hardCoordination & Reliability 10 mins46. How do you use feature flags to separate deployment from release across several microservices, and how do you keep flag debt under control?
mediumDelivery & Operations 9 mins47. What is metric cardinality, and how do you keep microservice observability affordable without losing the ability to debug?
mediumObservability & Cost 9 mins48. How do you detect and break a circular dependency between microservices, and what does a distributed deadlock look like in production?
hardArchitecture & Failure Modes 10 mins49. How does clock skew break microservices, and how do you handle time correctly across services?
hardDistributed Systems Fundamentals 10 mins50. How do you define service level objectives and error budgets for a microservice, and how should they drive alerting?
mediumReliability Engineering 10 mins51. How do you load test a single microservice and turn the results into a capacity plan?
mediumScaling & Capacity 10 mins52. How do you stop one tenant degrading everyone else in a shared multi-tenant microservice?
hardMulti-Tenancy & Isolation 10 mins53. A service writes to its database and then publishes an event. How do you stop those two from drifting apart, and how does the transactional outbox work?
hardDistributed Data 10 mins54. Your consumer deduplicates messages by id. How long do you keep that deduplication state, and what happens when a duplicate arrives after the window has expired?
hardMessaging & Consistency 10 mins55. Two services call each other dozens of times to serve one request. Is that a performance problem or a boundary problem, and how do you fix it?
mediumService Design 9 mins56. Several services share a contract through a common library. How do you evolve that contract when the services deploy independently?
hardService Design 10 mins57. Every service in a four-hop chain retries three times. What load does the bottom service actually see during an incident, and how do you control it?
hardResilience 10 mins58. How do you allocate timeouts across a chain of services so that work stops when the caller has already given up?
hardResilience 10 mins59. A customer reports a failed order. How do you reconstruct what happened across eight services' logs?
mediumObservability 9 mins60. A service needs data owned by another service on almost every request. Do you call it, cache it, or copy it into a read model?
hardDistributed Data 10 mins61. You are asked to design a greenfield system as microservices. When would you argue for a modular monolith instead, and how would you defend it?
mediumArchitecture Decisions 9 mins