Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where lookup tables should be placed in a microservices architecture?

In a microservices architecture, each microservice has its own database and tables should not be duplicated in different databases. But there are tables, like lookup tables (called also reference tables), that are needed by multiple microservices. Should we put lookup tables in each microservice database, or is it better to create a new microservice with a database holding all the lookup tables ?

like image 719
Bacem Avatar asked Nov 08 '22 07:11

Bacem


1 Answers

Lookup tables will usually contain read only data (they are like view models), so they can be available across the system in whatever technical solution you choose.

A shared read only database table, a distributed cache, on a CDN...

Make sense?

like image 99
Sean Farmar Avatar answered Jan 04 '23 03:01

Sean Farmar