0
0
Microservicessystem_design~20 mins

Anti-patterns (distributed monolith, chatty services) in Microservices - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Anti-patterns Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Identifying a Distributed Monolith

Which of the following best describes a distributed monolith in a microservices architecture?

AA system where each microservice is fully independent and communicates only via asynchronous events.
BA system where services are tightly coupled and require synchronous calls, causing deployment and scaling challenges.
CA monolithic application running on a single server without any service boundaries.
DA system where microservices use a shared database but have independent deployment cycles.
Attempts:
2 left
💡 Hint

Think about coupling and communication patterns that make microservices behave like a single unit.

Architecture
intermediate
2:00remaining
Reducing Chatty Service Calls

You have a microservices system where Service A calls Service B, which then calls Service C, causing high latency due to many synchronous calls. Which architectural change best reduces this chatty service problem?

ACombine Services B and C into a single service to reduce inter-service calls.
BAdd more synchronous calls between Service A and Service C to balance the load.
CUse a shared database for all services to avoid service-to-service communication.
DIncrease the timeout values for all service calls to handle latency better.
Attempts:
2 left
💡 Hint

Think about reducing the number of calls by merging tightly coupled services.

scaling
advanced
2:00remaining
Scaling Challenges in Distributed Monoliths

In a distributed monolith, what is the main challenge when trying to scale individual microservices independently?

AServices share a database schema, so scaling one service requires scaling the entire database, limiting independent scaling.
BServices communicate only via asynchronous messaging, which simplifies scaling.
CEach service has its own database, so scaling one service does not affect others.
DMicroservices are stateless, so scaling is automatic and independent.
Attempts:
2 left
💡 Hint

Consider how shared resources affect scaling.

tradeoff
advanced
2:00remaining
Tradeoffs of Reducing Chatty Services

What is a common tradeoff when reducing chatty service calls by merging multiple microservices into one?

ASimpler database schema but more complex inter-service communication.
BIncreased network latency but better fault isolation.
CImproved performance but reduced service autonomy and harder independent deployment.
DBetter scalability but increased risk of data inconsistency.
Attempts:
2 left
💡 Hint

Think about what merging services affects besides communication.

estimation
expert
2:00remaining
Estimating Impact of Chatty Services on Latency

Consider a microservices system where each synchronous call adds 50ms latency. Service A calls Service B, which calls Service C, which calls Service D sequentially. What is the total added latency due to these calls?

A200ms
B50ms
C100ms
D150ms
Attempts:
2 left
💡 Hint

Count the number of calls and multiply by latency per call.