| Users / Traffic | Service Count | Deployment Complexity | Data Management | Communication | Monitoring & Logging |
|---|---|---|---|---|---|
| 100 users | Few (5-10) | Simple, manual deploys | Single DB or shared DB | Simple REST calls | Basic logs, manual checks |
| 10,000 users | Moderate (20-50) | Automated CI/CD pipelines | Database per service starts | REST + message queues | Centralized logging, alerts |
| 1,000,000 users | Many (100+) | Fully automated, container orchestration | Polyglot persistence, sharding | Asynchronous messaging, event-driven | Distributed tracing, metrics dashboards |
| 100,000,000 users | Hundreds to thousands | Multi-cluster, multi-region deployments | Data partitioning, CQRS, event sourcing | High-throughput event buses, service mesh | AI-driven monitoring, anomaly detection |
Microservices characteristics - Scalability & System Analysis
Start learning this pattern below
Jump into concepts and practice - no test required
At small scale, the first bottleneck is often service communication latency because many microservices call each other synchronously, causing delays.
As users grow, database scaling becomes the bottleneck since each service may have its own database increasing load and complexity.
At large scale, deployment and operational complexity breaks first due to managing many services, versions, and dependencies.
- Horizontal scaling: Add more instances of services behind load balancers.
- Service decomposition: Split large services into smaller focused ones.
- Asynchronous communication: Use message queues and event buses to reduce latency.
- Database per service: Isolate data to reduce contention and enable independent scaling.
- Container orchestration: Use Kubernetes or similar to automate deployment and scaling.
- Service mesh: Manage service-to-service communication, retries, and security.
- Centralized monitoring: Implement distributed tracing and metrics aggregation.
Assuming 1 million users generating 10 requests per second each, total requests = 10 million RPS.
Each service instance handles ~2000 RPS, so need ~5000 instances distributed across services.
Database load is split; each DB handles ~5000 RPS, so need many DB shards or replicas.
Network bandwidth must support inter-service calls; estimate 1 Gbps per 1000 instances.
Storage grows with data per service; consider tiered storage and archiving.
Start by explaining microservices basics: independent deployability, decentralized data, and communication patterns.
Discuss scaling challenges at different user levels and identify the first bottleneck clearly.
Propose targeted solutions like asynchronous messaging and container orchestration.
Use real numbers to justify your scaling approach and show awareness of operational complexity.
Your database handles 1000 QPS. Traffic grows 10x to 10,000 QPS. What do you do first?
Answer: Add read replicas and implement caching to reduce direct DB load before considering sharding or redesign.
Practice
Solution
Step 1: Understand microservices independence
Microservices are designed to be independent units that can be deployed and scaled separately.Step 2: Evaluate options against microservices principles
Sharing a single database or requiring the same language contradicts microservices flexibility. Monolithic deployment is opposite to microservices.Final Answer:
Each service is independently deployable and scalable -> Option CQuick Check:
Independent deployability = C [OK]
- Thinking all services share one database
- Assuming same language is mandatory
- Confusing microservices with monolith
Solution
Step 1: Identify microservice scope
Microservices are designed to focus on a single business capability or function.Step 2: Check options for correctness
Handling multiple unrelated functions or all UI logic is against microservices principles. Communication between services is common and necessary.Final Answer:
A microservice focuses on a single business capability -> Option AQuick Check:
Single responsibility = A [OK]
- Thinking microservices do many unrelated tasks
- Believing microservices handle all UI logic
- Ignoring inter-service communication
Solution
Step 1: Understand failure handling in microservices
Microservices use timeouts and fallbacks to avoid waiting indefinitely when a service fails.Step 2: Analyze options for expected behavior
Waiting indefinitely is bad design. Service C retrying is unrelated to Service B failure. Automatic restart is not immediate failure handling.Final Answer:
Service A receives an error or fallback response quickly -> Option AQuick Check:
Timeouts and fallbacks = D [OK]
- Assuming infinite wait on failure
- Confusing retry logic location
- Expecting automatic restart as immediate fix
Solution
Step 1: Understand database ownership in microservices
Each microservice should own its own database to avoid tight coupling.Step 2: Evaluate the impact of shared schema
Sharing schema creates tight coupling, reducing independence and flexibility. It does not improve independence or simplify deployment.Final Answer:
It creates tight coupling between services -> Option BQuick Check:
Shared DB = tight coupling = A [OK]
- Thinking shared DB improves independence
- Assuming shared DB reduces consistency
- Believing shared DB simplifies deployment
Solution
Step 1: Identify microservices best practices for scaling
Independent services with own databases and APIs allow separate scaling and deployment.Step 2: Compare options for independence and scalability
Combining services or modules reduces independence. Monolith prevents separate scaling.Final Answer:
Separate payment and catalog into distinct services with own databases and APIs -> Option DQuick Check:
Separate services + DBs = B [OK]
- Combining unrelated services
- Using monolith for microservices goals
- Deploying modules inside one service
