Microservices
Microservices Interview Questions – Phase-wise Mapping
By Utility Zone · 2026-01-28T11:27:47.826141
This document maps common microservices interview questions to the learning phases and articles you completed. Use this for interview preparation, revision, and mock interviews.
Phase 1: Microservices Fundamentals
Q1. What are microservices?
- Independently deployable services
- Organized around business capabilities
- Own their data
Q2. Monolith vs Microservices?
- Deployment: Single vs Independent
- Scaling: Whole app vs per service
- Failure isolation
Q3. When should you NOT use microservices?
- Small teams
- Simple applications
- No DevOps maturity
Phase 2: Building Microservices
Q4. What makes a service a microservice?
- Independent deployment
- Own database
- Clear responsibility
Q5. Typical Spring Boot microservice structure?
- Controller
- Service
- Repository
- Configuration
Q6. How do you run multiple microservices locally?
- Different ports
- Separate configs
- Profiles
Phase 3: Communication & Discovery
Q7. How do microservices communicate?
- REST (sync)
- Messaging (async)
Q8. Problems with REST-based communication?
- Tight runtime coupling
- Cascading failures
- Latency
Q9. What is service discovery?
- Dynamic service lookup
- Avoids hardcoded URLs
Q10. How does Eureka work?
- Services register themselves
- Clients discover by service name
Phase 4: API Gateway
Q11. Why do we need an API Gateway?
- Single entry point
- Centralized security
- Routing
Q12. Responsibilities of API Gateway?
- Routing
- Authentication
- Rate limiting
- Logging
Q13. Should business logic be in gateway?
- No
- Only cross-cutting concerns
Phase 5: Configuration & Security
Q14. What is Spring Cloud Config?
- Centralized configuration server
- Externalized configs
- Git-backed
Q15. Why centralized config?
- Avoid duplication
- Easy environment management
Q16. How do you secure microservices?
- JWT
- Gateway-level security
Q17. Why JWT?
- Stateless
- Scalable
- No server session
Phase 6: Data & Transactions
Q18. Why database-per-service?
- Loose coupling
- Independent scaling
- Autonomy
Q19. Can microservices share a database?
- No (anti-pattern)
Q20. Why ACID transactions don’t work in microservices?
- Distributed systems
- No single DB
Q21. What is Saga pattern?
- Sequence of local transactions
- Compensation on failure
Q22. Choreography vs Orchestration?
- Events vs central controller
Phase 7: Event-Driven Architecture
Q23. Sync vs Async communication?
- Blocking vs non-blocking
Q24. What is event-driven architecture?
- Services react to events
- Loose coupling
Q25. Kafka vs RabbitMQ?
- Kafka: streaming
- RabbitMQ: messaging
Q26. What is idempotency?
- Same event processed multiple times safely
Phase 8: Observability & Resilience
Q27. What is observability?
- Ability to understand system state
Q28. Three pillars of observability?
- Logs
- Metrics
- Traces
Q29. What is distributed tracing?
- Track request across services
Q30. What is circuit breaker?
- Prevent cascading failures
Q31. Retry vs Timeout?
- Retry for transient failures
- Timeout prevents hanging calls
Phase 9: Docker & Docker Compose
Q32. Why Docker for microservices?
- Consistency
- Portability
Q33. Docker image vs container?
- Image = blueprint
- Container = running instance
Q34. Why Docker Compose?
- Run multiple services locally
Q35. Why localhost doesn’t work in containers?
- Each container has its own network
Phase 10: Kubernetes & System Design
Q36. Why Kubernetes?
- Auto-scaling
- Self-healing
- Rolling updates
Q37. Pod vs Deployment?
- Pod = single instance
- Deployment = manages replicas
Q38. What is a Kubernetes Service?
- Stable network endpoint
Q39. How do you explain a microservices project end-to-end?
- Gateway
- Services
- DB per service
- Events
- Security
- Deployment
Q40. Common microservices mistakes?
- Overengineering
- Shared DB
- No observability
Final Tip for Interviews
When answering:
- Always explain why, not just what
- Use real-world examples
- Mention trade-offs
You now have a complete microservices interview playbook.