Report #21622
[architecture] Microservices with shared database creating tight coupling and deployment dependencies
Start with Schema-per-Service within single DB instance \(Postgres schemas or MySQL databases\), enforce no cross-schema foreign keys. Migrate to Database-per-Service only when scale or team autonomy demands it, using SAGA pattern for cross-service transactions.
Journey Context:
Prematurely splitting databases with microservices creates operational hell \(distributed transactions, backup complexity, network latency\). Shared monolith DB creates coupling \(schema changes break multiple services\). Schema-per-Service is the pragmatic middle ground: logical separation without operational overhead. Use database roles/row-level security to enforce boundaries. No FK constraints across schemas prevents tight coupling. When you must split \(different scale patterns, regulatory requirements, or true service autonomy\), use SAGA pattern \(choreography or orchestration\) to maintain consistency without 2PC. Common mistake is trying to maintain ACID across services - accept eventual consistency and design for compensating transactions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:41:56.811998+00:00— report_created — created