Grokking Microservices for System Design Interviews

0% completed

Database per Service

1. The Rule

Database per service means each service keeps its data store private. The owning service is the only reader and the only writer of its own tables. Every other service that wants that data goes through the owner's API or consumes its events.

"Database" here means ownership, not necessarily hardware. Separate schemas on shared infrastructure qualify, as long as no service touches another's tables. A schema is the set of tables and columns that hold a service's data.

The rule sounds like bookkeeping. It is actually the property that makes services real.

Here is why

.....

.....

.....

Like the course? Get enrolled and start learning!