.NET Architecture & System Design Interview Question #104

What are the main differences between a monolith and microservices?

Microservices, API Gateway, Service Communication & Event-Driven Architecture Mid-Level Intermediate

Quick Interview Answer

A monolith has fewer deployment and network boundaries, which usually makes development and operations simpler. Microservices provide stronger deployment independence and can scale business capabilities separately.

Detailed Explanation

A monolith has fewer deployment and network boundaries, which usually makes development and operations simpler. Microservices provide stronger deployment independence and can scale business capabilities separately.

The cost of microservices includes distributed communication, eventual consistency, service discovery, tracing, more deployments, and greater infrastructure requirements. The best choice depends on system scale, team structure, domain boundaries, and operational maturity.

Code Example

Monolith:
one deployment
local calls
simpler operations

Microservices:
many deployments
network calls
independent scaling
higher operational complexity