In a microservices system, what problem does the Circuit Breaker pattern primarily solve?
Think about what happens when one service is down and others keep trying to call it.
The Circuit Breaker pattern stops calls to a failing service to prevent system-wide crashes, handling edge cases of service failure gracefully.
In microservices, which statement best describes how the Saga pattern manages transactions across multiple services?
Think about how to keep data consistent without locking everything at once.
The Saga pattern splits a distributed transaction into smaller steps, each with a compensating action to undo changes if needed, solving edge cases of partial failures.
How does the Bulkhead pattern help microservices handle sudden spikes in traffic without crashing the entire system?
Think about how compartments in a ship prevent sinking if one part is damaged.
Bulkhead isolates resources like threads or connections per service, so if one service is overwhelmed, others continue working, preventing total system failure.
Which statement best describes a common tradeoff when implementing Event Sourcing?
Consider how storing all changes as events affects reading and consistency.
Event Sourcing stores all changes as events, which can speed up writes but makes querying current state and ensuring consistency more complex.
You design a microservices system using CQRS (Command Query Responsibility Segregation). Write requests are 10% of total, queries 90%. If the system expects 10,000 total requests per second, how many write and read requests per second should you plan capacity for?
Calculate 10% and 90% of total requests separately.
With 10% writes and 90% reads out of 10,000 total requests, writes are 1,000 and reads are 9,000 requests per second.