Menu
Back to Discussions

When you're building a new system and want to get things done fast, a shared database can be a good idea. It lets you avoid the overhead of setting up and managing separate databases for each service. But remember, this approach might cause problems later as your system grows and gets more complicated.

Hey everyone, I've been wrestling with a design decision on a new project. We're building a system with several microservices, and the common wisdom is to give each service its own database. This works well for independent scaling and data ownership. But, for a few specific, read-heavy use cases, joining data across what would be many separate service databases feels overly complex or slow without some kind of data duplication or dedicated read model. When is it acceptable to use a shared database across a few services, perhaps for analytical reads or specific domain boundaries, without completely undermining the microservice principles? Or is the pain of separate databases always worth it in the long run?
1 comment

Comments

Loading comments...