Multi-tenant solution with different eventStore / Database endpoints #864
Replies: 2 comments
-
I think that would be rather hard to do properly with the current setup as I can't see how you would select the proper database connection and then how to ensure that in memory service configuration does not leak between tenants. Personally I world create a separate container instance for each tenant, it would remove a lot of complexity but might have scaling problems. |
Beta Was this translation helpful? Give feedback.
-
@rasmus I think I found a solution for the read side by exchanging the existing EntityFrameworkReadModelStore with our own implementation. The write side can be a single eventStore for all instances. But do you think there could be an issue if more than one instance writes into the eventStore? Could there be an issue with the AggregateSequenceNumber? What do you think? |
Beta Was this translation helpful? Give feedback.
-
Hi,
We are developing a multi-tenant application by using your eventFlow framework. We plan to implement a multi-tenant feasible solution which means we want one instance of our application serve multiple customers/clients. Each customer wants to have their own/separate database server.
Do you have any input how this could be handled with eventFlow? As far as I know it is only possible to use one EventStore connection string per running instance (connection can't be switched). So all events of all different customers would end up in one EventStore instance.
Now if we need to replay events I don't see any chance to change the DBContext connection string while replaying.
I found this example how replaying could work:
By using the IReadModelPopulator it is only possible to purge all readModels and then re-populate all events from the eventStore. All DB data would then end up in the currently configured database instance without the possibility to select the desired DB endpoint (per event).
Do you have any input/idea how your framework could handle such a multi-tenant setup with one running instance? Maybe switching the EventStore connectivity on the fly could help to route all events belonging to one customer to a distinct EventStore instance.
Thanks in advance,
Regards,
Christian
Beta Was this translation helpful? Give feedback.
All reactions