| Users | System Complexity | Team Size | Deployment Frequency | Service Boundaries |
|---|---|---|---|---|
| 100 users | Simple, monolith works well | Small (1-5) | Low to medium | Not needed |
| 10,000 users | Growing complexity, some modularity | Medium (5-20) | Medium | Consider splitting key modules |
| 1,000,000 users | High complexity, many features | Large (20+) | High, frequent releases | Microservices beneficial |
| 100,000,000 users | Very high complexity, global scale | Very large, multiple orgs | Continuous delivery | Microservices essential for scale |
When to use microservices (and when not to) - Scalability & System Analysis
Start learning this pattern below
Jump into concepts and practice - no test required
At small scale, the main bottleneck is development speed and coordination. A monolith is easier to manage.
As users and features grow, the codebase becomes large and hard to maintain. Teams slow down due to dependencies.
The first bottleneck is the development and deployment velocity caused by tightly coupled code and shared databases.
Microservices help by splitting the system into smaller, independent parts owned by small teams.
- Use microservices when:
- System complexity is high with many features.
- Multiple teams need to work independently.
- Frequent, independent deployments are required.
- Different parts of the system have different scaling needs.
- Technology diversity is beneficial (different languages/databases per service).
- Do NOT use microservices when:
- System is small or simple.
- Team size is small and communication is easy.
- Operational overhead of microservices is too high.
- Latency between services would hurt user experience.
- Strong consistency and transactions across services are critical and complex.
At 1,000 users, a single server and database handle ~100-500 requests per second easily.
At 10,000 users, requests grow to ~1,000-5,000 QPS; a monolith with caching can still work.
At 1,000,000 users, requests can reach ~100,000 QPS; a single database struggles with this load.
Microservices allow splitting load across multiple databases and servers, reducing bottlenecks.
Operational costs increase due to multiple deployments, monitoring, and network overhead.
Start by describing the current system scale and team size.
Explain the pain points: slow deployments, tight coupling, scaling issues.
Identify the first bottleneck: development velocity or database load.
Propose microservices only if complexity and team size justify it.
Discuss trade-offs: operational overhead vs. independent scaling.
Your database handles 1000 QPS. Traffic grows 10x to 10,000 QPS. What do you do first?
Answer: Add read replicas and caching to reduce database load before splitting into microservices.
Practice
Solution
Step 1: Understand microservices purpose
Microservices are designed for complex apps where parts can scale or update independently.Step 2: Match scenario to microservices benefits
A large app needing flexibility and scaling fits microservices well; small or simple apps do not.Final Answer:
A large, complex application requiring independent scaling of components -> Option AQuick Check:
Complex app = microservices [OK]
- Choosing microservices for small or simple apps
- Ignoring team size and management overhead
- Assuming microservices always improve performance
Solution
Step 1: Identify when microservices are unnecessary
Microservices add complexity and overhead, so small simple apps don't benefit.Step 2: Evaluate options
Options A, B, and D are reasons to use microservices, not avoid them.Final Answer:
The application is very small and simple -> Option BQuick Check:
Small app = avoid microservices [OK]
- Confusing scaling needs as a reason to avoid microservices
- Ignoring complexity added by microservices
- Assuming microservices fit all team sizes
Solution
Step 1: Calculate developer needs
5 services x 2 developers each = 10 developers needed.Step 2: Compare with available team size
Only 6 developers are available, which is less than 10, causing resource strain.Final Answer:
The team will struggle due to insufficient resources for each service -> Option CQuick Check:
Dev shortage = struggle managing microservices [OK]
- Assuming microservices scale developer needs automatically
- Ignoring team size constraints
- Thinking services merge automatically without effort
Solution
Step 1: Analyze the problem context
Small apps converted to microservices often face complexity in communication and deployment.Step 2: Identify the cause
Deployment failures and communication errors usually come from underestimating microservices management overhead.Final Answer:
They underestimated the complexity of managing microservices -> Option DQuick Check:
Underestimating complexity = deployment issues [OK]
- Blaming microservices for deployment automation lack
- Assuming more developers cause deployment errors
- Thinking large apps cause these specific errors
Solution
Step 1: Consider team size and app complexity
A small team benefits from simpler monolithic design to reduce overhead and speed development.Step 2: Plan for future growth
Starting monolithic allows easier initial development; microservices can be adopted later if scaling is needed.Final Answer:
Start with a monolith to reduce complexity and switch later if needed -> Option AQuick Check:
Small team = start monolith [OK]
- Choosing microservices too early for small teams
- Confusing static websites with microservices use
- Ignoring future scalability planning
