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

Support for 2 nodes only? #68

Closed
oz123 opened this issue Jul 25, 2023 · 4 comments
Closed

Support for 2 nodes only? #68

oz123 opened this issue Jul 25, 2023 · 4 comments

Comments

@oz123
Copy link

oz123 commented Jul 25, 2023

Earlier versions of marmot didn't require JetStream. As far as I can tell, I can still connect to a regular nats server - I can see the connections - but it seems that sync isn't working.

Another question is:
If I understand this properly, writes from one database trigger inserts to a dedicated table which will then be read by marmot
and sent to nats. The question is - how often does marmot read changes, and is this configurable?

@maxpert
Copy link
Owner

maxpert commented Jul 25, 2023

Very early versions of Marmot (before 0.4.x) were built on DragonBoat. I abandoned that library mostly due to extremely slow responses from author, and missing support for IPv6 (which I saw as a blocker for myself). From that point onwards Marmot always depended on JetStream, because that is the only RAFT reliable way of persisting change logs in NATS. You can still connect to regular NATS server, but it has to launch with -js flag. This should be a non-issue now because if you don't specify any cluster binding then NATS is launched in non-cluster mode with JetStream turned on for Marmot.

Marmot keeps a running read transactions, with WAL support turned on. Which means ASAP frames are written to disk the WAL log file will change, and then depending on OS notification infra (since we are watching the WAL files), Marmot almost instantly picks up those changes. There is also an polling_interval configuration here that you can use to set interval time, but that should not be required and I plan to deprecate that in future.

@oz123
Copy link
Author

oz123 commented Jul 26, 2023

Thank you for the quick response.
I am actually not so interested in RAFT. Which coerces me to use 3 nodes. I am happy with just running nats-server --jetstream as a binary outside of marmot
I'll continue this in a discussion.

#70

@oz123 oz123 closed this as completed Jul 26, 2023
@oz123
Copy link
Author

oz123 commented Jul 26, 2023

If anyone ever looks for this: I posted an example of a two node marmot setup in the linked discussion.

@bharath82d
Copy link

Does Marmot requires minimum three nodes ?

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

3 participants