What is the Ideal approach to solve the problem in micro services design?

Problem statement… we use micro services architecture. Service A is used provisioning the application. Data will be persisted in d/b. Service B also needs the data for processing business logic. so I think it’s ideal approach share the database between Service A & Service B.

The answer to this question is not that simple. It depends on various factors, but if you follow the keep it as simple as possible principle, that generally should take care of the right thing to do.

for example duplicating data is hard and adds complexity of keeping them in sync - what do you get in return for this additional complexity, is that worth it ? if you don’t have huge scale requirements then why take on this additional burden.

Thanks Rahul, we are migrating to micro services based architecture from monolith.
Going further, we need have multiple instances of business logic(Service B) modules to handle more load. but UI provisioning(Service A) is used very less.

@syed_abdul take a read on this as well as you are trying to move to micro services architecture
https://www.dddcommunity.org/wp-content/uploads/files/pdf_articles/Vernon_2011_1.pdf . The discussion about aggregates and invariants is interesting.

Thank you @rsalota. sure, will go through the document.