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

about single node #966

Closed
web3creator opened this issue Dec 11, 2023 · 6 comments
Closed

about single node #966

web3creator opened this issue Dec 11, 2023 · 6 comments

Comments

@web3creator
Copy link

If I start a node and set it as leader, will there be any problems if the node keeps running?

Copy link

👋 Thanks for opening this issue!

Get help or engage by:

  • /help : to print help messages.
  • /assignme : to assign this issue to you.

@drmingdrmer
Copy link
Member

No problem at all.

It's quite typical to initiate a cluster with a single node for testing purposes.

Are there any specific concerns you have in mind?

@web3creator
Copy link
Author

web3creator commented Dec 11, 2023

@drmingdrmer Thank you very much for your patient answer.
I have a cluster and need to start many work node,I have the following two options
1: Add these nodes to the cluster as learners
2: Each of these work nodes starts the raft service independently.Synchronize data via rpc,These work nodes will execute raft::new()raft::initialize(self.node.id),Will this work well even if it is shut down and restarted?

@drmingdrmer
Copy link
Member

Starting a single node and adding the others as learners would be better.

Restart should not affect anything about persisted data:
If you correctly implement the storage layer, the RaftStorage, by persisting data before returning in every method, the data should remain intact during shutdown and restart processes. This ensures that no data is lost or damaged in such scenarios.

@web3creator
Copy link
Author

web3creator commented Dec 12, 2023

@drmingdrmer If 200(possibly more) learner nodes are added to a cluster, will there be any change in performance compared to no increase?

@drmingdrmer
Copy link
Member

In that case, the impact on performance will be significant.

All replications are transmitted from the Leader to Followers/Learners, placing the Leader under a comparatively high workload.

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