🏗️ Section 17 · 26 questions

Microservices

26 interview questions and answers in the Microservices section.

Questions in this section

  1. What is Saga Pattern and When to Use It
  2. What is the Difference Between Choreography and Orchestration in Saga
  3. How to Implement Distributed Transactions in Microservices
  4. What are Compensating Transactions
  5. What is Circuit Breaker Pattern
  6. How Does Circuit Breaker Work and What States Does It Have
  7. What is Service Discovery and Why is It Needed
  8. What is the Difference Between Client-Side and Server-Side Discovery
  9. What is API Gateway and What Problems Does It Solve
  10. What is sharding
  11. What is the difference between sharding and partitioning
  12. How to implement horizontal scaling of microservices
  13. What is Database per Service pattern
  14. What problems arise when using shared database
  15. How to organize communication between microservices
  16. What is the difference between synchronous and asynchronous communication
  17. How to ensure fault tolerance of microservices
  18. What is Bulkhead pattern
  19. What is Retry pattern and how to use it correctly
  20. What is exponential backoff
  21. How to monitor a distributed microservices system
  22. What is distributed tracing
  23. How to implement authentication and authorization in microservices
  24. What is Strangler Fig pattern
  25. How to test microservices
  26. What tools are used for microservices orchestration

Study navigator

26 essential questions and deep-dive architectural analyses for Junior 🟢, Middle 🟡, and Senior 🔴 Distributed Systems and Cloud-Native Backend Engineers.


📋 Table of Contents

# Question Difficulty
01 What is Saga Pattern and When to Use It ⭐⭐
02 What is the Difference Between Choreography and Orchestration in Saga ⭐⭐
03 How to Implement Distributed Transactions in Microservices ⭐⭐⭐
04 What are Compensating Transactions ⭐⭐
05 What is Circuit Breaker Pattern ⭐⭐
06 How Does Circuit Breaker Work and What States Does It Have ⭐⭐
07 What is Service Discovery and Why is It Needed ⭐
08 What is the Difference Between Client-Side and Server-Side Discovery ⭐⭐
09 What is API Gateway and What Problems Does It Solve ⭐⭐
10 What is Sharding ⭐⭐
11 What is the Difference Between Sharding and Partitioning ⭐⭐
12 How to Implement Horizontal Scaling of Microservices ⭐⭐
13 What is Database per Service Pattern ⭐⭐
14 What Problems Arise When Using Shared Database ⭐⭐
15 How to Organize Communication Between Microservices ⭐⭐
16 What is the Difference Between Synchronous and Asynchronous Communication ⭐⭐
17 How to Ensure Fault Tolerance of Microservices ⭐⭐⭐
18 What is Bulkhead Pattern ⭐⭐
19 What is Retry Pattern and How to Use It Correctly ⭐⭐
20 What is Exponential Backoff ⭐
21 How to Monitor a Distributed Microservices System ⭐⭐
22 What is Distributed Tracing ⭐⭐
23 How to Implement Authentication and Authorization in Microservices ⭐⭐⭐
24 What is Strangler Fig Pattern ⭐⭐
25 How to Test Microservices ⭐⭐
26 What Tools are Used for Microservices Orchestration ⭐⭐

🗺️ Topic Dependency Map

                    ┌──────────────────────────────────────────┐
                    │      DATA & BOUNDARIES (13-14, 10-11)    │
                    │   13. Database per Service Pattern       │
                    │   14. Shared Database Anti-Pattern       │
                    │   10. Sharding Architectures             │
                    │   11. Sharding vs Relational Partitioning│
                    └──────────────────┬───────────────────────┘
                                       │
            ┌──────────────────────────┼──────────────────────────┐
            ▼                          ▼                          ▼
    ┌───────────────┐        ┌───────────────┐        ┌────────────────────┐
    │ DISTRIBUTED   │        │ ROUTING &     │        │ FAULT TOLERANCE    │
    │ CONSISTENCY   │        │ COMMUNICATION │        │ & RESILIENCE       │
    │ (01-04)       │        │ (07-09, 15-16)│        │ (05-06, 17-20)     │
    │ 01. Saga      │        │ 07-08. Discover│        │ 05-06. CircuitBreak│
    │ 02. Choreo/Orc│        │ 09. API Gateway│        │ 17. Fault Toleranc │
    │ 03. Dist. Tx  │        │ 15. Comm Org  │        │ 18. Bulkhead       │
    │ 04. Comp. Tx  │        │ 16. Sync/Async│        │ 19-20. Retry/Backof│
    └───────┬───────┘        └───────┬───────┘        └────────┬───────────┘
            │                        │                        │
            └────────────────────────┼────────────────────────┘
                                     ▼
                    ┌──────────────────────────────────────────┐
                    │   OBSERVABILITY, SECURITY & OPS (21-26)  │
                    │   12. Horizontal Scaling & Autoscaling   │
                    │   21. Monitoring Stack (Prometheus/Graf) │
                    │   22. Distributed Tracing (OpenTelemetry)│
                    │   23. Auth & AuthZ (OAuth2/JWT Gateway)  │
                    │   24. Strangler Fig Migration Pattern    │
                    │   25. Testing (Pact CDC, Testcontainers) │
                    │   26. Orchestration Engines & Workflows  │
                    └──────────────────────────────────────────┘

🟢 Junior Track (Core Concepts & Fundamentals)

🟡 Middle Track (Resilience Patterns & Distributed Data)

🔴 Senior Track (Distributed Systems Architecture & Scaling)