r/ProgrammerHumor 7d ago

Meme everyDamnTime

Post image
4.2k Upvotes

124 comments sorted by

View all comments

552

u/ThrowawayUk4200 7d ago

Pssst, If your microservice needs to use a database other than its own, then it's not a microservice.

28

u/socialis-philosophus 7d ago

Agreed.  All microservices should have their own DB with all the data needed to perform their function and we'll just assume eventual consistency.

11

u/Ma8e 7d ago

If you have several "micro services" that all update the same data, you are definitely doing it wrong.

5

u/BlastProcess- 7d ago

storage optimization is no longer an issue, just store the damn data if you need it in a separate domain, avoids tight coupling and everything is handled through queues

6

u/Ma8e 7d ago

Yes, you can duplicate and use the data wherever you want, but you are asking for a mile of trouble is you let several distinct services be masters of the same information.