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

Alternative Storage: Embedded database #10

Closed
xeoncross opened this issue Nov 29, 2019 · 1 comment
Closed

Alternative Storage: Embedded database #10

xeoncross opened this issue Nov 29, 2019 · 1 comment

Comments

@xeoncross
Copy link

Mongo is barely used in this application - yet requires a whole separate server instance. Consider migrating from a fixed mongo struct to an interface allowing an embedded Key/Value store (written in Go) to be used. Makes setup much easier and the performance should be improved for such a small database due to memory-mapped files and no network I/O.

@kovetskiy
Copy link
Member

kovetskiy commented Nov 29, 2019

Hi! Thanks for the issue, a separated database is added to shadowd because it allows running multiple shadowd instances and it scales better than rsync'ing shadow entries from host to host. We picked MongoDB because it's very easy to configure & run a cluster of mongo instances and it will guarantee high availability of shadowd's database.

You can switch back to filesystem backend if you specify it in the configuration file

[backend]
use = "filesystem"
dsn = "/"

then hash tables will be created in the dir specified by --tables flag and ssh keys will be placed at --keys flag.

The problem with bbolt and badger is that it's not possible to scale it horizontally (please correct me if I'm wrong).

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

No branches or pull requests

2 participants