-4

If you have a very large monolithic database that is not partitioned or sharded, with strong relationships between the tables/data, does it still make sense to use microservices as the application layer?

  • 3
    Whether it makes sense in any particluar situation, depends on the reasons why microservices are considered. What benefits do you (or the person who suggested the approach) hope to achieve? Without any further context, this question cannot be answered here. – Rik D Nov 5 at 8:14
1

No, it does not.

Microservices are meant to be loosely coupled and independently deployable. Having a single backing store introduces a single huge integration point that greatly diminishes loose coupling and ability to deploy independently.

You would greatly complicate the architecture by not gaining anything in return.

Also, having a single database would be way too tempting for developers to abuse it as communication channel between services instead of using inter-service calls.

Another big reason for microservices is failure impact reduction. When one service is down, it shouldn't result in the whole system going down. Having single database would introduce single point of failure, making microservices mostly useless.

data layer thats unlikely to change

One of the big point of microservices is to facilitate more agile and flexible changes in your software. I don't see how using microservices would help when their database would stay static.

| improve this answer | |
  • 1
    "Having a single backing store introduces a single huge integration point that greatly diminishes loose coupling and ability to deploy independently." That's generally correct, but if you start from the proposition that this monolithic database does not change, then the shared database isn't going to be blocking any deployments since it won't be redeployed. I don't disagree with your other points though. – Flater Nov 5 at 9:54
  • 2
    @Flater If I had a penny every time someone said "thing thing will never change" and the thing did change, I would be quite a rich person. – Euphoric Nov 5 at 11:06
  • 1
    Oh I definitely agree that we want things to be more rigid than they in reality end up being, but a question's premise is a given context. If OP's premise is faulty, you're not to blame for your answer not fitting with OP's actual situation. – Flater Nov 5 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.