Microservices Core Architectural Principles 2 — Questions and Answers
Question 1: Which principle best describes how each microservice should be structured around a specific business capability?
- Database centralization
- Domain-driven bounded contexts (Correct answer)
- Shared global state
- Monolithic layering
Correct answer: Domain-driven bounded contexts
Microservices are organized around bounded contexts from domain-driven design, each owning a single business capability.
Question 2: A team wants each service to be independently deployable. What must be avoided?
- Versioned APIs
- Tight compile-time coupling between services (Correct answer)
- Separate CI/CD pipelines
- Independent datastores
Correct answer: Tight compile-time coupling between services
Independent deployability requires loose coupling, so shared compile-time dependencies must be avoided.
Question 3: What is the recommended data ownership model in microservices?
- One shared database for all services
- Database per service (Correct answer)
- No persistence at all
- A single read replica shared by all
Correct answer: Database per service
Each service owns its data privately under the database-per-service pattern to ensure autonomy.
Question 4: Why is a shared database considered an anti-pattern in microservices?
- It improves loose coupling
- It creates hidden coupling and blocks independent evolution (Correct answer)
- It reduces latency to zero
- It enforces bounded contexts
Correct answer: It creates hidden coupling and blocks independent evolution
A shared database couples services through the schema, preventing independent change and deployment.
Question 5: Which characteristic enables a microservice team to choose its own programming language and framework?
- Centralized governance
- Technology heterogeneity / polyglot autonomy (Correct answer)
- Mandatory shared runtime
- Single monorepo build
Correct answer: Technology heterogeneity / polyglot autonomy
Service autonomy allows polyglot technology choices best suited to each service's needs.
Question 6: What does 'smart endpoints and dumb pipes' advocate?
- Putting business logic in the message bus
- Keeping logic in services and using simple transport like HTTP/messaging (Correct answer)
- Centralizing all routing logic in an ESB
- Embedding orchestration in the network
Correct answer: Keeping logic in services and using simple transport like HTTP/messaging
Business logic lives in the services (smart endpoints), while the transport stays simple (dumb pipes).
Question 7: Which trade-off is inherent to adopting a microservices architecture?
- Reduced operational complexity
- Increased distributed-system complexity (Correct answer)
- Elimination of network failures
- Guaranteed strong consistency everywhere
Correct answer: Increased distributed-system complexity
Microservices trade monolithic simplicity for the added complexity of distributed systems.
Which principle best describes how each microservice should be structured around a specific business capability?