Problem Statement
What is a pragmatic way to handle cross-shard joins in an OLTP microservice?
Explanation
Co-locating related entities under the same shard key keeps most reads single-shard and cheap. For read patterns that still span shards, build denormalized views or a search index.
Heavy multi-shard joins are brittle at scale; push them to batch pipelines or OLAP systems.
Code Solution
SolutionRead Only
Order + OrderLines share shard key = order_id
