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

External DB for Rules #156

Open
berayb opened this issue May 7, 2020 · 3 comments
Open

External DB for Rules #156

berayb opened this issue May 7, 2020 · 3 comments
Assignees

Comments

@berayb
Copy link

berayb commented May 7, 2020

Instead of keeping the rules on the local DB, I'd like to use an external connection. Is there any way to replace it with Redis for example?

@berayb
Copy link
Author

berayb commented May 9, 2020

@HJianBo Backing up mnesia files manually and downloading/uploading is not a production-level solution. What kind of methodology would you recommend for this?

@terry-xiaoyu
Copy link
Member

We have to keep rules in the internal DB (mnesia) I think, as they are actually sort of configurations, jut like other configs in configuration files, except that rules can be added, edited and removed at runtime.

Rules are such configs so closed to the rule engine plugin (and the broker) that we'd better keep them in internal db or files. Put them out of the broker would involve more complexities to the architecture, e.g. availability of the external database, the lag of operations between db and emqx, the caching mechanism and the consistency problem when cache is used.

The solution for now is to save and re-create rules using backup/restore tools we've provided emqx enterprise 4.0.10 and later.

@vermaabhay
Copy link

If running EMQx in K8s, there should be a way to create rules using the rule engine config file to avoid the overhead of importing or creating the rules/action manually using the dashboard or cli.

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

No branches or pull requests

5 participants