| Users | Service Count | Data Volume | Traffic Pattern | Infrastructure |
|---|---|---|---|---|
| 100 users | Few (5-10) | Low (MBs) | Low, simple calls | Single server or small cluster |
| 10K users | 10-20 | GBs | Moderate, some spikes | Multiple servers, basic load balancing |
| 1M users | 20-50 | TBs | High, unpredictable spikes | Multiple clusters, service discovery, caching |
| 100M users | 50+ | Petabytes | Very high, global distribution | Multi-region clusters, advanced orchestration, CDNs |
Why case studies illustrate practical decisions in Microservices - Scalability Evidence
Start learning this pattern below
Jump into concepts and practice - no test required
As microservices grow, the first bottleneck is managing communication between services. Network latency and data consistency issues arise because many small services must coordinate. This slows down response times and complicates debugging.
- Service Mesh: Adds a dedicated layer to handle service communication, retries, and security.
- API Gateway: Centralizes requests to reduce complexity for clients.
- Event-Driven Architecture: Uses asynchronous messaging to decouple services and improve scalability.
- Database Sharding: Splits data across multiple databases to reduce load.
- Horizontal Scaling: Add more instances of services behind load balancers.
- Caching: Use distributed caches to reduce database hits.
- Monitoring and Tracing: Implement tools to track requests across services for debugging and optimization.
At 1M users, assuming 10 requests per user per minute, that is about 166,000 requests per second (RPS). Each microservice instance can handle roughly 1000-5000 RPS, so hundreds of instances are needed.
Data storage grows to terabytes, requiring distributed databases and sharding.
Network bandwidth must support high inter-service communication; 1 Gbps links may saturate quickly, requiring multiple network interfaces or cloud bandwidth scaling.
Start by describing the system at a small scale. Then explain what changes as users grow. Identify the first bottleneck clearly. Propose targeted solutions matching the bottleneck. Use real examples or case studies to show practical decisions. Finally, discuss trade-offs and costs.
Your database handles 1000 QPS. Traffic grows 10x. What do you do first?
Answer: Add read replicas and implement caching to reduce load on the primary database before considering sharding or more complex solutions.
Practice
Solution
Step 1: Understand the role of case studies
Case studies present real examples of how systems were designed and the decisions made.Step 2: Identify the benefit of practical decisions
They reveal trade-offs and challenges faced, helping learners understand practical impacts.Final Answer:
They show real-world decisions and trade-offs made in actual systems. -> Option AQuick Check:
Real-world examples = D [OK]
- Thinking case studies only provide code
- Assuming case studies are purely theoretical
- Believing case studies guarantee perfect designs
Solution
Step 1: Identify practical decisions in case studies
Case studies often show technology choices based on system needs like load and data.Step 2: Evaluate options for realistic decisions
Choosing a database based on load and data type is a practical, common decision.Final Answer:
Choosing a database technology based on expected load and data type. -> Option BQuick Check:
Tech choice by needs = B [OK]
- Assuming all services must use same language
- Ignoring network latency effects
- Thinking single server deployment is best practice
Solution
Step 1: Understand the goal of splitting services
Splitting services usually aims to isolate parts that need different scaling or resources.Step 2: Analyze options for scalability improvement
Isolating resource-heavy functions allows scaling only those parts, improving efficiency.Final Answer:
To isolate resource-heavy functions for better scaling. -> Option AQuick Check:
Splitting for scaling = A [OK]
- Thinking splitting reduces total services
- Believing splitting makes deployment slower intentionally
- Combining unrelated functions is not a splitting reason
Solution
Step 1: Identify the problem with synchronous communication
Synchronous calls cause services to wait, increasing delays and reducing performance.Step 2: Find the practical solution from case studies
Switching to asynchronous communication allows services to work independently, reducing delays.Final Answer:
Switch to asynchronous communication to reduce waiting times. -> Option DQuick Check:
Async communication reduces delays = C [OK]
- Increasing synchronous calls worsens delays
- Combining services loses microservices benefits
- Ignoring delays harms user experience
Solution
Step 1: Understand the impact of a shared database
Shared databases create tight coupling, making services dependent on each other's data schemas.Step 2: Analyze benefits of separate databases per service
Separate databases improve independence, allowing services to evolve without affecting others.Final Answer:
To improve service independence and reduce coupling. -> Option CQuick Check:
Separate DBs reduce coupling = A [OK]
- Thinking separate DBs increase complexity negatively
- Assuming shared DB forces same schema is good
- Believing separate DBs reduce number of databases
