Unsing one bucket for all microserices is anti-pattern in microservice architecture

138 views Asked by At

We have a big debate in our team about the fact that using one couchbase bucket for all our micro services is not compatible with the microservice architecture. Some developers think that we are implementing a distributed monotlith in the database.

The major argument for using one bucket is gaining in performances.

So my question is : From an architecture point of view, Am i doing it wrong if i use one bucket for all my microservices ?

I have about 10 microservices with different concerns (order fulfillment, finance, order tracking, billing ..)

1

There are 1 answers

1
Johan Larson On

Right now, it's reasonable to have all your different data types in one bucket, distinguished by a type field, even though they are used for different microservices. Subdivisions of buckets (collections and scopes) are coming in the next couple of versions, but they're not here yet.

If you right now have the data types supporting your various microservices decoupled between services, it should be reasonably straightforward to segregate them into collections and scopes once those become available.