Microservices Interview Questions & Notes
Key Microservices Concepts
- Microservices vs Monolithic Architecture
- 12-Factor App Principles
- Domain-Driven Design (DDD)
- API Gateway & Load Balancing
- Service Discovery (Eureka, Kubernetes)
- Inter-Service Communication (REST, Messaging)
- Circuit Breaker & Resilience Patterns
- Security (OAuth2, JWT, API Rate Limiting)
- CI/CD & Deployment Strategies
Common Interview Questions
1. What are microservices, and how do they differ from monolithic architecture?
2. What are the key benefits and challenges of microservices?
3. What is Domain-Driven Design (DDD) and why is it important in microservices?
4. How does Spring Cloud Eureka work for service discovery?
5. What is an API Gateway, and why do we use it?
6. Explain synchronous vs. asynchronous communication in microservices.
7. What is Circuit Breaker, and how does Resilience4J help?
8. How does Spring Security handle authentication & authorization in microservices?
9. What is the role of Docker & Kubernetes in microservices?
10. How do you handle distributed logging and monitoring in microservices?
Important Notes & Best Practices
- Keep services loosely coupled and highly cohesive.
- Use API Gateway for security, rate limiting, and authentication.
- Prefer asynchronous communication for better scalability.
- Implement centralized logging & monitoring (ELK, Prometheus, Zipkin).
- Use circuit breakers to prevent cascading failures.
- Follow CI/CD practices for automated testing & deployment.
- Secure microservices using OAuth2, JWT, and RBAC.