Model: Data access patterns (in microservice architecture)
(1) Pattern: interservice communication (2) Pattern: data schema replication (3) Pattern: in-memory replicated cache (4) Pattern: data domain
(1) Pattern: interservice communication (data access in microservices)
latency
- network 60-300 ms
- security
- secure endpoint
- re-authorize if expired
- data
- query own db
- query other db
(2) Pattern: data schema replication (data access in microservices) keep them in sync: synchronous / asyncronous transaction? solves all problems of option (1) custom change-data-capture framework communication sync / async?
(3) Pattern: in-memory replicated cache (data access in microservices) tools to keep cache in sync (hazelcast, coherence, ignite, infinispan, gemfire)
in-memory: 10 GB of product descriptions… when < 100 MB, don’t worry when > 100 MG, start counting how many instances you can have
(4) Pattern: data domain (data access in microservices) always ask: why are these services separate? broader bounded context -> data change issues max 2-6 services sharing the data domain