Reputation: 161
I have three Microservices and all have their own databases but I have a situation where I need to use a table which is in the database of another Microservice.
What would be he best way to overcome this, I need to join that table with existing DB table. So basically how to join two table from two DBs. I have some ways but not sure which is the best
Upvotes: 0
Views: 831
Reputation: 1080
Of the three options there, #3 is the best option to keep everything separate and isolated. But there are some options to this depending on the needs and how the service uses the information. If it's really infrequently updated like you indicate, then one option would be to simply have the service call the other API to get the data it needs on a regular interval and then to store that in it's own database as a new table. Then, since the table is now in the local service, you can perform joins as you wanted.
Upvotes: 1