Which of the following best describes the main goal of database decomposition in a microservices architecture?
Think about how microservices aim to be independent and scalable.
Database decomposition means breaking a big database into smaller parts owned by each microservice. This reduces dependencies and helps each service scale independently.
You have a monolithic e-commerce database with tables for users, orders, products, and payments. Which decomposition strategy best fits splitting this database for microservices?
Think about how microservices align with business functions.
Decomposing by business capability aligns each microservice with a specific domain, making services independent and easier to maintain.
After decomposing a monolithic database into multiple microservice databases, which challenge is most likely to arise when services need to perform transactions involving multiple databases?
Consider the difficulty of keeping data consistent when it is spread across services.
Distributed transactions are hard to manage in microservices. Ensuring consistency without them is a key challenge after decomposition.
What is a common tradeoff when choosing to decompose databases by business capability in microservices?
Think about what happens when data is split but services still need to work together.
Decomposing by business capability improves independence but makes data consistency and queries across services more complex.
You have decomposed a monolithic database into three microservice databases: UserDB, OrderDB, and ProductDB. UserDB handles 1000 requests/sec, OrderDB 500 requests/sec, and ProductDB 2000 requests/sec. If each request reads 5 KB on average, what is the total read throughput in MB/sec across all databases?
Calculate total requests per second multiplied by average data size, then convert KB to MB.
Total requests = 1000 + 500 + 2000 = 3500 req/sec. Each request reads 5 KB, so total KB/sec = 3500 * 5 = 17500 KB/sec. Convert to MB/sec: 17500 / 1024 ≈ 17.1 MB/sec, rounded to 17.5 MB/sec.