-
Hi, i have a question, whats the best way, to be able to have multiple database connection pools, so i can consume it from the controllers. as from primary one, we can access it from thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @ace3 do you need multiple databases as in "one per tenant/customer" (thousands!) or multiple databases as in say "one analytics database, one app database" (a few, 2-3 different connected databases)? |
Beta Was this translation helpful? Give feedback.
-
hi @jondot , i need a multiple databases. in my case, i'm connecting to primary database ( app database ) , and another connection to slave / 2nd database. ( for historical transaction ) thanks |
Beta Was this translation helpful? Give feedback.
Yes I think @ace3 is correct, since this is "just" a second connection, we can use it only in "routing time", meaning routers get access to it which means Loco does not manage it (no migrations, reset, etc.), it just uses it as a live DB.
Lets start a story, thinking out loud
The solution should be something very similar to this: