What are microservices?
Microservices architecture structures an application as a collection of small, independent services. Each service runs its own process, has its own database, and communicates via APIs.
What is the difference between monolithic and microservices architecture?
Monolithic: single codebase, shared database, deployed as one unit. Microservices: multiple independent services, separate databases, deployed independently. Microservices offer flexibility but add complexity.
What are the benefits of microservices?
Benefits include: independent deployment, technology diversity, fault isolation, easier scaling, team autonomy, and better suited for large complex applications.
What are the challenges of microservices?
Challenges include: distributed system complexity, network latency, data consistency, testing difficulty, deployment overhead, monitoring complexity, and increased operational burden.
What is service discovery?
Service discovery allows services to find and communicate with each other without hard-coded addresses. Tools like Consul, Eureka, or Kubernetes DNS enable dynamic service location.
What is an API Gateway?
An API Gateway is a single entry point for client requests that routes to appropriate microservices. It handles authentication, rate limiting, request routing, and response aggregation.
What is REST API?
REST (Representational State Transfer) is an architectural style using HTTP methods (GET, POST, PUT, DELETE) for stateless communication. It uses resources identified by URLs.
What is GraphQL?
GraphQL is a query language for APIs that lets clients request exactly the data they need. Unlike REST, it uses a single endpoint and allows flexible queries with nested data.
What is gRPC?
gRPC is a high-performance RPC framework using Protocol Buffers for serialization. It supports bidirectional streaming and is faster than REST but less human-readable.
What is the Circuit Breaker pattern?
Circuit Breaker prevents cascading failures by stopping requests to a failing service. It has three states: Closed (normal), Open (failing, reject requests), Half-Open (testing recovery).