Reference Data Service Pattern

A Reference Data Service is a mechanism for sharing data with multiple services.
It applies when :-
-
Data is common to many services and rarely changes
-
Changes to the data need to be made available to running services without having to update/restart those services.
The Reference Data Service is managed and deployed just like any other service.
The team owning the Reference Data Service is responsible for managing changes to the data and testing the changes before release.
The Reference Data Service is subject to the same rigorous release process as any other service - as any errors can have far reaching consequences.
Key-Value Store
Kafka contains the reference data as key-value pairs on a compacted topic with infinite retention.
The content of the topic represents the current state of the reference data when consumed from the beginning.
Consumers
A reference data consumer library / pod runs continuously in each Domain service maintaining private local copies of the reference data.
The internal service provides a read-only interface to the other services within the Domain.