Multi Database subscriptions #14171
ItsRobbAllen
started this conversation in
General
Replies: 2 comments 5 replies
-
@ItsRobbAllen just curious, what is the benefit of splitting up the databases so much? Beyond being curious, I'd imagine that the answer on how to best organize the subscriptions lies in this answer, too. |
Beta Was this translation helpful? Give feedback.
4 replies
-
A subscription is per database. In your context, I would recommend that you'll start with a single service that would create a subscription and listen to all the databases. The isolation here is that you basically have a container for subscription workers, so even though they are running in the same space, they are still separated. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Here is our situation. We are following a microservice pattern where each service has its own database. We also are not using a multi-tenant strategy, so each client gets a set of databases for themselves.
For example, we have two clients, Acme and Bravo. With one db per service we'd have—
Acme.Units
,Acme.Concepts
,Acme.Master
,Acme.Financials
as well asBravo.Units
,Bravo.Concepts
,Bravo.Master
,Bravo.Financials
If we call the
Financials
microservice, each endpoint examines the JWT sent across in the authorization header to determine which tenant the call belongs to and loads up the correct database. This works so well & was so easy to implement I keep thinking I must have made a critical security mistake somewhere, but it's Raven... it just works ;)My issue now is that I have sales data in Excel format that I need to upload and then process asynchronously. Subscriptions are the way to go for this, but... what is the best approach for subscribing to many databases?
Do I create a single service that I deploy per tenant? Do I deploy one service that covers all tenants & just create many subscriptions from many stores? A single subscription with multi-tenant data in a single database isn't allowed as there's a hard rule about not mingling client data.
Just looking for ideas or gotchas that I might need to look out for.
Thanks,
R
Beta Was this translation helpful? Give feedback.
All reactions