Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working multiple clusters/hiding databases #403

Open
clintonb opened this issue Sep 15, 2023 · 2 comments
Open

Working multiple clusters/hiding databases #403

clintonb opened this issue Sep 15, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@clintonb
Copy link

I'm prototyping using LiteFS Cloud to distribute data retailers. Say we have Target and Sprouts. I only want the replica at Target to ever see target.db, and Sprouts should only see sprouts.db. If these databases are in the same cluster, they are replicated everywhere.

A logical solution is to use separate clusters. However, that means my central server that writes data to the primary needs to run multiple instances of LiteFS—one for each cluster.

  1. Is there built-in support for connecting to multiple clusters? I'd imagine something where each cluster might be it's own directory (e.g., litefs-target, litefs-sprouts).
  2. If not, any suggestions on making multiple cluster connections?
  3. It's not ideal, but I could get away with simply configuring LiteFS to only download a specific database. Any support for this?
@benbjohnson benbjohnson added the enhancement New feature or request label Sep 16, 2023
@benbjohnson
Copy link
Collaborator

@clintonb That's not a feature we currently support but it's one that I would like to support. Do you need the ability to do auth for each database? For example, the consumer of target.db can only see that database because they pass some kind of auth token in?

Right now you'd need to set up a separate LiteFS cluster for each database if you want to isolate them. It's not ideal for sure.

@clintonb
Copy link
Author

@benbjohnson ideally, yes the Target clients only see their own databases in a multi-tenant scenario.

I agree that separate clusters is the best path forward for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants