Data on the inside is service-internal data shaped for the specific service that manages it. Other services should not depend on its format. Because users often read and write it directly, it typically favors synchronous operations and strong consistency, so a successful write is immediately visible. section 17.1
The service and its internal data model are tightly coupled. A service may combine and aggregate several subsets of its own data to deliver useful functionality, while optimizing that data model for performance and usability. The trade-off is that changing the model usually requires corresponding service changes. section 17.1
A service’s internal state
An online service can keep data in a model tailored to its own operations, combine several internal subsets, and return a consistent result to users. Relational databases are recommended for this kind of internal data, while Kafka is used for exchanging data between services. section 17.1 section 17.6
Distinguish internal data from data exchanged across service boundaries:
- Internal data follows the needs of one service; outside data is service-agnostic and structured for exchange. section 17.1
- Internal data favors synchronous access and high consistency; outside data is ideally immutable because other services may already have consumed it. section 17.1
- A practical architecture commonly uses relational databases for internal state and Kafka for historical, decoupled data exchange. section 17.6
Figure 17.1 We differentiate between service-internal data, that is, data on the inside, and data exchanged between services, that is, data on the outside.
Use the diagram to contrast service-internal data with service-external data exchanged between services. section 17.1
