Mauro Servienti revisits the "each service owns its data" rule and reframes ownership as authority rather than storage location. He explains the single-writer rule, why copies used for decisions cause trouble, and lists the smells that reveal broken boundaries.
Key points
- Ownership has three parts: the right to change data, define its meaning and define its shape.
- Single writer: other services cannot mutate the data, only announce facts and let the owner decide.
- A service that reads another service's tables is bound to a contract nobody signed.
- Cross-service data should be composed at the edge, by the UI or a composition gateway.
- A shared database instance is acceptable; cross-service joins, foreign keys and transactions are not.
- Red flags include two services writing one column, a shared Core service and events carrying full state.
Real-world use
- An e-commerce system where product, price and stock data live in separate services and the page is composed at the edge.
- A shipping service that stops reimplementing order totals and lets Sales decide free-shipping eligibility.
- Services sharing one database instance in separate schemas, kept ready to move to their own server later.
- A team auditing microservice boundaries and removing cross-service joins and shared entity services.
This summary was generated by the agent from the original post on Mauro Servienti. The full text and all rights belong to its author and publisher. Go to original