Which of the following best describes a distributed monolith in a microservices architecture?
Think about coupling and communication patterns that make microservices behave like a single unit.
A distributed monolith occurs when microservices are tightly coupled, often requiring synchronous communication and shared databases, making them hard to deploy or scale independently.
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?
Think about reducing the number of calls by merging tightly coupled services.
Merging Services B and C reduces the number of synchronous calls, thus lowering latency and avoiding chatty communication.
In a distributed monolith, what is the main challenge when trying to scale individual microservices independently?
Consider how shared resources affect scaling.
When services share a database schema, scaling one service often requires scaling the shared database, limiting independent scaling and causing bottlenecks.
What is a common tradeoff when reducing chatty service calls by merging multiple microservices into one?
Think about what merging services affects besides communication.
Merging services reduces communication overhead but decreases autonomy, making independent deployment and scaling more difficult.
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?
Count the number of calls and multiply by latency per call.
There are 3 synchronous calls (A->B, B->C, C->D). Each call adds 50ms, so total added latency is 3 * 50ms = 150ms.