| Users | Monolith | Microservices |
|---|---|---|
| 100 users | Single app server handles all logic; simple deployment | Multiple small services; overhead of inter-service calls |
| 10K users | App server CPU/memory stressed; DB load increases; deployment slower | Services can be scaled independently; network latency starts to matter |
| 1M users | Single DB becomes bottleneck; app server overloaded; hard to deploy fast | Services scaled horizontally; DB sharding or replicas per service; complex orchestration |
| 100M users | Monolith likely fails; scaling limited; high downtime risk | Highly scalable; services distributed globally; complex monitoring and tracing needed |
Monolith vs microservices comparison - Scaling Approaches Compared
Start learning this pattern below
Jump into concepts and practice - no test required
For monoliths, the database is usually the first bottleneck because all logic and data access happen in one place, causing heavy load and contention.
For microservices, the network and inter-service communication become bottlenecks as the number of services and calls grow, increasing latency and complexity.
- Monolith: Vertical scaling (bigger servers), database read replicas, caching layers, and eventually splitting into microservices.
- Microservices: Horizontal scaling of individual services, database sharding per service, asynchronous messaging, API gateways, and service mesh for communication management.
At 1M users, assuming 1 request per second per user:
- Requests per second: 1,000,000
- Monolith: Requires very powerful servers and large DB clusters; high risk of downtime.
- Microservices: Distributed load across many smaller servers; network bandwidth and inter-service calls increase costs.
- Storage: Microservices may duplicate some data per service, increasing storage needs.
Start by explaining the differences in architecture and scaling points. Discuss bottlenecks clearly for each approach. Then propose specific scaling solutions matching those bottlenecks. Use real numbers to show understanding of limits.
Your database handles 1000 QPS. Traffic grows 10x. What do you do first?
Answer: Add read replicas to distribute read load and implement caching to reduce DB hits before considering more complex solutions.
Practice
Solution
Step 1: Understand monolithic architecture
A monolithic architecture means all parts of the application are combined into one single unit.Step 2: Compare with other options
Many small independent services communicating over a network describes microservices, C cloud scaling, and D databases, not monoliths.Final Answer:
A single large application where all components are tightly integrated -> Option DQuick Check:
Monolith = single big app [OK]
- Confusing microservices with monolith
- Thinking monolith means cloud scaling
- Mixing database types with architecture
Solution
Step 1: Identify microservice representation
Microservices are shown as multiple small boxes, each representing a service.Step 2: Eliminate incorrect options
A single box labeled 'App' containing all modules shows a monolith, C shows database relation, D is too vague.Final Answer:
Multiple boxes each labeled with a specific service name -> Option AQuick Check:
Microservices = many small boxes [OK]
- Choosing single box for microservices
- Confusing database icons with services
- Ignoring service labels
Solution
Step 1: Understand scaling in monolith vs microservices
Monolith requires scaling the whole app, microservices allow scaling individual services.Step 2: Identify the efficient scaling method
Scaling only the busy microservice is more efficient and flexible than scaling the entire monolith.Final Answer:
Scaling only the specific microservice that handles the busy feature -> Option BQuick Check:
Microservices scale individual parts [OK]
- Thinking monolith scales parts independently
- Confusing database scaling with app scaling
- Ignoring microservice granularity
Solution
Step 1: Identify communication needs in microservices
Microservices communicate over APIs; clear contracts are essential to avoid failures.Step 2: Analyze other options
Using a single database or same server is possible but less likely to cause communication failures; code repo does not affect runtime communication.Final Answer:
They did not implement proper API contracts between services -> Option CQuick Check:
API contracts prevent communication failures [OK]
- Blaming database sharing for communication errors
- Assuming deployment location causes failures
- Confusing code repo structure with runtime issues
Solution
Step 1: Consider team size and speed needs
A small team with rapid changes benefits from simpler, faster development and deployment.Step 2: Evaluate architecture fit
Monolith is simpler to build and deploy quickly; microservices add complexity and overhead not ideal for small teams initially.Final Answer:
Monolith, because it is simpler to develop and deploy quickly -> Option AQuick Check:
Small team + fast changes = monolith [OK]
- Choosing microservices for small teams without need
- Assuming microservices always scale better initially
- Ignoring development speed and team skills
