Centralized DB Decomposition
2024
Platform-level proposal decomposing a shared database into per-business-domain stores via Debezium CDC + Kafka, with phased migration and Grafana / Prometheus monitoring.
The problem
A single shared operational database had grown to be the bottleneck of the platform. Schema changes by one team affected six others; reporting queries contended with operational ones; the database was the implicit coupling layer between everything.
The architecture
A phased decomposition strategy: each business domain gets its own database, and Debezium Change Data Capture streams row-level changes into Apache Kafka so the legacy shared database can fade in.
ADRs govern the design:
- Kafka over RabbitMQ for the CDC bus — Debezium ships first-class Kafka connectors, and Kafka’s retention semantics suit replay-able change streams
- Grafana + Prometheus for the unified observability layer
Migration approach
For each domain: stand up the new database → backfill from the source → flip the read side first → flip the write side once parity is verified → retire the legacy schema slice. The Strangler Fig pattern applied to data instead of services.
Outcome
A platform-level path out of the centralized database without big-bang risk. Per-domain teams gain schema autonomy.