0
0
Microservicessystem_design~20 mins

First microservice architecture diagram in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Microservice Architecture Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Architecture
intermediate
2:00remaining
Identify the main components in a simple microservice architecture

Look at a basic microservice architecture diagram with these components: API Gateway, User Service, Order Service, Database, and Message Queue.

Which component handles client requests first?

AUser Service
BAPI Gateway
CDatabase
DMessage Queue
Attempts:
2 left
πŸ’‘ Hint

Think about which part acts as the entry point for all client requests.

❓ scaling
intermediate
2:00remaining
Scaling microservices for high traffic

You have a microservice that handles user profiles. Traffic is increasing rapidly. Which approach best supports scaling this microservice?

ACombine User Service and Order Service into one service
BAdd more CPU cores to the database server
CUse a single instance with more memory
DDeploy multiple instances of the User Service behind a load balancer
Attempts:
2 left
πŸ’‘ Hint

Think about horizontal scaling and distributing load.

❓ tradeoff
advanced
2:00remaining
Choosing between synchronous and asynchronous communication

In a microservice architecture, what is a key tradeoff when choosing asynchronous messaging over synchronous HTTP calls?

AAsynchronous messaging improves system resilience but increases complexity in data consistency
BAsynchronous messaging reduces latency but causes tight coupling between services
CSynchronous HTTP calls improve fault tolerance but reduce throughput
DSynchronous HTTP calls eliminate the need for message brokers
Attempts:
2 left
πŸ’‘ Hint

Consider how asynchronous communication affects system design and data handling.

🧠 Conceptual
advanced
2:00remaining
Understanding service discovery in microservices

What is the main purpose of a service discovery component in a microservice architecture?

ATo store user data securely
BTo balance load between database replicas
CTo allow services to find and communicate with each other dynamically
DTo cache responses for faster access
Attempts:
2 left
πŸ’‘ Hint

Think about how services know where other services are located.

❓ estimation
expert
3:00remaining
Estimating capacity for a microservice handling 10,000 requests per second

You design a microservice expected to handle 10,000 requests per second. Each request takes 50ms CPU time on average. How many instances are needed to handle the load without queuing?

AAt least 500 instances
BAt least 200 instances
CAt least 100 instances
DAt least 50 instances
Attempts:
2 left
πŸ’‘ Hint

Calculate total CPU time per second and divide by CPU time per instance.